public class DefaultPoolWaitQueue extends Object implements PoolWaitQueue
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
_logger |
DEFAULT_WAIT_QUEUE, THREAD_PRIORITY_BASED_WAIT_QUEUE| Constructor and Description |
|---|
DefaultPoolWaitQueue() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToQueue(Object waitMonitor)
resource requesting thread will be added to queue
and the object on which it is made to wait is returned |
protected void |
debug(String debugStatement) |
Collection |
getQueueContents()
used to get access to the list of waiting clients
Useful in case of rolling over from one pool to another eg: transparent-dynamic-pool-reconfiguration. |
int |
getQueueLength()
returns the length of wait queue
|
Object |
peek()
returns (does not remove) the first object (resource request) from the queue
|
Object |
remove()
removes the first object (resource request) from the queue
|
boolean |
removeFromQueue(Object o)
removes the specified object (resource request) from the queue
|
protected static final Logger _logger
public int getQueueLength()
PoolWaitQueuegetQueueLength in interface PoolWaitQueuepublic void addToQueue(Object waitMonitor)
PoolWaitQueueaddToQueue in interface PoolWaitQueuewaitMonitor - Objectpublic boolean removeFromQueue(Object o)
PoolWaitQueueremoveFromQueue in interface PoolWaitQueueo - Objectpublic Object remove()
PoolWaitQueueremove in interface PoolWaitQueuepublic Object peek()
PoolWaitQueuepeek in interface PoolWaitQueuepublic Collection getQueueContents()
PoolWaitQueuegetQueueContents in interface PoolWaitQueueprotected void debug(String debugStatement)
Copyright © 2019. All rights reserved.