Package org.glassfish.grizzly.threadpool
Class FixedThreadPool
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- org.glassfish.grizzly.threadpool.AbstractThreadPool
-
- org.glassfish.grizzly.threadpool.FixedThreadPool
-
- All Implemented Interfaces:
Thread.UncaughtExceptionHandler
,Executor
,ExecutorService
,MonitoringAware<ThreadPoolProbe>
public class FixedThreadPool extends AbstractThreadPool
Minimalistic fixed thread pool to allow for nice scalability if a good Queue impl is used.- Author:
- gustav trede
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.glassfish.grizzly.threadpool.AbstractThreadPool
AbstractThreadPool.Worker
-
-
Field Summary
Fields Modifier and Type Field Description protected BlockingQueue<Runnable>
workQueue
-
Fields inherited from class org.glassfish.grizzly.threadpool.AbstractThreadPool
config, DEFAULT_IDLE_THREAD_KEEPALIVE_TIMEOUT, DEFAULT_MAX_TASKS_QUEUED, DEFAULT_MAX_THREAD_COUNT, DEFAULT_MIN_THREAD_COUNT, delayedQueue, monitoringConfig, poison, running, stateLock, transactionTimeoutMillis, workers
-
-
Constructor Summary
Constructors Constructor Description FixedThreadPool(ThreadPoolConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(Runnable command)
-
Methods inherited from class org.glassfish.grizzly.threadpool.AbstractThreadPool
afterExecute, awaitTermination, beforeExecute, drain, getConfig, getDefaultThreadFactory, getMonitoringConfig, getQueue, getSize, isShutdown, isTerminated, onMaxNumberOfThreadsReached, onTaskCancelled, onTaskCompletedEvent, onTaskDequeued, onTaskQueued, onTaskQueueOverflow, onWorkerExit, onWorkerStarted, poisonAll, shutdown, shutdownNow, startWorker, toString, uncaughtException, validateNewPoolSize
-
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
-
-
-
-
Field Detail
-
workQueue
protected final BlockingQueue<Runnable> workQueue
-
-
Constructor Detail
-
FixedThreadPool
public FixedThreadPool(ThreadPoolConfig config)
-
-
Method Detail
-
execute
public void execute(Runnable command)
-
-