public class GridAtomicCacheQueueImpl<T> extends GridCacheQueueAdapter<T>
IgniteQueue
implementation using atomic cache.GridCacheQueueAdapter.AddProcessor, GridCacheQueueAdapter.ClearProcessor, GridCacheQueueAdapter.PollProcessor, GridCacheQueueAdapter.RemoveProcessor
cache, cctx, id, log, QUEUE_REMOVED_IDX, queueKey, queueName
Constructor and Description |
---|
GridAtomicCacheQueueImpl(String queueName,
GridCacheQueueHeader hdr,
GridCacheContext<?,?> cctx) |
Modifier and Type | Method and Description |
---|---|
boolean |
addAll(Collection<? extends T> items) |
boolean |
offer(T item) |
T |
poll() |
protected void |
removeItem(long rmvIdx)
Removes item with given index from queue.
|
add, affinityCall, affinityRun, bounded, capacity, checkRemoved, checkRemoved, clear, clear, close, collocated, drainTo, drainTo, element, equals, hashCode, id, itemKey, iterator, name, offer, onHeaderChanged, onKernalStop, onRemoved, peek, poll, put, remainingCapacity, remove, removed, size, take, toString
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
public GridAtomicCacheQueueImpl(String queueName, GridCacheQueueHeader hdr, GridCacheContext<?,?> cctx)
queueName
- Queue name.hdr
- Queue header.cctx
- Cache context.public boolean offer(T item) throws IgniteException
IgniteException
@Nullable public T poll() throws IgniteException
IgniteException
public boolean addAll(Collection<? extends T> items)
addAll
in interface Collection<T>
addAll
in interface IgniteQueue<T>
addAll
in class AbstractCollection<T>
protected void removeItem(long rmvIdx) throws IgniteCheckedException
removeItem
in class GridCacheQueueAdapter<T>
rmvIdx
- Index of item to be removed.IgniteCheckedException
- If failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017