es.caib.bpm.job
Class JobExecutor
java.lang.Object
es.caib.bpm.job.JobExecutor
public class JobExecutor
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
protected java.lang.String name
nbrOfThreads
protected int nbrOfThreads
idleInterval
protected int idleInterval
maxIdleInterval
protected int maxIdleInterval
historyMaxSize
protected int historyMaxSize
maxLockTime
protected int maxLockTime
lockMonitorInterval
protected int lockMonitorInterval
lockBufferTime
protected int lockBufferTime
threads
protected java.util.Map threads
lockMonitorThread
protected LockMonitorThread lockMonitorThread
monitoredJobIds
protected java.util.Map monitoredJobIds
isStarted
protected boolean isStarted
hostName
protected static java.lang.String hostName
JobExecutor
public JobExecutor()
start
public void start()
stop
public java.util.List stop()
- signals to all threads in this job executor to stop. It may be that
threads are in the middle of something and they will finish that firts.
Use
stopAndJoin() in case you want a method that blocks until
all the threads are actually finished.
- Returns:
- a list of all the stopped threads. In case no threads were
stopped an empty list will be returned.
stopAndJoin
public void stopAndJoin()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
startThread
protected void startThread()
createThread
protected java.lang.Thread createThread(java.lang.String threadName)
getNextThreadName
protected java.lang.String getNextThreadName()
getLastThreadName
protected java.lang.String getLastThreadName()
stopThread
protected java.lang.Thread stopThread()
setMonitoredJobIds
public void setMonitoredJobIds(java.util.Map monitoredJobIds)
getMonitoredJobIds
public java.util.Set getMonitoredJobIds()
addMonitoredJobId
public void addMonitoredJobId(java.lang.String threadName,
long jobId)
removeMonitoredJobId
public void removeMonitoredJobId(java.lang.String threadName)
setHistoryMaxSize
public void setHistoryMaxSize(int historyMaxSize)
getHistoryMaxSize
public int getHistoryMaxSize()
setIdleInterval
public void setIdleInterval(int idleInterval)
getIdleInterval
public int getIdleInterval()
setStarted
public void setStarted(boolean isStarted)
isStarted
public boolean isStarted()
setMaxIdleInterval
public void setMaxIdleInterval(int maxIdleInterval)
getMaxIdleInterval
public int getMaxIdleInterval()
setName
public void setName(java.lang.String name)
getName
public java.lang.String getName()
setSize
public void setSize(int nbrOfThreads)
getSize
public int getSize()
setThreads
public void setThreads(java.util.Map threads)
getThreads
public java.util.Map getThreads()
setMaxLockTime
public void setMaxLockTime(int maxLockTime)
getMaxLockTime
public int getMaxLockTime()
setLockBufferTime
public void setLockBufferTime(int lockBufferTime)
getLockBufferTime
public int getLockBufferTime()
setLockMonitorInterval
public void setLockMonitorInterval(int lockMonitorInterval)
getLockMonitorInterval
public int getLockMonitorInterval()
setNbrOfThreads
public void setNbrOfThreads(int nbrOfThreads)
getNbrOfThreads
public int getNbrOfThreads()
Copyright © 2012 Direcció General de Tecnologia i Comunicacions. Govern de les Illes Balears. All Rights Reserved.