| Modifier and Type | Method and Description |
|---|---|
static <T> FunctionalTransaction<T> |
Transactions.evaluate(SupplierWithException<T> function)
Builds a
FunctionalTransaction that can have a rollback and/or a commit. |
static <T> T |
Unreliable.keepTrying(SupplierWithException<T> s)
Tries to retrieve a value until no exception is thrown.
|
static <T> T |
Unreliable.retryOn(Class exceptionClass,
SupplierWithException<T> s)
Tries to retrieve a value up to three times as long as the specified exception is being thrown.
|
static <T> T |
Unreliable.retryOn(Class exceptionClass,
SupplierWithException<T> s,
int times)
Tries to retrieve a value up to the specified number of times as long as the specified exception is being thrown.
|
static <T> T |
Unreliable.retryOn(Collection<Class> exceptionClasses,
SupplierWithException<T> s)
Tries to retrieve a value up to three times as long as one of the specified exceptions is being thrown.
|
static <T> T |
Unreliable.retryOn(Collection<Class> exceptionClasses,
SupplierWithException<T> s,
int times)
Tries to retrieve a value up to the specified number of times as long as one of the specified exceptions is being thrown.
|
static <T> T |
Unreliable.tenaciously(SupplierWithException<T> s)
Tries to retrieve a value up to three times until no exception is thrown.
|
static <T> T |
Unreliable.tenaciously(SupplierWithException<T> s,
int times)
Tries to retrieve a value up to the specified number of times until no exception is thrown.
|
| Constructor and Description |
|---|
FunctionalTransaction(SupplierWithException<T> function)
Constructs a lightweight transaction that can have a rollback and a commit.
|
Copyright © 2019. All rights reserved.