|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asyncobjects.AsyncUnicastServer<AQueue<T>> net.sf.asyncobjects.util.Queue<T>
T
- Element type of the queuepublic class Queue<T>
Object queue. Note that this class is not threadsafe and it should be used
only in context of single vat. The class is a a service that supports
AQueue
interface. However it could be used directly without exporting
it.
Constructor Summary | |
---|---|
Queue()
A constructor |
|
Queue(int maxWaiters,
int maxValues)
A constructor |
Method Summary | |
---|---|
Promise<T> |
get()
Get object from the queue |
Promise<Void> |
put(T o)
Put object from the queue |
void |
smash(Throwable t)
Smash all pending waiters in the queue |
Methods inherited from class net.sf.asyncobjects.AsyncUnicastServer |
---|
dereference, export, isImmediate, myVat, promise |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.asyncobjects.AsyncObject |
---|
dereference, isImmediate |
Constructor Detail |
---|
public Queue(int maxWaiters, int maxValues)
maxWaiters
- maximum amount of waiters, -1 means unilmitedmaxValues
- maximum amount of values pending in the queue, -1 means
unilmitedpublic Queue()
Method Detail |
---|
public Promise<T> get()
AQueue
get
in interface AQueue<T>
AQueue.get()
public Promise<Void> put(T o)
AQueue
put
in interface AQueue<T>
o
- an object to put
AQueue.put(java.lang.Object)
public void smash(Throwable t)
t
- a problem to smash pending waiters with
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |