Package org.wildfly.clustering.function
Interface Runnable
- All Superinterfaces:
Runnable
An enhanced runnable.
- Author:
- Paul Ferraro
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> RunnableReturns a task that consumes a value from the specified supplier.default RunnableReturns a task that runs the specified task after running this task.static Runnableempty()Returns an empty task.default Runnablehandle(Consumer<RuntimeException> handler) Returns a new runnable that delegates to the specified handler in the event of an exception.static RunnableReturns a composite runner that runs the specified runners.
-
Field Details
-
EMPTY
-
-
Method Details
-
andThen
Returns a task that runs the specified task after running this task.- Parameters:
task- a task to run after this task- Returns:
- a task that runs the specified task after running this task.
-
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 task.- Returns:
- an empty task.
-
accept
Returns a task 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 task 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
-