public class SingleEntryAsyncQueue<T> extends Object
Holds the command to be next run in the browser
This class uses reentrant locks in order to allow the same thread to populate the queue as is waiting for it, which is what currently happens on during browser startup.Modifier and Type | Field and Description |
---|---|
static long |
MILLISECONDS |
Constructor and Description |
---|
SingleEntryAsyncQueue(long timeoutInSecs) |
Modifier and Type | Method and Description |
---|---|
long |
getTimeoutInSeconds() |
protected boolean |
isEmpty() |
protected boolean |
isPoison(T poisonSample) |
protected T |
peek() |
protected boolean |
poisonPollers()
Clears the contents of the holder (if any) and also feeds 'poison' data a pending listener (if
any);
|
protected T |
pollToGetContentUntilTimeout() |
protected boolean |
putContent(T thing) |
protected void |
setPoison(T poisonInstance) |
public static final long MILLISECONDS
public long getTimeoutInSeconds()
protected void setPoison(T poisonInstance)
protected boolean isPoison(T poisonSample)
protected T pollToGetContentUntilTimeout()
protected boolean putContent(T thing)
protected boolean isEmpty()
protected T peek()
protected boolean poisonPollers()
Copyright © 2013. All rights reserved.