org.glassfish.grizzly.threadpool
Class GrizzlyExecutorService

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by org.glassfish.grizzly.threadpool.GrizzlyExecutorService
All Implemented Interfaces:
java.util.concurrent.Executor, java.util.concurrent.ExecutorService, JmxMonitoringAware<ThreadPoolProbe>, MonitoringAware<ThreadPoolProbe>

public class GrizzlyExecutorService
extends java.util.concurrent.AbstractExecutorService
implements JmxMonitoringAware<ThreadPoolProbe>

Author:
gustav trede

Field Summary
protected  ThreadPoolConfig config
           
 
Constructor Summary
protected GrizzlyExecutorService(ThreadPoolConfig config)
           
 
Method Summary
 boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
           
static GrizzlyExecutorService createInstance()
           
static GrizzlyExecutorService createInstance(ThreadPoolConfig cfg)
           
 void execute(java.lang.Runnable r)
           
 ThreadPoolConfig getConfiguration()
           
 JmxMonitoringConfig<ThreadPoolProbe> getMonitoringConfig()
          Return the object associated JmxMonitoringConfig.
 boolean isShutdown()
           
 boolean isTerminated()
           
 GrizzlyExecutorService reconfigure(ThreadPoolConfig config)
          Sets the ThreadPoolConfig
protected  void setImpl(ThreadPoolConfig cfg)
           
 void shutdown()
           
 java.util.List<java.lang.Runnable> shutdownNow()
           
 
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, toString, wait, wait, wait
 

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 the ThreadPoolConfig

Parameters:
config -
Returns:
returns GrizzlyExecutorService

getConfiguration

public ThreadPoolConfig getConfiguration()
Returns:
config - ThreadPoolConfig

shutdown

public void shutdown()
Specified by:
shutdown in interface java.util.concurrent.ExecutorService

shutdownNow

public java.util.List<java.lang.Runnable> shutdownNow()
Specified by:
shutdownNow in interface java.util.concurrent.ExecutorService

isShutdown

public boolean isShutdown()
Specified by:
isShutdown in interface java.util.concurrent.ExecutorService

isTerminated

public boolean isTerminated()
Specified by:
isTerminated in interface java.util.concurrent.ExecutorService

execute

public void execute(java.lang.Runnable r)
Specified by:
execute in interface java.util.concurrent.Executor

awaitTermination

public boolean awaitTermination(long timeout,
                                java.util.concurrent.TimeUnit unit)
                         throws java.lang.InterruptedException
Specified by:
awaitTermination in interface java.util.concurrent.ExecutorService
Throws:
java.lang.InterruptedException

getMonitoringConfig

public JmxMonitoringConfig<ThreadPoolProbe> getMonitoringConfig()
Return the object associated JmxMonitoringConfig.

Specified by:
getMonitoringConfig in interface JmxMonitoringAware<ThreadPoolProbe>
Specified by:
getMonitoringConfig in interface MonitoringAware<ThreadPoolProbe>
Returns:
the object associated JmxMonitoringConfig.


Copyright © 2012 Oracle Corporation. All Rights Reserved.