Jagger
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
ThreadCount.java
Go to the documentation of this file.
1 package com.griddynamics.jagger.user.test.configurations.load.auxiliary;
2 
6 public class ThreadCount {
7  private final int threadCount;
8 
9  private ThreadCount(int threadCount) {
10  if (threadCount <= 0) {
11  throw new IllegalArgumentException(String.format("Number of threads must be > 0. Provided value is %s", threadCount));
12  }
13  this.threadCount = threadCount;
14  }
15 
16  public int value() {
17  return threadCount;
18  }
19 
20  public static ThreadCount of(int invocationCount) {
21  return new ThreadCount(invocationCount);
22  }
23 }