net.aavalla.utils.jobpool
Class JobPool
java.lang.Object
net.aavalla.utils.jobpool.JobPool
- All Implemented Interfaces:
- Disposeable
public class JobPool
- extends java.lang.Object
- implements Disposeable
- Author:
- Lari Natri
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JobPool
public JobPool()
getAvailableProcessors
public static int getAvailableProcessors()
getNewJobTreeForm
public JobPoolForm getNewJobTreeForm(boolean popupMenu)
addJob
public void addJob(Job j)
setMaxRootJobs
public void setMaxRootJobs(int max)
setJobPoolSize
public final void setJobPoolSize(int size)
setMaxThreads
public void setMaxThreads(int max)
setRunImmediateImmediately
public final void setRunImmediateImmediately(boolean immediately)
setBetterPriorityJobsMustEndFirst
public final void setBetterPriorityJobsMustEndFirst(boolean betterFirst)
getBetterPriorityJobsMustEndFirst
public final boolean getBetterPriorityJobsMustEndFirst()
getRunImmediateImmediately
public final boolean getRunImmediateImmediately()
getMaxConcurrencyForCategory
public final java.lang.Integer getMaxConcurrencyForCategory(JobCategory cat)
setMaxConcurrencyForCategory
public final java.lang.Integer setMaxConcurrencyForCategory(JobCategory cat,
java.lang.Integer max)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
setMaxThreadsForAllExclusivityTypes
public final void setMaxThreadsForAllExclusivityTypes(java.lang.Integer max)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
clearMaxThreadsForAllExclusivityTypes
public final void clearMaxThreadsForAllExclusivityTypes()
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
dispose
public final void dispose()
- Specified by:
dispose
in interface Disposeable
getUnfinishedRootJobsCount
public int getUnfinishedRootJobsCount()
getRunningThreadsCount
public int getRunningThreadsCount()
addJobPoolMessageListenerSwing
public void addJobPoolMessageListenerSwing(JobPoolMessageListener l)
addJobPoolMessageListener
public void addJobPoolMessageListener(JobPoolMessageListener l)
removeJobPoolMessageListener
public void removeJobPoolMessageListener(JobPoolMessageListener l)