Package org.wildfly.clustering.context
Class ContextReferenceExecutor<C>
java.lang.Object
org.wildfly.clustering.context.ContextReferenceExecutor<C>
- All Implemented Interfaces:
Executor,ContextualExecutor,Contextualizer
Contextual executor based on a context reference.
- Author:
- Paul Ferraro
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid<T> TExecutes the specified caller with a given context.<T> TExecutes the specified supplier with a given context.<E extends Exception>
voidexecute(org.wildfly.common.function.ExceptionRunnable<E> runner) Executes the specified runner.<T,E extends Exception>
Texecute(org.wildfly.common.function.ExceptionSupplier<T, E> supplier) Executes the specified supplier with a given context.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.clustering.context.ContextualExecutor
contextualize, contextualize, contextualize, contextualize, contextualize
-
Constructor Details
-
ContextReferenceExecutor
-
-
Method Details
-
execute
-
execute
public <E extends Exception> void execute(org.wildfly.common.function.ExceptionRunnable<E> runner) throws E Description copied from interface:ContextualExecutorExecutes the specified runner.- Specified by:
executein interfaceContextualExecutor- Type Parameters:
E- the exception type- Parameters:
runner- a runnable task- Throws:
E- if execution fails
-
execute
Description copied from interface:ContextualExecutorExecutes the specified caller with a given context.- Specified by:
executein interfaceContextualExecutor- Type Parameters:
T- the return type- Parameters:
caller- a callable task- Returns:
- the result of the caller
- Throws:
Exception- if execution fails
-
execute
Description copied from interface:ContextualExecutorExecutes the specified supplier with a given context.- Specified by:
executein interfaceContextualExecutor- Type Parameters:
T- the return type- Parameters:
supplier- a supplier task- Returns:
- the result of the supplier
-
execute
public <T,E extends Exception> T execute(org.wildfly.common.function.ExceptionSupplier<T, E> supplier) throws EDescription copied from interface:ContextualExecutorExecutes the specified supplier with a given context.- Specified by:
executein interfaceContextualExecutor- Type Parameters:
T- the return typeE- the exception type- Parameters:
supplier- a supplier task- Returns:
- the result of the supplier
- Throws:
E- if execution fails
-