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