|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Queue<T extends Queueable>
Queue interface.
Method Summary | |
---|---|
boolean |
add(T element)
Add object to the queue. |
boolean |
addOutOfTurn(T element)
Add object to the queue out of turn. |
void |
clear()
Clears the queue. |
void |
commit()
Removes polled object from the queue. |
void |
initialize()
Initializes queue. |
boolean |
isAllEmpty()
|
boolean |
isEmpty()
Checks if queue is currently empty. |
boolean |
isOutOfTurnOnlyMode()
Out of turn messages only mode. |
void |
notifyAllApplication()
Notify a new application message exists. |
void |
notifyAllSession()
Notify a new session message exists. |
T |
poll()
Poll object from the queue (doesn't remove it from queue yet!). |
void |
setOutOfTurnOnlyMode(boolean mode)
Out of turn messages only mode. |
void |
shutdown()
Gracefully shutdowns queue. |
int |
size()
Returns current queue size. |
int |
totalSize()
Returns current total queue size. |
Method Detail |
---|
void initialize()
boolean add(T element)
element
- the element
boolean addOutOfTurn(T element)
element
- the element
void setOutOfTurnOnlyMode(boolean mode)
mode
- the modeboolean isAllEmpty()
T poll()
commit()
void commit()
IllegalStateException
boolean isEmpty()
int size()
int totalSize()
void clear()
void shutdown()
boolean isOutOfTurnOnlyMode()
void notifyAllApplication()
The methods works only if turn "mode on" is off.
setOutOfTurnOnlyMode(boolean)
void notifyAllSession()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |