public class GridAtomicCacheQueueImpl<T> extends GridCacheQueueAdapter<T>
IgniteQueue
implementation using atomic cache.GridCacheQueueAdapter.AddProcessor, GridCacheQueueAdapter.ClearProcessor, GridCacheQueueAdapter.PollProcessor, GridCacheQueueAdapter.RemoveProcessor
Modifier and Type | Field and Description |
---|---|
static int |
DFLT_ATOMIC_CACHE_QUERY_RETRY_TIMEOUT |
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, onClientDisconnected, onHeaderChanged, onKernalStop, onRemoved, peek, poll, put, remainingCapacity, remove, removed, size, take, toString, withKeepBinary
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
parallelStream, removeIf, spliterator, stream
public static final int DFLT_ATOMIC_CACHE_QUERY_RETRY_TIMEOUT
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 Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021