Class GridTransactionalCacheQueueImpl<T>
- java.lang.Object
-
- java.util.AbstractCollection<T>
-
- org.apache.ignite.internal.processors.datastructures.GridCacheQueueAdapter<T>
-
- org.apache.ignite.internal.processors.datastructures.GridTransactionalCacheQueueImpl<T>
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<T>,Collection<T>,BlockingQueue<T>,Queue<T>,IgniteQueue<T>
public class GridTransactionalCacheQueueImpl<T> extends GridCacheQueueAdapter<T>
IgniteQueueimplementation using transactional cache.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.ignite.internal.processors.datastructures.GridCacheQueueAdapter
GridCacheQueueAdapter.AddProcessor, GridCacheQueueAdapter.ClearProcessor, GridCacheQueueAdapter.PollProcessor, GridCacheQueueAdapter.RemoveProcessor
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.datastructures.GridCacheQueueAdapter
cache, cctx, id, log, QUEUE_REMOVED_IDX, queueKey, queueName
-
-
Constructor Summary
Constructors Constructor Description GridTransactionalCacheQueueImpl(String queueName, GridCacheQueueHeader hdr, GridCacheContext<?,?> cctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddAll(Collection<? extends T> items)booleanoffer(T item)Tpoll()protected voidremoveItem(long rmvIdx)Removes item with given index from queue.-
Methods inherited from class org.apache.ignite.internal.processors.datastructures.GridCacheQueueAdapter
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
-
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Methods inherited from interface org.apache.ignite.IgniteQueue
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
-
-
-
-
Constructor Detail
-
GridTransactionalCacheQueueImpl
public GridTransactionalCacheQueueImpl(String queueName, GridCacheQueueHeader hdr, GridCacheContext<?,?> cctx)
- Parameters:
queueName- Queue name.hdr- Queue header.cctx- Cache context.
-
-
Method Detail
-
offer
public boolean offer(T item) throws IgniteException
- Throws:
IgniteException
-
poll
@Nullable public T poll() throws IgniteException
- Throws:
IgniteException
-
addAll
public boolean addAll(Collection<? extends T> items)
- Specified by:
addAllin interfaceCollection<T>- Specified by:
addAllin interfaceIgniteQueue<T>- Overrides:
addAllin classAbstractCollection<T>
-
removeItem
protected void removeItem(long rmvIdx) throws IgniteCheckedExceptionRemoves item with given index from queue.- Specified by:
removeItemin classGridCacheQueueAdapter<T>- Parameters:
rmvIdx- Index of item to be removed.- Throws:
IgniteCheckedException- If failed.
-
-