org.jbpm.pvm.internal.jobexecutor
Class JobExecutor

java.lang.Object
  extended by org.jbpm.pvm.internal.jobexecutor.JobExecutor
All Implemented Interfaces:
java.io.Serializable

public class JobExecutor
extends java.lang.Object
implements java.io.Serializable

manager for job execution threads and their configuration.

Author:
Tom Baeyens, Guillaume Porcher
See Also:
Serialized Form

Constructor Summary
JobExecutor()
           
 
Method Summary
 Command<java.util.Collection<java.lang.Long>> getAcquireJobsCommand()
           
 CommandService getCommandExecutor()
           
 DispatcherThread getDispatcherThread()
           
 java.util.List<JobHistoryEntry> getHistory()
           
 int getHistorySize()
           
 int getIdleMillis()
           
 int getIdleMillisMax()
           
 int getLockMillis()
           
 java.lang.String getName()
           
 int getNbrOfThreads()
           
 Command<java.util.Date> getNextDueDateCommand()
           
protected  java.util.concurrent.ExecutorService getThreadPool()
           
 boolean isActive()
           
 void jobWasAdded()
           
 void setCommandExecutor(CommandService commandService)
           
 void setHistoryMaxSize(int historyMaxSize)
           
 void setIdleInterval(int idleInterval)
           
 void setMaxIdleInterval(int maxIdleInterval)
           
 void setMaxLockTime(int maxLockTime)
           
 void setName(java.lang.String name)
           
 void setNbrOfJobExecutorThreads(int nbrOfJobExecutorThreads)
           
 void start()
          starts the DispatcherThread and JobExecutorThreads for this job executor
 void stop()
          stops with join set to false.
 void stop(boolean join)
          signals to all threads managed by this job executor to stop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobExecutor

public JobExecutor()
Method Detail

start

public void start()
starts the DispatcherThread and JobExecutorThreads for this job executor


stop

public void stop()
stops with join set to false.

See Also:
stop(boolean)

stop

public void stop(boolean join)
signals to all threads managed by this job executor to stop. Stopping the dispatcher thread is blocking till the dispatcher is no more alive. If join is set to true, this method will block until all job executor threads are joined and actually dead. If join is false, the job executor threads are only told to stop, without waiting till they are actually stopped. It may be that job executor threads are in the middle of executing a job and they may finish after this method returned.


jobWasAdded

public void jobWasAdded()

getThreadPool

protected java.util.concurrent.ExecutorService getThreadPool()

getName

public java.lang.String getName()

getHistorySize

public int getHistorySize()

getIdleMillis

public int getIdleMillis()

isActive

public boolean isActive()

getIdleMillisMax

public int getIdleMillisMax()

getLockMillis

public int getLockMillis()

getNbrOfThreads

public int getNbrOfThreads()

getCommandExecutor

public CommandService getCommandExecutor()

getAcquireJobsCommand

public Command<java.util.Collection<java.lang.Long>> getAcquireJobsCommand()

getNextDueDateCommand

public Command<java.util.Date> getNextDueDateCommand()

getDispatcherThread

public DispatcherThread getDispatcherThread()

getHistory

public java.util.List<JobHistoryEntry> getHistory()

setCommandExecutor

public void setCommandExecutor(CommandService commandService)

setName

public void setName(java.lang.String name)

setNbrOfJobExecutorThreads

public void setNbrOfJobExecutorThreads(int nbrOfJobExecutorThreads)

setIdleInterval

public void setIdleInterval(int idleInterval)

setMaxIdleInterval

public void setMaxIdleInterval(int maxIdleInterval)

setHistoryMaxSize

public void setHistoryMaxSize(int historyMaxSize)

setMaxLockTime

public void setMaxLockTime(int maxLockTime)


Copyright © 2010 JBoss Community. All Rights Reserved.