|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mongodb.util.ThreadPool<T>
@Deprecated public abstract class ThreadPool<T>
A thread pool implementation.
| Constructor Summary | |
|---|---|
ThreadPool(String name,
int numThreads)
Deprecated. Initializes a new thread pool with a given name and number of threads. |
|
ThreadPool(String name,
int numThreads,
int maxQueueSize)
Deprecated. Initializes a new thread pool with a given name, number of threads, and queue size. |
|
| Method Summary | |
|---|---|
abstract void |
handle(T t)
Deprecated. Handles a given object. |
abstract void |
handleError(T t,
Exception e)
Deprecated. Handles a given object and exception. |
int |
inProgress()
Deprecated. |
int |
numThreads()
Deprecated. |
boolean |
offer(T t)
Deprecated. Adds a new object to the pool, if possible. |
int |
queueSize()
Deprecated. Returns the size of the pool's queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadPool(String name,
int numThreads)
name - identifying namenumThreads - the number of threads allowed in the pool
public ThreadPool(String name,
int numThreads,
int maxQueueSize)
name - identifying namenumThreads - the number of threads allowed in the poolmaxQueueSize - the size of the pool entry queue| Method Detail |
|---|
public abstract void handle(T t)
throws Exception
t - the object to handle
Exception
public abstract void handleError(T t,
Exception e)
t - the object to handlee - the exception to handlepublic int queueSize()
public boolean offer(T t)
t - the object to be added
public int inProgress()
public int numThreads()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||