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:
- java.lang.Thread.UncaughtExceptionHandler, java.util.concurrent.Executor, java.util.concurrent.ExecutorService, JmxMonitoringAware<ThreadPoolProbe>, 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
|
Field Summary |
protected java.util.concurrent.BlockingQueue<java.lang.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 |
|
Method Summary |
boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit)
not supported |
void |
execute(java.lang.Runnable command)
|
boolean |
isTerminated()
not supported |
| Methods inherited from class org.glassfish.grizzly.threadpool.AbstractThreadPool |
afterExecute, beforeExecute, drain, getConfig, getDefaultThreadFactory, getMonitoringConfig, getQueue, isShutdown, nextThreadId, onMaxNumberOfThreadsReached, 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
workQueue
protected final java.util.concurrent.BlockingQueue<java.lang.Runnable> workQueue
FixedThreadPool
public FixedThreadPool(ThreadPoolConfig config)
execute
public void execute(java.lang.Runnable command)
isTerminated
public boolean isTerminated()
- not supported
awaitTermination
public boolean awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
- not supported
- Throws:
java.lang.InterruptedException
Copyright © 2011 Oracle Corpration. All Rights Reserved.