Package com.linkedin.alpini.base.queuing
Class QOSFCFSQueue<T extends QOSBasedRequestRunnable>
- java.lang.Object
-
- com.linkedin.alpini.base.queuing.QOSFCFSQueue<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
SimpleQueue<T>
public class QOSFCFSQueue<T extends QOSBasedRequestRunnable> extends java.lang.Object implements SimpleQueue<T>
Simple wrapper over a ConcurrentLinkedQueue to expose FCFS Queue operations.
-
-
Constructor Summary
Constructors Constructor Description QOSFCFSQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(T e)
boolean
isEmpty()
Checks if queue is empty.T
poll()
int
size()
-
-
-
Method Detail
-
add
public boolean add(@Nonnull T e)
- Specified by:
add
in interfaceSimpleQueue<T extends QOSBasedRequestRunnable>
- See Also:
Queue.add(Object)
-
poll
public T poll()
- Specified by:
poll
in interfaceSimpleQueue<T extends QOSBasedRequestRunnable>
- See Also:
Queue.poll()
-
size
public int size()
- Specified by:
size
in interfaceSimpleQueue<T extends QOSBasedRequestRunnable>
- See Also:
Collection.size()
-
isEmpty
public boolean isEmpty()
Description copied from interface:SimpleQueue
Checks if queue is empty.- Specified by:
isEmpty
in interfaceSimpleQueue<T extends QOSBasedRequestRunnable>
- Returns:
true
if Queue contains no elements,false
otherwise.
-
-