org.alfresco.filesys.repo
Class NodeEventQueue

java.lang.Object
  extended by org.alfresco.filesys.repo.NodeEventQueue

public class NodeEventQueue
extends java.lang.Object

Node Event Queue Class


Constructor Summary
NodeEventQueue()
          Class constructor
 
Method Summary
 void addEvent(NodeEvent event)
          Add an event to the queue
 int numberOfEvents()
          Return the number of events in the queue
 NodeEvent removeEvent()
          Remove an event from the head of the queue
 NodeEvent removeSessionNoWait()
          Remove an event from the queue, without waiting if there are no events in the queue
 void waitUntilEmpty()
          Wait for the event queue to be emptied
 void waitWhileEmpty()
          Wait for an event to be added to the queue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeEventQueue

public NodeEventQueue()
Class constructor

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:
evetn - 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.InterruptedException
Wait for an event to be added to the queue

Throws:
java.lang.InterruptedException

waitUntilEmpty

public final void waitUntilEmpty()
                          throws java.lang.InterruptedException
Wait for the event queue to be emptied

Throws:
java.lang.InterruptedException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.