Interface Runner
- All Superinterfaces:
Runnable
- All Known Subinterfaces:
CacheEntryMutator
- All Known Implementing Classes:
AbstractCacheEntryMutator, EmbeddedCacheEntryComputer, EmbeddedCacheEntryMutator, RemoteCacheEntryComputer, RemoteCacheEntryMutator
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> RunnerReturns a runner that consumes a value from the specified supplier.static Runneraccept(DoubleConsumer consumer, DoubleSupplier supplier) Returns a runner that consumes a value from the specified supplier.static Runneraccept(IntConsumer consumer, IntSupplier supplier) Returns a runner that consumes a value from the specified supplier.static Runneraccept(LongConsumer consumer, LongSupplier supplier) Returns a runner that consumes a value from the specified supplier.default RunnerReturns a runner that runs the specified runner after running this runner.default RunnerReturns a runner that runs the specified runner before running this runner.static Runnerempty()Returns an empty runner.default Runnerhandle(Consumer<RuntimeException> handler) Returns a new runnable that delegates to the specified handler in the event of an exception.static RunnerReturns a composite runner that runs the specified runners.static Runnerthrowing(Supplier<RuntimeException> exceptionProvider) Returns a runner that throws the provided runtime exception.
-
Field Details
-
EMPTY
A runner that performs no action.
-
-
Method Details
-
andThen
-
compose
-
handle
Returns a new runnable that delegates to the specified handler in the event of an exception.- Parameters:
handler- a runtime exception handler- Returns:
- a new runnable that delegates to the specified handler in the event of an exception.
-
empty
-
throwing
Returns a runner that throws the provided runtime exception.- Parameters:
exceptionProvider- a runtime exception provider- Returns:
- a runner that throws the provided runtime exception.
-
accept
Returns a runner that consumes a value from the specified supplier.- Type Parameters:
T- the consumed value- Parameters:
consumer- a consumer of the supplied valuesupplier- a supplier of the consumed value- Returns:
- a runner that consumes a value from the specified supplier.
-
accept
Returns a runner that consumes a value from the specified supplier.- Parameters:
consumer- a consumer of the supplied valuesupplier- a supplier of the consumed value- Returns:
- a runner that consumes a value from the specified supplier.
-
accept
Returns a runner that consumes a value from the specified supplier.- Parameters:
consumer- a consumer of the supplied valuesupplier- a supplier of the consumed value- Returns:
- a runner that consumes a value from the specified supplier.
-
accept
Returns a runner that consumes a value from the specified supplier.- Parameters:
consumer- a consumer of the supplied valuesupplier- a supplier of the consumed value- Returns:
- a runner that consumes a value from the specified supplier.
-
runAll
-