|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.echarts.util.AcceptorAcceptor
public final class AcceptorAcceptor
Permits threads to wait on more than one FIFOAcceptor at a time. Acceptors have different relative priorities such that if a message exists in more than one FIFOAcceptor, then the FIFOAcceptor with higher priority will be accessed. A given FIFOAcceptor may be associated with at most one AcceptorAcceptor at a time.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Constructor Summary | |
---|---|
AcceptorAcceptor(int size)
Create an AcceptorAcceptor of given size > 0. |
Method Summary | |
---|---|
java.lang.Object |
accept()
Wait for an element to become available in one of the monitored FIFOAcceptors. |
java.lang.Object |
acceptNoBlock()
Check for an element to become available in one of the monitored FIFOAcceptors. |
void |
addAcceptor(FIFOAcceptor acceptor,
int priority)
Adds a FIFOAcceptor to set of FIFOAcceptors associated with this AcceptorAcceptor. |
void |
clear()
Removes all FIFOAcceptors from this AcceptorAcceptor, and clears AcceptorAcceptor's list of outstanding FIFOAcceptors. |
void |
removeAcceptor(FIFOAcceptor acceptor,
int priority)
|
void |
update()
Called by a FIFOAcceptor when the FIFOAcceptor has an available element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public AcceptorAcceptor(int size)
Method Detail |
---|
public final java.lang.Object acceptNoBlock()
public final java.lang.Object accept() throws java.lang.InterruptedException
java.lang.InterruptedException
public final void addAcceptor(FIFOAcceptor acceptor, int priority)
public final void removeAcceptor(FIFOAcceptor acceptor, int priority)
public final void update()
public final void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |