O - The type of object for which work is registered and which
identifies a pipeline.public class LimitedPipelineExecutor<O> extends AbstractPipeliningExecutor<O,java.lang.Integer>
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy| Modifier and Type | Field and Description |
|---|---|
protected int |
limit
The maximum amount of pipelines.
|
abortCount, flushPending, logger, objects, shutdownPendingfullSize, realCoreSize, realMaxSize, workSizeactiveThreads, completedTasks, submittedTasks| Constructor and Description |
|---|
LimitedPipelineExecutor(int limit,
Adept2ThreadFactory threadFactory)
Creates a new thread pool executor with the designated amount of pipelines
and threads.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Integer |
getIndexObjectFor(O object)
Gets the object used for managing and executing runnables within this executor.
|
addRunnable, cancelAndFlush, clearAbortedPendingWork, executeShutdown, getOutstandingRunnablesexecute, flushAndExecute, flushAndExecuteUnchecked, isShutdown, restart, restartPendingWork, shutdown, shutdownNow, shutdownRunnableRun, submit, submit, submitAndFlushafterExecute, executebeforeExecute, newTaskFor, newTaskFor, setLogExecuteCallStack, updateQueueLimitallowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated, toStringpublic LimitedPipelineExecutor(int limit,
Adept2ThreadFactory threadFactory)
limit - The maximum number of threads allowed in the pool and also the
maximum number of pipelines.threadFactory - The factory to use when the executor creates a new
thread.protected java.lang.Integer getIndexObjectFor(O object)
getIndexObjectFor in class AbstractObjectSpecificExecutor<O,java.lang.Integer,java.util.Queue<java.lang.Runnable>>object - The object for which a runnable is registered.