|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.server.queue.AbstractJPPFQueue
public abstract class AbstractJPPFQueue
Abstract superclass for all JPPFQueue implementations.
| Field Summary | |
|---|---|
protected int |
latestMaxSize
|
protected ReentrantLock |
lock
Used for synchronized access to the queue. |
protected List<QueueListener> |
queueListeners
The list of registered listeners. |
protected TreeMap<Integer,List<BundleWrapper>> |
sizeMap
An ordered map of bundle sizes, mapping to a list of bundles of this size. |
| Constructor Summary | |
|---|---|
AbstractJPPFQueue()
|
|
| Method Summary | |
|---|---|
void |
addQueueListener(QueueListener listener)
Add a listener to the list of listeners. |
protected void |
fireQueueEvent(QueueEvent event)
Notify all queue listeners of an event. |
ReentrantLock |
getLock()
Get the lock used for synchronized access to the queue. |
List<QueueListener> |
getQueueListeners()
return a list of all the registered listee ners. |
protected int |
getSize(BundleWrapper bundleWrapper)
Get the bundle size to use for bundle size tuning. |
void |
removeQueueListener(QueueListener listener)
Remove a listener from the list of listeners. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jppf.server.queue.JPPFQueue |
|---|
addBundle, getMaxBundleSize, isEmpty, nextBundle, nextBundle, removeBundle |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Field Detail |
|---|
protected ReentrantLock lock
protected TreeMap<Integer,List<BundleWrapper>> sizeMap
protected int latestMaxSize
protected List<QueueListener> queueListeners
| Constructor Detail |
|---|
public AbstractJPPFQueue()
| Method Detail |
|---|
public void addQueueListener(QueueListener listener)
listener - the listener to add to the list.public void removeQueueListener(QueueListener listener)
listener - the listener to rmeove from the list.public List<QueueListener> getQueueListeners()
protected int getSize(BundleWrapper bundleWrapper)
bundleWrapper - the bundle to get the size from.
protected void fireQueueEvent(QueueEvent event)
event - - the event to notify of.public ReentrantLock getLock()
ReentrantLock instance.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||