public class ThreadRequestQueue
extends java.lang.Object
Provides a request queue for a thread pool of worker threads.
Constructor and Description |
---|
ThreadRequestQueue()
Class constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addRequest(ThreadRequest req)
Add a request to the queue
|
void |
addRequests(java.util.List reqList)
Add requests to the queue
|
int |
numberOfRequests()
Return the number of requests in the queue
|
ThreadRequest |
removeRequest()
Remove a request from the head of the queue
|
void |
waitUntilEmpty()
Wait for the request queue to be emptied
|
void |
waitWhileEmpty()
Wait for a request to be added to the queue
|
public final int numberOfRequests()
public final void addRequest(ThreadRequest req)
req
- ThreadRequestpublic final void addRequests(java.util.List reqList)
reqList
- Listpublic final ThreadRequest removeRequest() throws java.lang.InterruptedException
java.lang.InterruptedException
public final void waitWhileEmpty() throws java.lang.InterruptedException
java.lang.InterruptedException
public final void waitUntilEmpty() throws java.lang.InterruptedException
java.lang.InterruptedException
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.