public final class TransactionOptions extends Object
Modifier and Type | Method and Description |
---|---|
static TransactionOptions |
create()
Create a default set of options suitable for most use cases.
|
static TransactionOptions |
create(Executor executor)
Create a default set of options with a custom executor.
|
static TransactionOptions |
create(Executor executor,
int numberOfAttempts)
Create a default set of options with a custom executor and a custom number of retry attempts.
|
static TransactionOptions |
create(int numberOfAttempts)
Create a default set of options with a custom number of retry attempts.
|
Executor |
getExecutor() |
int |
getNumberOfAttempts() |
public int getNumberOfAttempts()
@Nonnull public static TransactionOptions create()
@Nonnull public static TransactionOptions create(int numberOfAttempts)
numberOfAttempts
- The number of execution attempts.@Nonnull public static TransactionOptions create(@Nonnull Executor executor)
executor
- The executor to run the user callback code on.@Nonnull public static TransactionOptions create(@Nonnull Executor executor, int numberOfAttempts)
executor
- The executor to run the user callback code on.numberOfAttempts
- The number of execution attempts.Copyright © 2019 Google LLC. All rights reserved.