org.apache.servicemix.executors.impl
Class ManagedExecutor
java.lang.Object
javax.management.StandardMBean
org.apache.servicemix.executors.impl.ManagedExecutor
- All Implemented Interfaces:
- javax.management.DynamicMBean, javax.management.MBeanRegistration, Executor, ManagedExecutorMBean
public class ManagedExecutor
- extends javax.management.StandardMBean
- implements Executor, ManagedExecutorMBean
| Methods inherited from class javax.management.StandardMBean |
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ManagedExecutor
public ManagedExecutor(java.lang.String id,
ExecutorImpl internalExecutor,
ExecutorConfig config)
throws javax.management.NotCompliantMBeanException
- Throws:
javax.management.NotCompliantMBeanException
getId
public java.lang.String getId()
getActiveCount
public int getActiveCount()
- Specified by:
getActiveCount in interface ManagedExecutorMBean
getCompletedTaskCount
public long getCompletedTaskCount()
- Specified by:
getCompletedTaskCount in interface ManagedExecutorMBean
getCorePoolSize
public int getCorePoolSize()
- Specified by:
getCorePoolSize in interface ManagedExecutorMBean
setCorePoolSize
public void setCorePoolSize(int size)
- Specified by:
setCorePoolSize in interface ManagedExecutorMBean
getKeepAliveTimeInMillis
public long getKeepAliveTimeInMillis()
- Specified by:
getKeepAliveTimeInMillis in interface ManagedExecutorMBean
setKeepAliveTimeInMillis
public void setKeepAliveTimeInMillis(long timeInMillis)
- Specified by:
setKeepAliveTimeInMillis in interface ManagedExecutorMBean
getLargestPoolSize
public int getLargestPoolSize()
- Specified by:
getLargestPoolSize in interface ManagedExecutorMBean
getMaximumPoolSize
public int getMaximumPoolSize()
- Specified by:
getMaximumPoolSize in interface ManagedExecutorMBean
setMaximumPoolSize
public void setMaximumPoolSize(int size)
- Specified by:
setMaximumPoolSize in interface ManagedExecutorMBean
getPoolSize
public int getPoolSize()
- Specified by:
getPoolSize in interface ManagedExecutorMBean
getTaskCount
public long getTaskCount()
- Specified by:
getTaskCount in interface ManagedExecutorMBean
getQueueSize
public int getQueueSize()
- Specified by:
getQueueSize in interface ManagedExecutorMBean
isAllowCoreThreadTimeOut
public boolean isAllowCoreThreadTimeOut()
- Specified by:
isAllowCoreThreadTimeOut in interface ManagedExecutorMBean
getNumberOfRejectedExecutions
public long getNumberOfRejectedExecutions()
- Specified by:
getNumberOfRejectedExecutions in interface ManagedExecutorMBean
reset
public void reset()
- Specified by:
reset in interface ManagedExecutorMBean
getShutdownDelay
public long getShutdownDelay()
- Specified by:
getShutdownDelay in interface ManagedExecutorMBean
isBypassIfSynchronous
public boolean isBypassIfSynchronous()
- Specified by:
isBypassIfSynchronous in interface ManagedExecutorMBean
increaseRejectedExecutions
public void increaseRejectedExecutions()
getInternalExecutor
public ExecutorImpl getInternalExecutor()
execute
public void execute(java.lang.Runnable command)
- Description copied from interface:
Executor
- Execute a command.
- Specified by:
execute in interface Executor
- Parameters:
command - the command to execute
shutdown
public void shutdown()
- Description copied from interface:
Executor
- Shutdown this executor.
This must be called to kill all threads.
- Specified by:
shutdown in interface Executor
capacity
public int capacity()
- Description copied from interface:
Executor
- The capacity of the underlying queue (if any)
- Specified by:
capacity in interface Executor
- Returns:
size
public int size()
- Description copied from interface:
Executor
- The current size of the underlying queue (if any)
- Specified by:
size in interface Executor
- Returns:
getDescription
protected java.lang.String getDescription(javax.management.MBeanInfo info)
- Overrides:
getDescription in class javax.management.StandardMBean
getDescription
protected java.lang.String getDescription(javax.management.MBeanFeatureInfo info)
- Overrides:
getDescription in class javax.management.StandardMBean
Copyright © 2005-2011 FuseSource. All Rights Reserved.