jrunx.scheduler
Class ThreadPoolService
jrunx.kernel.ServiceAdapter
|
+--jrunx.scheduler.ThreadPoolService
- All Implemented Interfaces:
- javax.naming.Referenceable, java.io.Serializable, Service, ServiceMBean, ThreadPoolServiceMBean
- Direct Known Subclasses:
- NetworkService, SchedulerService
- public abstract class ThreadPoolService
- extends ServiceAdapter
- implements ThreadPoolServiceMBean
- See Also:
- Serialized Form
| Fields inherited from class jrunx.kernel.ServiceAdapter |
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER |
| Methods inherited from class jrunx.kernel.ServiceAdapter |
bind, destroy, findObjectInstance, findObjectInstance, findObjectInstance, getBindToJNDI, getDeactivated, getDomainName, getDomainSearchPath, getJRunService, getLogger, getName, getParentService, getReference, getResourceManager, getServerName, getServerProperties, getStatus, invokeMethod, isInPartition, isPartition, lookup, postDeregister, postRegister, preDeregister, preRegister, requestServer, scheduleRunnable, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, stop, toString, unbind, unscheduleRunnable, updateStatus |
| Methods inherited from interface jrunx.kernel.ServiceMBean |
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind |
threadPool
protected ThreadPool threadPool
metrics
protected Metrics metrics
ThreadPoolService
public ThreadPoolService()
init
public void init()
throws java.lang.Exception
- Description copied from class:
ServiceAdapter
- Not every service needs to init, implement it out of convenience.
- Specified by:
init in interface Service- Overrides:
init in class ServiceAdapter
start
public void start()
throws java.lang.Exception
- Description copied from class:
ServiceAdapter
- Every service other than mere data collections should start
- Specified by:
start in interface Service- Overrides:
start in class ServiceAdapter
getRunnableFactory
public abstract RunnableFactory getRunnableFactory()
getMetrics
public Metrics getMetrics()
createMetrics
public Metrics createMetrics()
getMetricsPrefix
public abstract java.lang.String getMetricsPrefix()
getMinHandlerThreads
public int getMinHandlerThreads()
- Description copied from interface:
ThreadPoolServiceMBean
- Gets the minimum number of handler threads for the thread pool
- Specified by:
getMinHandlerThreads in interface ThreadPoolServiceMBean
- Following copied from interface:
jrunx.scheduler.ThreadPoolServiceMBean
- Returns:
- The minimum number of handler threads
setMinHandlerThreads
public void setMinHandlerThreads(int minThreads)
- Description copied from interface:
ThreadPoolServiceMBean
- Sets the minimum number of handler threads for the thread pool
- Specified by:
setMinHandlerThreads in interface ThreadPoolServiceMBean
- Following copied from interface:
jrunx.scheduler.ThreadPoolServiceMBean
- Parameters:
minThreads - The minimum number of handler threads
getMaxHandlerThreads
public int getMaxHandlerThreads()
- Description copied from interface:
ThreadPoolServiceMBean
- Gets the maximum number of handler threads for the thread pool
- Specified by:
getMaxHandlerThreads in interface ThreadPoolServiceMBean
- Following copied from interface:
jrunx.scheduler.ThreadPoolServiceMBean
- Returns:
- The maximum number of handler threads
setMaxHandlerThreads
public void setMaxHandlerThreads(int maxThreads)
- Description copied from interface:
ThreadPoolServiceMBean
- Sets the maximum number of handler threads for the thread pool
- Specified by:
setMaxHandlerThreads in interface ThreadPoolServiceMBean
- Following copied from interface:
jrunx.scheduler.ThreadPoolServiceMBean
- Parameters:
maxThreads - The minimum number of handler threads
getActiveHandlerThreads
public int getActiveHandlerThreads()
- Description copied from interface:
ThreadPoolServiceMBean
- Gets the number of active handler threads for the thread pool
- Specified by:
getActiveHandlerThreads in interface ThreadPoolServiceMBean
- Following copied from interface:
jrunx.scheduler.ThreadPoolServiceMBean
- Returns:
- The number of active handler threads
setActiveHandlerThreads
public void setActiveHandlerThreads(int activeThreads)
- Description copied from interface:
ThreadPoolServiceMBean
- Sets the number of active handler threads for the thread pool
- Specified by:
setActiveHandlerThreads in interface ThreadPoolServiceMBean
- Following copied from interface:
jrunx.scheduler.ThreadPoolServiceMBean
- Parameters:
actvieThreads - The number of active handler threads
setThreadWaitTimeout
public void setThreadWaitTimeout(int timeoutSeconds)
- Description copied from interface:
ThreadPoolServiceMBean
- Sets the timeout value before giving up waiting for a thread to
become available. The value is in seconds. The default value
is 20 seconds.
- Specified by:
setThreadWaitTimeout in interface ThreadPoolServiceMBean
getThreadWaitTimeout
public int getThreadWaitTimeout()
- Description copied from interface:
ThreadPoolServiceMBean
- Gets the timeout value before giving up waiting for a thread to
become available. The value is in seconds.
- Specified by:
getThreadWaitTimeout in interface ThreadPoolServiceMBean
Copyright � 2002 Macromedia Corporation. All Rights Reserved.