Package org.glassfish.grizzly.threadpool
Class GrizzlyExecutorService
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- org.glassfish.grizzly.threadpool.GrizzlyExecutorService
-
- All Implemented Interfaces:
java.util.concurrent.Executor,java.util.concurrent.ExecutorService,MonitoringAware<ThreadPoolProbe>
public class GrizzlyExecutorService extends java.util.concurrent.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, java.util.concurrent.TimeUnit unit)static GrizzlyExecutorServicecreateInstance()static GrizzlyExecutorServicecreateInstance(ThreadPoolConfig cfg)voidexecute(java.lang.Runnable r)ThreadPoolConfiggetConfiguration()MonitoringConfig<ThreadPoolProbe>getMonitoringConfig()Return the object associatedMonitoringConfig.booleanisShutdown()booleanisTerminated()GrizzlyExecutorServicereconfigure(ThreadPoolConfig config)Sets theThreadPoolConfigprotected voidsetImpl(ThreadPoolConfig cfg)voidshutdown()java.util.List<java.lang.Runnable>shutdownNow()
-
-
-
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 interfacejava.util.concurrent.ExecutorService
-
shutdownNow
public java.util.List<java.lang.Runnable> shutdownNow()
- Specified by:
shutdownNowin interfacejava.util.concurrent.ExecutorService
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdownin interfacejava.util.concurrent.ExecutorService
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminatedin interfacejava.util.concurrent.ExecutorService
-
execute
public void execute(java.lang.Runnable r)
- Specified by:
executein interfacejava.util.concurrent.Executor
-
awaitTermination
public boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException- Specified by:
awaitTerminationin interfacejava.util.concurrent.ExecutorService- Throws:
java.lang.InterruptedException
-
getMonitoringConfig
public MonitoringConfig<ThreadPoolProbe> getMonitoringConfig()
Return the object associatedMonitoringConfig.- Specified by:
getMonitoringConfigin interfaceMonitoringAware<ThreadPoolProbe>- Returns:
- the object associated
MonitoringConfig.
-
-