org.eclipse.ecf.core.sharedobject.util
Class SimpleFIFOQueue

java.lang.Object
  extended by org.eclipse.ecf.core.sharedobject.util.SimpleFIFOQueue
All Implemented Interfaces:
ISimpleFIFOQueue

public class SimpleFIFOQueue
extends java.lang.Object
implements ISimpleFIFOQueue


Constructor Summary
SimpleFIFOQueue()
           
 
Method Summary
 void close()
          Close this queue.
 java.lang.Object dequeue()
          Dequeue an object from off the
 boolean enqueue(java.lang.Object obj)
          Enqueue given object.
 java.lang.Object[] flush()
           
 boolean isEmpty()
           
 boolean isStopped()
           
 java.lang.Object peekQueue()
           
 java.lang.Object peekQueue(long waitMS)
           
 java.lang.Object removeHead()
           
 int size()
           
 void stop()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleFIFOQueue

public SimpleFIFOQueue()
Method Detail

enqueue

public boolean enqueue(java.lang.Object obj)
Description copied from interface: ISimpleFIFOQueue
Enqueue given object. Blocks until enqueue is completed.

Specified by:
enqueue in interface ISimpleFIFOQueue
Parameters:
obj - the Object to enqueue
Returns:
true if enqueued, false if not successfully enqueue

dequeue

public java.lang.Object dequeue()
Description copied from interface: ISimpleFIFOQueue
Dequeue an object from off the

Specified by:
dequeue in interface ISimpleFIFOQueue
Returns:
Object dequeued

peekQueue

public java.lang.Object peekQueue()
Specified by:
peekQueue in interface ISimpleFIFOQueue
Returns:
Object at head of queue without removing it from queue

peekQueue

public java.lang.Object peekQueue(long waitMS)

removeHead

public java.lang.Object removeHead()
Specified by:
removeHead in interface ISimpleFIFOQueue
Returns:
Object that is head of queue. Removes head from queue

isEmpty

public boolean isEmpty()

stop

public void stop()

isStopped

public boolean isStopped()

size

public int size()

flush

public java.lang.Object[] flush()

close

public void close()
Description copied from interface: ISimpleFIFOQueue
Close this queue. Once closed, the underlying queue cannot be used again

Specified by:
close in interface ISimpleFIFOQueue

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object