Class ThreadLocalAwareExecutorImpl
- java.lang.Object
-
- net.officefloor.frame.impl.execute.officefloor.ThreadLocalAwareExecutorImpl
-
- All Implemented Interfaces:
ThreadLocalAwareExecutor
public class ThreadLocalAwareExecutorImpl extends java.lang.Object implements ThreadLocalAwareExecutor
ThreadLocalAwareExecutor
implementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ThreadLocalAwareExecutorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(Job job)
void
processComplete(ProcessState processState)
Flags theProcessState
as complete.void
runInContext(FunctionState function, FunctionLoop loop)
Runs theProcessState
within context to enable theThreadLocal
instances of the currentThread
to be available.
-
-
-
Method Detail
-
runInContext
public void runInContext(FunctionState function, FunctionLoop loop)
Description copied from interface:ThreadLocalAwareExecutor
Runs the
ProcessState
within context to enable theThreadLocal
instances of the currentThread
to be available.This will block the current
Thread
until theProcessState
and all subsequentProcessState
instances invoked by the currentThread
are complete.- Specified by:
runInContext
in interfaceThreadLocalAwareExecutor
- Parameters:
function
- InitialFunctionState
of theProcessState
.loop
-FunctionLoop
.
-
execute
public void execute(Job job)
Description copied from interface:ThreadLocalAwareExecutor
- Specified by:
execute
in interfaceThreadLocalAwareExecutor
- Parameters:
job
-Job
.
-
processComplete
public void processComplete(ProcessState processState)
Description copied from interface:ThreadLocalAwareExecutor
Flags theProcessState
as complete.- Specified by:
processComplete
in interfaceThreadLocalAwareExecutor
- Parameters:
processState
-ProcessState
.
-
-