com.googlecode.jpattern.core.command
Class QueueAsyncCommandPoolExecutor

java.lang.Object
  extended by com.googlecode.jpattern.core.command.QueueAsyncCommandPoolExecutor
All Implemented Interfaces:
ICommandExecutor, Serializable

public class QueueAsyncCommandPoolExecutor
extends Object
implements ICommandExecutor

Author:
Francesco Cina' 27/feb/2011 This implementation of IAsyncCommandPool is a pool which manage a queue of runnable objects and runs a prefixed maximum of Thread at the same time.
See Also:
Serialized Form

Constructor Summary
QueueAsyncCommandPoolExecutor(String name, int maxWaitingCommands, int maxConcurrentThreads, ILoggerService loggerService)
           
 
Method Summary
 void addCommandToPool(ACommand asyncCommand)
           
 boolean executeNext(ICommandResult result)
           
 IChainStrategy getChainStrategy()
           
protected  void startPool()
           
protected  void stopPool()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueueAsyncCommandPoolExecutor

public QueueAsyncCommandPoolExecutor(String name,
                                     int maxWaitingCommands,
                                     int maxConcurrentThreads,
                                     ILoggerService loggerService)
Method Detail

addCommandToPool

public void addCommandToPool(ACommand asyncCommand)
Specified by:
addCommandToPool in interface ICommandExecutor

stopPool

protected void stopPool()

startPool

protected void startPool()

executeNext

public boolean executeNext(ICommandResult result)
Specified by:
executeNext in interface ICommandExecutor

getChainStrategy

public IChainStrategy getChainStrategy()
Specified by:
getChainStrategy in interface ICommandExecutor


Copyright © 2011. All Rights Reserved.