org.apache.ignite.internal.processors.datastructures

## 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>

`IgniteQueue` implementation 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 and Description
`GridTransactionalCacheQueueImpl(String queueName, GridCacheQueueHeader hdr, GridCacheContext<?,?> cctx)`

### Method Summary

Methods
`boolean` `addAll(Collection<? extends T> items)`
`boolean` `offer(T item)`
`T` `poll()`
`protected void` `removeItem(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, onHeaderChanged, onKernalStop, onRemoved, peek, poll, put, remainingCapacity, remove, removed, size, take, toString`

### 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 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:
  `addAll` in interface `Collection<T>`
Specified by:
  `addAll` in interface `IgniteQueue<T>`
Overrides:
  `addAll` in class `AbstractCollection<T>`

#### removeItem

    protected void removeItem(long rmvIdx)
                       throws IgniteCheckedException

Removes item with given index from queue.

Specified by:
  `removeItem` in class `GridCacheQueueAdapter<T>`
Parameters:
  `rmvIdx` - Index of item to be removed.
Throws:
  `IgniteCheckedException` - If failed.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.1.0
Release Date | : July 20 2017