Package org.wildfly.clustering.function
Interface Runner
- All Superinterfaces:
Runnable
An enhanced runnable.
- Author:
- Paul Ferraro
-
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
Returns a runner that runs the specified runner after running this runner.- Parameters:
after- a runner to run after this runner- Returns:
- a runner that runs the specified runner after running this runner.
-
compose
Returns a runner that runs the specified runner before running this runner.- Parameters:
before- a runner to run before this runner- Returns:
- a runner that runs the specified runner before running this runner.
-
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
Returns an empty runner.- Returns:
- an empty runner.
-
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
Returns a composite runner that runs the specified runners.- Parameters:
runners- zero or more runners- Returns:
- a composite runner that runs the specified runners, logging any exceptions
-