org.apache.manifoldcf.authorities.system
Class RequestQueue
java.lang.Object
org.apache.manifoldcf.authorities.system.RequestQueue
public class RequestQueue
- extends java.lang.Object
This class describes a authorization request queue, which has a "stuffer" servlet and many "reader" threads.
The queue manages thread synchronization so that (a) the "stuffer" servlet blindly appends authority requests, and
then waits for these requests to be completed, and
(b) the "reader" threads block if queue is empty.
The objects being queued are all AuthRequest objects.
|
Field Summary |
static java.lang.String |
_rcsid
|
protected java.util.ArrayList |
queue
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
queue
protected java.util.ArrayList queue
RequestQueue
public RequestQueue()
- Constructor.
addRequest
public void addRequest(AuthRequest dd)
- Add a request to the queue.
- Parameters:
dd - is the request.
getRequest
public AuthRequest getRequest()
throws java.lang.InterruptedException
- Pull the next request off the queue, but wait if there is
nothing there.
- Returns:
- the request to be processed.
- Throws:
java.lang.InterruptedException