Package org.glassfish.grizzly.threadpool
Class GrizzlyExecutorService
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- org.glassfish.grizzly.threadpool.GrizzlyExecutorService
-
- All Implemented Interfaces:
Executor,ExecutorService,MonitoringAware<ThreadPoolProbe>
public class GrizzlyExecutorService extends AbstractExecutorService implements MonitoringAware<ThreadPoolProbe>
- Author:
- gustav trede
-
-
Field Summary
Fields Modifier and Type Field Description protected ThreadPoolConfigconfig
-
Constructor Summary
Constructors Modifier Constructor Description protectedGrizzlyExecutorService(ThreadPoolConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanawaitTermination(long timeout, TimeUnit unit)static GrizzlyExecutorServicecreateInstance()static GrizzlyExecutorServicecreateInstance(ThreadPoolConfig cfg)voidexecute(Runnable r)ThreadPoolConfiggetConfiguration()MonitoringConfig<ThreadPoolProbe>getMonitoringConfig()Return the object associatedMonitoringConfig.booleanisShutdown()booleanisTerminated()GrizzlyExecutorServicereconfigure(ThreadPoolConfig config)Sets theThreadPoolConfigprotected voidsetImpl(ThreadPoolConfig cfg)voidshutdown()List<Runnable>shutdownNow()-
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
-
-
-
-
Field Detail
-
config
protected volatile ThreadPoolConfig config
-
-
Constructor Detail
-
GrizzlyExecutorService
protected GrizzlyExecutorService(ThreadPoolConfig config)
-
-
Method Detail
-
createInstance
public static GrizzlyExecutorService createInstance()
- Returns:
GrizzlyExecutorService
-
createInstance
public static GrizzlyExecutorService createInstance(ThreadPoolConfig cfg)
- Parameters:
cfg-ThreadPoolConfig- Returns:
GrizzlyExecutorService
-
setImpl
protected final void setImpl(ThreadPoolConfig cfg)
-
reconfigure
public GrizzlyExecutorService reconfigure(ThreadPoolConfig config)
Sets theThreadPoolConfig- Parameters:
config-- Returns:
- returns
GrizzlyExecutorService
-
getConfiguration
public ThreadPoolConfig getConfiguration()
- Returns:
- config -
ThreadPoolConfig
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceExecutorService
-
shutdownNow
public List<Runnable> shutdownNow()
- Specified by:
shutdownNowin interfaceExecutorService
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdownin interfaceExecutorService
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminatedin interfaceExecutorService
-
awaitTermination
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException- Specified by:
awaitTerminationin interfaceExecutorService- Throws:
InterruptedException
-
getMonitoringConfig
public MonitoringConfig<ThreadPoolProbe> getMonitoringConfig()
Return the object associatedMonitoringConfig.- Specified by:
getMonitoringConfigin interfaceMonitoringAware<ThreadPoolProbe>- Returns:
- the object associated
MonitoringConfig.
-
-