org.apache.servicemix.executors.impl
Class ExecutorImpl

java.lang.Object
  extended by org.apache.servicemix.executors.impl.ExecutorImpl
All Implemented Interfaces:
Executor

public class ExecutorImpl
extends java.lang.Object
implements Executor

The default Executor implementation which uses a ThreadPoolExecutor underneath.

Author:
Guillaume Nodet

Constructor Summary
ExecutorImpl(java.util.concurrent.ThreadPoolExecutor threadPool, long shutdownDelay, boolean bypassIfSynchronous)
           
 
Method Summary
 int capacity()
          The capacity of the underlying queue (if any)
 void execute(java.lang.Runnable command)
          Execute a command.
 void shutdown()
          Shutdown this executor.
 int size()
          The current size of the underlying queue (if any)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutorImpl

public ExecutorImpl(java.util.concurrent.ThreadPoolExecutor threadPool,
                    long shutdownDelay,
                    boolean bypassIfSynchronous)
Method Detail

execute

public void execute(java.lang.Runnable command)
Description copied from interface: Executor
Execute a command.

Specified by:
execute in interface Executor
Parameters:
command - the command to execute

shutdown

public void shutdown()
Description copied from interface: Executor
Shutdown this executor. This must be called to kill all threads.

Specified by:
shutdown in interface Executor

capacity

public int capacity()
Description copied from interface: Executor
The capacity of the underlying queue (if any)

Specified by:
capacity in interface Executor
Returns:

size

public int size()
Description copied from interface: Executor
The current size of the underlying queue (if any)

Specified by:
size in interface Executor
Returns:


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.