Interface ISimpleFIFOQueue
-
- All Known Implementing Classes:
SimpleFIFOQueue
public interface ISimpleFIFOQueueSimple queue
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close this queue.Objectdequeue()Dequeue an object from off thebooleanenqueue(Object obj)Enqueue given object.ObjectpeekQueue()ObjectremoveHead()
-
-
-
Method Detail
-
enqueue
boolean enqueue(Object obj)
Enqueue given object. Blocks until enqueue is completed.- Parameters:
obj- the Object to enqueue- Returns:
- true if enqueued, false if not successfully enqueue
-
dequeue
Object dequeue()
Dequeue an object from off the- Returns:
- Object dequeued
-
peekQueue
Object peekQueue()
- Returns:
- Object at head of queue without removing it from queue
-
removeHead
Object removeHead()
- Returns:
- Object that is head of queue. Removes head from queue
-
close
void close()
Close this queue. Once closed, the underlying queue cannot be used again
-
-