org.ow2.orchestra.pvm.internal.jobexecutor
Class AbstractDispatcherThread
java.lang.Object
java.lang.Thread
org.ow2.orchestra.pvm.internal.jobexecutor.AbstractDispatcherThread
- All Implemented Interfaces:
- Runnable
- Direct Known Subclasses:
- DispatcherThread, JdkDispatcherThread
public abstract class AbstractDispatcherThread
- extends Thread
Common part of dispatcher thread implementations.
This thread is responsible for acquiring jobs in the jobImpl that need to be
executed and to give them to the jobExecutor thread pool.
There is only one dispatcher thread per JobExecutor.
- Author:
- Tom Baeyens, Guillaume Porcher
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
AbstractDispatcherThread
public AbstractDispatcherThread()
AbstractDispatcherThread
public AbstractDispatcherThread(Runnable target)
- Parameters:
target -
AbstractDispatcherThread
public AbstractDispatcherThread(String name)
- Parameters:
name -
AbstractDispatcherThread
public AbstractDispatcherThread(ThreadGroup group,
Runnable target)
- Parameters:
group - target -
AbstractDispatcherThread
public AbstractDispatcherThread(ThreadGroup group,
String name)
- Parameters:
group - name -
AbstractDispatcherThread
public AbstractDispatcherThread(Runnable target,
String name)
- Parameters:
target - name -
AbstractDispatcherThread
public AbstractDispatcherThread(ThreadGroup group,
Runnable target,
String name)
- Parameters:
group - target - name -
AbstractDispatcherThread
public AbstractDispatcherThread(ThreadGroup group,
Runnable target,
String name,
long stackSize)
- Parameters:
group - target - name - stackSize -
putAcquiredJobDbidsOnQueue
protected abstract void putAcquiredJobDbidsOnQueue(Collection<JobImpl<?>> acquiredJobDbids)
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
acquireJobs
protected Collection<Collection<JobImpl<?>>> acquireJobs()
getNextDueDate
protected Date getNextDueDate()
getWaitPeriod
protected long getWaitPeriod()
deactivate
public void deactivate()
deactivate
public void deactivate(boolean join)
jobWasAdded
public void jobWasAdded()
isActive
public boolean isActive()
getJobExecutor
public abstract AbstractJobExecutor getJobExecutor()
Copyright © 2011 OW2 Consortium. All Rights Reserved.