Package org.alfresco.filesys.repo
Class NodeEventQueue
- java.lang.Object
-
- org.alfresco.filesys.repo.NodeEventQueue
-
public class NodeEventQueue extends java.lang.ObjectNode Event Queue Class- Author:
- gkspencer
-
-
Constructor Summary
Constructors Constructor Description NodeEventQueue()Class constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEvent(NodeEvent event)Add an event to the queueintnumberOfEvents()Return the number of events in the queueNodeEventremoveEvent()Remove an event from the head of the queueNodeEventremoveSessionNoWait()Remove an event from the queue, without waiting if there are no events in the queuevoidwaitUntilEmpty()Wait for the event queue to be emptiedvoidwaitWhileEmpty()Wait for an event to be added to the queue
-
-
-
Method Detail
-
numberOfEvents
public final int numberOfEvents()
Return the number of events in the queue- Returns:
- int
-
addEvent
public final void addEvent(NodeEvent event)
Add an event to the queue- Parameters:
event- NodeEvent
-
removeEvent
public final NodeEvent removeEvent() throws java.lang.InterruptedException
Remove an event from the head of the queue- Returns:
- NodeEvent
- Throws:
java.lang.InterruptedException
-
removeSessionNoWait
public final NodeEvent removeSessionNoWait()
Remove an event from the queue, without waiting if there are no events in the queue- Returns:
- NodeEvent
-
waitWhileEmpty
public final void waitWhileEmpty() throws java.lang.InterruptedExceptionWait for an event to be added to the queue- Throws:
java.lang.InterruptedException
-
waitUntilEmpty
public final void waitUntilEmpty() throws java.lang.InterruptedExceptionWait for the event queue to be emptied- Throws:
java.lang.InterruptedException
-
-