Package org.jgroups.blocks.executor
Class ExecutionRunner
- java.lang.Object
-
- org.jgroups.blocks.executor.ExecutionRunner
-
- All Implemented Interfaces:
java.lang.Runnable
public class ExecutionRunner extends java.lang.Object implements java.lang.Runnable
This class is to be used to pick up execution requests and actually run them. A single instance can be used across any number of threads.- Author:
- wburns
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
ExecutionRunner.Holder<T>
-
Constructor Summary
Constructors Constructor Description ExecutionRunner(JChannel channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.Thread,java.lang.Runnable>
getCurrentRunningTasks()
Returns a copy of the runners being used with the runner and what threads.void
run()
void
setChannel(JChannel ch)
-
-
-
Constructor Detail
-
ExecutionRunner
public ExecutionRunner(JChannel channel)
-
-
Method Detail
-
setChannel
public void setChannel(JChannel ch)
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
getCurrentRunningTasks
public java.util.Map<java.lang.Thread,java.lang.Runnable> getCurrentRunningTasks()
Returns a copy of the runners being used with the runner and what threads. If a thread is not currently running a task it will return with a null value. This map is a copy and can be modified if necessary without causing issues.- Returns:
- map of all threads that are active with this runner. If the thread is currently running a job the runnable value will be populated otherwise null would mean the thread is waiting
-
-