org.glassfish.grizzly.asyncqueue
Class TaskQueue.QueueMonitor
java.lang.Object
org.glassfish.grizzly.asyncqueue.TaskQueue.QueueMonitor
- Enclosing class:
- TaskQueue<E>
public abstract static class TaskQueue.QueueMonitor
- extends Object
Notification mechanism which will be invoked when
TaskQueue.releaseSpace(int) or TaskQueue.releaseSpaceAndNotify(int)
is called.
|
Method Summary |
abstract void |
onNotify()
Action(s) to perform when the current queue space meets the conditions
mandated by shouldNotify(). |
abstract boolean |
shouldNotify()
This method will be invoked to determine if onNotify() should
be called. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TaskQueue.QueueMonitor
public TaskQueue.QueueMonitor()
onNotify
public abstract void onNotify()
throws IOException
- Action(s) to perform when the current queue space meets the conditions
mandated by
shouldNotify().
- Throws:
IOException
shouldNotify
public abstract boolean shouldNotify()
- This method will be invoked to determine if
onNotify() should
be called. It's recommended that implementations of this method be
as light-weight as possible as this method may be invoked multiple
times.
- Returns:
true if onNotify() should be invoked on
this QueueMonitor at the point in time shouldNotify
was called, otherwise returns false
Copyright © 2011 Oracle Corpration. All Rights Reserved.