public class RequestQueue extends Object
Provides a request queue for a thread pool of worker threads.
Constructor and Description |
---|
RequestQueue()
Class constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addRequest(Object req)
Add a request to the queue
|
int |
numberOfRequests()
Return the number of requests in the queue
|
Object |
removeRequest()
Remove a request from the head of the queue
|
void |
waitUntilEmpty()
Wait for the file request queue to be emptied
|
void |
waitWhileEmpty()
Wait for a write request to be added to the queue
|
public final int numberOfRequests()
public final void addRequest(Object req)
req
- Objectpublic final Object removeRequest() throws InterruptedException
InterruptedException
public final void waitWhileEmpty() throws InterruptedException
InterruptedException
public final void waitUntilEmpty() throws InterruptedException
InterruptedException
Copyright © 2005–2017 Alfresco Software. All rights reserved.