public final class CustomObjectBigIntegerNumberGeneratorConfig extends Base
final BigInteger initialCounterValue = new BigInteger("5001"); final CustomObjectBigIntegerNumberGeneratorConfig config = CustomObjectBigIntegerNumberGeneratorConfigBuilder.of(client(), randomKey()) .container(randomKey()) .initialValue(initialCounterValue) .build(); final BigIntegerNumberGenerator generator = CustomObjectBigIntegerNumberGenerator.of(config); final BigInteger firstNumber = generator.getNextNumber().toCompletableFuture().join(); assertThat(firstNumber).isEqualTo(initialCounterValue);
See the test code.
Modifier and Type | Method and Description |
---|---|
String |
getContainer() |
BigInteger |
getInitialValue() |
String |
getKey() |
int |
getMaxRetryAttempts() |
SphereClient |
getSphereClient() |
public int getMaxRetryAttempts()
public String getContainer()
public String getKey()
public SphereClient getSphereClient()
public BigInteger getInitialValue()