Class ThreadPool
java.lang.Object
java.lang.ThreadGroup
org.jpos.util.ThreadPool
- All Implemented Interfaces:
Thread.UncaughtExceptionHandler, Configurable, Loggeable, LogSource, ThreadPoolMBean
@Deprecated
public class ThreadPool
extends ThreadGroup
implements LogSource, Loggeable, Configurable, ThreadPoolMBean
Deprecated.
Used Executor framework
Implements a ThreadPool with the ability to run simple Runnable
tasks as well as Jobs (supervised Runnable tasks)
- Since:
- 1.1
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Default constructor for ThreadPoolThreadPool(int poolSize, int maxPoolSize) Deprecated.ThreadPool(int poolSize, int maxPoolSize, String name) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.voiddump(PrintStream p, String indent) Deprecated.voidDeprecated.intDeprecated.intDeprecated.intDeprecated.intDeprecated.Deprecated.intDeprecated.intDeprecated.intDeprecated.getRealm()Deprecated.static ThreadPoolgetThreadPool(String name) Deprecated.Retrieves a thread pool from NameRegistrar given its name, unique identifier.voidDeprecated.voidDeprecated.voidDeprecated.Methods inherited from class ThreadGroup
activeCount, activeGroupCount, checkAccess, destroy, enumerate, enumerate, enumerate, enumerate, getMaxPriority, getName, getParent, interrupt, isDaemon, isDestroyed, list, parentOf, setDaemon, setMaxPriority, toString, uncaughtException
-
Field Details
-
DEFAULT_MAX_THREADS
-
-
Constructor Details
-
ThreadPool
Deprecated.- Parameters:
poolSize- starting pool sizemaxPoolSize- maximum number of threads on this pool
-
ThreadPool
Deprecated.- Parameters:
poolSize- starting pool sizemaxPoolSize- maximum number of threads on this poolname- pool name
-
ThreadPool
-
-
Method Details
-
close
Deprecated. -
execute
Deprecated.- Throws:
BlockingQueue.Closed
-
dump
Deprecated. -
getJobCount
Deprecated.- Specified by:
getJobCountin interfaceThreadPoolMBean- Returns:
- number of jobs processed by this pool
-
getPoolSize
Deprecated.- Specified by:
getPoolSizein interfaceThreadPoolMBean- Returns:
- number of running threads
-
getMaxPoolSize
Deprecated.- Specified by:
getMaxPoolSizein interfaceThreadPoolMBean- Returns:
- max number of active threads allowed
-
getActiveCount
-
getIdleCount
Deprecated.- Specified by:
getIdleCountin interfaceThreadPoolMBean- Returns:
- number of idle threads
-
getAvailableCount
-
getPendingCount
Deprecated.- Specified by:
getPendingCountin interfaceThreadPoolMBean- Returns:
- number of Pending jobs
-
supervise
Deprecated. -
setLogger
-
getRealm
-
getLogger
-
setConfiguration
Deprecated.- Specified by:
setConfigurationin interfaceConfigurable- Parameters:
cfg- Configuration object- Throws:
ConfigurationException
-
getThreadPool
Deprecated.Retrieves a thread pool from NameRegistrar given its name, unique identifier.- Parameters:
name- Name of the thread pool to retrieve, must be the same as the name property of the thread-pool tag in the QSP config file- Returns:
- returns the retrieved instance of thread pool
- Throws:
NameRegistrar.NotFoundException- thrown when there is not a thread-pool registered under this name.
-