public class GridTransactionalCacheQueueImpl<T> extends GridCacheQueueAdapter<T>
GridCacheQueue implementation using transactional cache.GridCacheQueueAdapter.AddClosure, GridCacheQueueAdapter.ClearClosure, GridCacheQueueAdapter.PollClosure, GridCacheQueueAdapter.RemoveClosurecache, cctx, id, log, MAX_UPDATE_RETRIES, QUEUE_REMOVED_IDX, queueKey, queueName, RETRY_DELAY| Constructor and Description |
|---|
GridTransactionalCacheQueueImpl(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, bounded, capacity, checkRemoved, checkRemoved, clear, collocated, drainTo, drainTo, element, equals, hashCode, itemKey, iterator, name, offer, peek, poll, put, remainingCapacity, remove, removed, size, take, toStringclear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitclear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArraypublic GridTransactionalCacheQueueImpl(String queueName, GridCacheQueueHeader hdr, GridCacheContext<?,?> cctx)
queueName - Queue name.hdr - Queue header.cctx - Cache context.public boolean offer(T item) throws GridRuntimeException
GridRuntimeException@Nullable public T poll() throws GridRuntimeException
GridRuntimeExceptionpublic boolean addAll(Collection<? extends T> items)
addAll in interface Collection<T>addAll in interface GridCacheQueue<T>addAll in class AbstractCollection<T>protected void removeItem(long rmvIdx)
throws GridException
removeItem in class GridCacheQueueAdapter<T>rmvIdx - Index of item to be removed.GridException - If failed.Copyright © 2014. All rights reserved.