Class SimpleFIFOQueue
- java.lang.Object
-
- org.eclipse.ecf.core.sharedobject.util.SimpleFIFOQueue
-
- All Implemented Interfaces:
ISimpleFIFOQueue
public class SimpleFIFOQueue extends Object implements ISimpleFIFOQueue
-
-
Constructor Summary
Constructors Constructor Description SimpleFIFOQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close this queue.Object
dequeue()
Dequeue an object from off theboolean
enqueue(Object obj)
Enqueue given object.Object[]
flush()
boolean
isEmpty()
boolean
isStopped()
Object
peekQueue()
Object
peekQueue(long waitMS)
Object
removeHead()
int
size()
void
stop()
String
toString()
-
-
-
Method Detail
-
enqueue
public boolean enqueue(Object obj)
Description copied from interface:ISimpleFIFOQueue
Enqueue given object. Blocks until enqueue is completed.- Specified by:
enqueue
in interfaceISimpleFIFOQueue
- Parameters:
obj
- the Object to enqueue- Returns:
- true if enqueued, false if not successfully enqueue
-
dequeue
public Object dequeue()
Description copied from interface:ISimpleFIFOQueue
Dequeue an object from off the- Specified by:
dequeue
in interfaceISimpleFIFOQueue
- Returns:
- Object dequeued
-
peekQueue
public Object peekQueue()
- Specified by:
peekQueue
in interfaceISimpleFIFOQueue
- Returns:
- Object at head of queue without removing it from queue
-
peekQueue
public Object peekQueue(long waitMS)
-
removeHead
public Object removeHead()
- Specified by:
removeHead
in interfaceISimpleFIFOQueue
- 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 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 interfaceISimpleFIFOQueue
-
-