org.jgroups.blocks.executor
Class ExecutionRunner

java.lang.Object
  extended by 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
protected static class ExecutionRunner.Holder<T>
           
 
Field Summary
protected  Executing _execProt
           
protected static Log _logger
           
protected  JChannel ch
           
 
Constructor Summary
ExecutionRunner(JChannel channel)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ch

protected JChannel ch

_execProt

protected Executing _execProt

_logger

protected static final Log _logger
Constructor Detail

ExecutionRunner

public ExecutionRunner(JChannel channel)
Method Detail

setChannel

public void setChannel(JChannel ch)

run

public void run()
Specified by:
run in interface java.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


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.