Interface ConcurrentQueue<E>
-
- All Known Implementing Classes:
DisruptorBlockingQueue
,MPMCBlockingQueue
,MPMCConcurrentQueue
,MultithreadConcurrentQueue
,PushPullBlockingQueue
,PushPullConcurrentQueue
public interface ConcurrentQueue<E>
A very high performance blocking buffer, based on Disruptor approach to queues Created by jcairns on 5/28/14.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
capacity()
void
clear()
clear the queue of all elementsboolean
contains(java.lang.Object o)
boolean
isEmpty()
boolean
offer(E e)
Add element t to the ringE
peek()
return the first element in the queueE
poll()
remove the first element from the queue and return itint
remove(E[] e)
return all elements in the queue to the provided array, up to the size of the provided array.int
size()
-
-
-
Method Detail
-
offer
boolean offer(E e)
Add element t to the ring- Parameters:
e
- - element to offer- Returns:
- boolean - true if the operation succeeded
-
poll
E poll()
remove the first element from the queue and return it- Returns:
- T
-
peek
E peek()
return the first element in the queue- Returns:
- E - The element
-
size
int size()
- Returns:
- int - the number of elements in the queue
-
capacity
int capacity()
- Returns:
- int - the capacity of the queue
-
isEmpty
boolean isEmpty()
- Returns:
- boolean - true if the queue is currently empty
-
contains
boolean contains(java.lang.Object o)
- Parameters:
o
- - the object to test- Returns:
- boolean - true if specified object is contained in the queue
-
remove
int remove(E[] e)
return all elements in the queue to the provided array, up to the size of the provided array.- Parameters:
e
- - The element array- Returns:
- int - the number of elements added to t
-
clear
void clear()
clear the queue of all elements
-
-