Jagger
 All Classes Namespaces Files Functions Variables Groups Pages
MaxLoadThreads.java
Go to the documentation of this file.
1 package com.griddynamics.jagger.user.test.configurations.load.aux;
2 
8 public final class MaxLoadThreads {
9  private final long maxLoadThreads;
10 
11  private MaxLoadThreads(long maxLoadThreads) {
12  if (maxLoadThreads <= 0) {
13  throw new IllegalArgumentException(
14  String.format("The maximum number of threads must be > 0. Provided value is %s", maxLoadThreads));
15  }
16  this.maxLoadThreads = maxLoadThreads;
17  }
18 
19  public static MaxLoadThreads of(long maxLoadThreads) {
20  return new MaxLoadThreads(maxLoadThreads);
21  }
22 
23  public long value() {
24  return maxLoadThreads;
25  }
26 }