Class NonParallelExecutor
- java.lang.Object
-
- org.apache.tapestry5.ioc.internal.services.NonParallelExecutor
-
- All Implemented Interfaces:
ParallelExecutor
public class NonParallelExecutor extends java.lang.Object implements ParallelExecutor
Implementation ofParallelExecutor
used when the thread pool is disabled.- Since:
- 5.1.0.3
-
-
Constructor Summary
Constructors Constructor Description NonParallelExecutor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
invoke(java.lang.Class<T> proxyType, Invokable<T> invocable)
As withParallelExecutor.invoke(org.apache.tapestry5.ioc.Invokable)
, but the result is wrapped inside a thunk.<T> java.util.concurrent.Future<T>
invoke(Invokable<T> invocable)
Submits the invocable object to be executed in a pooled thread.
-
-
-
Constructor Detail
-
NonParallelExecutor
public NonParallelExecutor()
-
-
Method Detail
-
invoke
public <T> java.util.concurrent.Future<T> invoke(Invokable<T> invocable)
Description copied from interface:ParallelExecutor
Submits the invocable object to be executed in a pooled thread. Returns a Future object representing the eventual result of the invocable's operation. The actual operation will be wrapped such thatPerthreadManager.cleanup()
is invoked after the operation completes.- Specified by:
invoke
in interfaceParallelExecutor
- Parameters:
invocable
- to execute in a thread- Returns:
- Future result of that invocation
-
invoke
public <T> T invoke(java.lang.Class<T> proxyType, Invokable<T> invocable)
Description copied from interface:ParallelExecutor
As withParallelExecutor.invoke(org.apache.tapestry5.ioc.Invokable)
, but the result is wrapped inside a thunk. Invoking methods on the thunk will block until the value is available.- Specified by:
invoke
in interfaceParallelExecutor
- Parameters:
proxyType
- return type, used to create the thunkinvocable
- object that will eventually execute and return a value- Returns:
- the thunk
-
-