GridGain™ 3.6.0e
Enterprise Edition

org.gridgain.grid.cache.datastructures
Interface GridCacheQueue<T>

All Superinterfaces:
Collection<T>, GridMetadataAware, Iterable<T>, Serializable

public interface GridCacheQueue<T>
extends GridMetadataAware, Collection<T>

This interface provides a rich API for working with Data Grid-based distributed queues.

Note that queues are only available in Enterprise Edition.

Overview

Cache queue provides an access to cache elements using typical queue API. Cache queue also implements Collection interface and provides all methods from collections including Collection.addAll(Collection), Collection.removeAll(Collection), and Collection.retainAll(Collection) methods for bulk operations. Note that all Collection methods in the queue may throw GridRuntimeException in case of failure. If you prefer to catch checked exceptions, use methods that end with 'x', such as GridCacheQueue.addx(Object) for example, which throw GridException.

All queue operations have synchronous and asynchronous counterparts.

Bounded vs Unbounded

Queues can be unbounded or bounded. Bounded queues can have maximum capacity. Queue capacity can be set at creation time and cannot be changed later. Here is an example of how to create bounded LIFO queue with capacity of 1000 items.
 GridCacheQueue<String> queue = cache().queue("anyName", LIFO, 1000);
 ...
 queue.add("item");
 
For bounded queues blocking operations, such as GridCacheQueue.take() or GridCacheQueue.put(Object) are available. These operations will block until queue capacity changes to make the operation possible.

Queue Types

The following types of queues are available in GridGain: For more information about queue types refer to GridCacheQueueType documentation.

Priority queues allow for sorting queue items by priority. Priority in the queue item can be set using annotation GridCacheQueuePriority. Only one field or method can be annotated with priority in queue item class. Annotated fields or methods must be of int or Integer types. Here is an example of how annotate queue item:

 private static class PriorityMethodItem {
       // Priority field.
       private final int priority;

       private PriorityMethodItem(int priority) {
           this.priority = priority;
       }

       // Annotated priority method.
       @GridCacheQueuePriority
       int priority() {
           return priority;
       }
   }
 

Collocated vs Non-collocated

Queue items can be placed on one node or distributed throughout grid nodes (governed by collocated parameter). Non-collocated mode is provided only for partitioned caches. If collocated parameter is true, then all queue items will be collocated on one node, otherwise items will be distributed through all grid nodes. Unless explicitly specified, by default queues are collocated.

Here is an example of how create unbounded GridCacheQueueType.PRIORITY queue in non-collocated mode.

 GridCacheQueue<String> queue = cache().queue("anyName", PRIORITY, 0 /*unbounded*/, false /*non-collocated*/);
 ...
 queue.add("item");
 

Creating Cache Queues

Instances of distributed cache queues can be created by calling one of the following methods on GridCache API:

Wiki & Forum:


Wiki
Forum

See Also:
GridCache.queue(String), GridCache.queue(String, GridCacheQueueType), GridCache.queue(String, GridCacheQueueType, int), GridCache.queue(String, GridCacheQueueType, int, boolean)
 

Method Summary
 boolean add(T item)
          Adds specified item to the queue without blocking.
 boolean addAll(Collection<? extends T> items)
          Bulk operation for adding more than one item to queue at once without blocking.
 GridFuture<Boolean> addAllAsync(Collection<? extends T> items)
          Asynchronous bulk operation for adding more than one item to queue at once.
 boolean addAllx(Collection<? extends T> items)
          Bulk operation for adding more than one item to queue at once without blocking.
 GridFuture<Boolean> addAsync(T item)
          Asynchronously adds specified item to the queue.
 boolean addx(T item)
          Adds specified item to the queue without blocking.
 boolean bounded()
          Returns true if this queue is bounded.
 int capacity()
          Gets maximum number of elements of the queue.
 void clear()
          Removes all of the elements from this queue.
 void clear(int batchSize)
          Removes all of the elements from this queue.
 GridFuture<Boolean> clearAsync()
          Clears the queue asynchronously.
 void clearx()
          Removes all of the elements from this queue.
 void clearx(int batchSize)
          Removes all of the elements from this queue.
 boolean collocated()
          Returns true if this queue can be kept on the one node only.
 boolean contains(Object item)
          Returns true if this queue contains the specified element.
 boolean containsAll(Collection<?> items)
          Returns true if this queue contains all of the elements in the specified collection.
 boolean containsAllx(Collection<?> items)
          Returns true if this queue contains all of the elements in the specified collection.
 boolean containsx(Object item)
          Returns true if this queue contains the specified element.
 T get()
          Retrieves, but does not remove, the head of this queue.
 T get(long timeout, TimeUnit unit)
          Try to retrieve but does not remove the head of this queue within given timeout.
 GridFuture<T> getAsync()
          Try to retrieve but does not remove the tail of this queue asynchronously.
 T getLast()
          Retrieves, but does not remove, the tail of this queue.
 T getLast(long timeout, TimeUnit unit)
          Try to retrieve but does not remove the tail of this queue within given timeout.
 GridFuture<T> getLastAsync()
          Try to retrieve but does not remove the tail of this queue asynchronously.
 boolean isEmpty()
          Returns true if this queue contains no elements.
 boolean isEmptyx()
          Returns true if this queue contains no elements.
 Collection<T> items(Integer... positions)
          Gets items from the queue at specified positions.
 Iterator<T> iterator()
          Returns an iterator over the elements in this queue.
 String name()
          Gets queue name.
 T peek()
          Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.
 GridFuture<T> peekAsync()
          Asynchronously retrieves, but does not remove, the head of this queue.
 T peekLast()
          Retrieves, but does not remove, the tail of this queue, or returns null if this queue is empty.
 GridFuture<T> peekLastAsync()
          Asynchronously retrieves, but does not remove, the tail of this queue.
 T poll()
          Retrieves and removes the head item of the queue, or returns null if this queue is empty.
 GridFuture<T> pollAsync()
          Asynchronously retrieves and removes the head item of the queue.
 T pollLast()
          Retrieves and removes the tail item of the queue, or returns null if this queue is empty.
 GridFuture<T> pollLastAsync()
          Retrieves and removes the tail item of the queue.
 int position(T item)
          Gets position of the specified item in the queue.
 void put(T item)
          Puts specified item to the queue.
 boolean put(T item, long timeout, TimeUnit unit)
          Try to put specified item to the queue during timeout.
 GridFuture<Boolean> putAsync(T item)
          Puts specified item to the queue asynchronously.
 boolean remove(Object item)
          Removes a single instance of the specified element from this queue, if it is present.
 boolean removeAll(Collection<?> items)
          Bulk operation that removes all of this queue's elements that are also contained in the specified collection.
 GridFuture<Boolean> removeAllAsync(Collection<?> items)
          Asynchronous bulk operation that removes all of this queue's elements that are also contained in the specified collection.
 boolean removeAllx(Collection<?> items)
          Bulk operation that removes all of this queue's elements that are also contained in the specified collection.
 GridFuture<Boolean> removeAsync(T item)
          Asynchronously removes a single instance of the specified element from this queue, if it is present.
 boolean removed()
          Gets status of queue.
 boolean removex(T item)
          Removes a single instance of the specified element from this queue, if it is present.
 boolean retainAll(Collection<?> items)
          Retains only the elements in this queue that are contained in the specified collection.
 GridFuture<Boolean> retainAllAsync(Collection<?> items)
          Retains only the elements in this queue that are contained in the specified collection.
 boolean retainAllx(Collection<?> items)
          Retains only the elements in this queue that are contained in the specified collection.
 int size()
          Returns the number of elements in this queue.
 int sizex()
          Gets size of the queue.
 T take()
          Retrieves and removes the head item of the queue.
 T take(long timeout, TimeUnit unit)
          Try to retrieve and remove the head item of the queue during timeout.
 GridFuture<T> takeAsync()
          Retrieves and removes the head item of the queue asynchronously.
 T takeLast()
          Retrieves and removes the tail item of the queue.
 T takeLast(long timeout, TimeUnit unit)
          Try to retrieve and remove the tail item of the queue during timeout.
 GridFuture<T> takeLastAsync()
          Try to retrieve and remove the tail item of the queue asynchronously.
 Object[] toArray()
          Returns an array containing all of the elements in this queue.
<T> T[]
toArray(T[] a)
          Returns an array containing all of the elements in this queue; the runtime type of the returned array is that of the specified array.
 GridCacheQueueType type()
          Gets queue type GridCacheQueueType.
 
Methods inherited from interface org.gridgain.grid.GridMetadataAware
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, removeMeta, removeMeta, replaceMeta
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Method Detail

name

String name()
Gets queue name.

Returns:
Queue name.

type

GridCacheQueueType type()
Gets queue type GridCacheQueueType.

Returns:
Queue type.

add

boolean add(T item)
            throws GridRuntimeException
Adds specified item to the queue without blocking. If queue is bounded and full, then item will not be added and false will be returned.

If operation fails then GridRuntimeException is thrown.

Specified by:
add in interface Collection<T>
Throws:
GridRuntimeException - If operation failed.
Parameters:
item - Item to add.
Returns:
True if item was added, false if item wasn't added because queue is full.

addx

boolean addx(T item)
             throws GridException
Adds specified item to the queue without blocking. If queue is bounded and full, then item will not be added and false will be returned.

Unlike GridCacheQueue.add(Object), this method throws GridException if operation fails.

Throws:
GridException - If operation failed.
Parameters:
item - Queue item to add.
Returns:
True if item was added, false if item wasn't added because queue is full.

addAsync

GridFuture<Boolean> addAsync(T item)
Asynchronously adds specified item to the queue. If queue is bounded and full, then item will not be added and false will be returned from the future.

If operation fails then GridException is thrown.

Parameters:
item - Item to add.
Returns:
Future for the operation.

addAll

boolean addAll(Collection<? extends T> items)
               throws GridRuntimeException
Bulk operation for adding more than one item to queue at once without blocking. Only one internal transaction will be created (as opposed to multiple ones if method GridCacheQueue.add(Object) was called multiple times).

If queue is bounded and does not have enough capacity to add all items, then none of the items will be added and false will be returned.

Specified by:
addAll in interface Collection<T>
Throws:
GridRuntimeException - If operation failed.
Parameters:
items - Items to add.
Returns:
True if items were added, false if queue did not have enough capacity to fit all the items.

addAllx

boolean addAllx(Collection<? extends T> items)
                throws GridException
Bulk operation for adding more than one item to queue at once without blocking. Only one internal transaction will be created (as opposed to multiple ones if method GridCacheQueue.add(Object) was called multiple times).

If queue is bounded and does not have enough capacity to add all items, then none of the items will be added and false will be returned.

Unlike GridCacheQueue.addAll(Collection), this method throws GridException if operation fails.

Throws:
GridException - If operation failed.
Parameters:
items - Items to add.
Returns:
True if items were added, false if queue did not have enough capacity to fit all the items.

addAllAsync

GridFuture<Boolean> addAllAsync(Collection<? extends T> items)
Asynchronous bulk operation for adding more than one item to queue at once. Only one internal transaction will be created (as opposed to multiple ones if method GridCacheQueue.add(Object) was called multiple times).

If queue is bounded and does not have enough capacity to add all items, then none of the items will be added and false will be returned from the future.

Parameters:
items - Items to add.
Returns:
Future for the operation.

contains

boolean contains(Object item)
                 throws GridRuntimeException
Returns true if this queue contains the specified element.

Specified by:
contains in interface Collection<T>
Throws:
GridRuntimeException - If operation failed.
Parameters:
item - Element whose presence in this queue is to be tested.
Returns:
true If this queue contains the specified element.

containsx

boolean containsx(Object item)
                  throws GridException
Returns true if this queue contains the specified element.

Unlike GridCacheQueue.contains(Object), this method throws GridException if operation fails.

Throws:
GridException - If operation failed.
Parameters:
item - Element whose presence in this queue is to be tested.
Returns:
True if this queue contains the specified element.

containsAll

boolean containsAll(Collection<?> items)
                    throws GridRuntimeException
Returns true if this queue contains all of the elements in the specified collection.

Specified by:
containsAll in interface Collection<T>
Throws:
GridRuntimeException - If operation failed.
Parameters:
items - Collection to be checked for containment in this queue.
Returns:
True if this queue contains all of the elements in the specified collection.

containsAllx

boolean containsAllx(Collection<?> items)
                     throws GridException
Returns true if this queue contains all of the elements in the specified collection.

Unlike GridCacheQueue.containsAll(Collection), this method throws GridException if operation fails.

Throws:
GridException - If operation failed.
Parameters:
items - Collection to be checked for containment in this queue.
Returns:
True if this queue contains all of the elements in the specified collection.

clear

void clear()
           throws GridRuntimeException
Removes all of the elements from this queue.

Specified by:
clear in interface Collection<T>
Throws:
GridRuntimeException - if operation failed.

clearx

void clearx()
            throws GridException
Removes all of the elements from this queue.

Throws:
GridException - If operation failed.

clear

void clear(int batchSize)
           throws GridRuntimeException
Removes all of the elements from this queue. Method is used in massive queues with huge numbers of elements.

Throws:
GridRuntimeException - if operation failed.
Parameters:
batchSize - Batch size.

clearx

void clearx(int batchSize)
            throws GridException
Removes all of the elements from this queue. Method is used in massive queues with huge numbers of elements.

Throws:
GridException - If operation failed.
Parameters:
batchSize - Batch size.

remove

boolean remove(Object item)
               throws GridRuntimeException
Removes a single instance of the specified element from this queue, if it is present.

Specified by:
remove in interface Collection<T>
Throws:
GridRuntimeException - If operation failed.
Parameters:
item - Element to be removed from this queue, if present.
Returns:
True if an element was removed as a result of this call.

removex

boolean removex(T item)
                throws GridException
Removes a single instance of the specified element from this queue, if it is present.

Unlike GridCacheQueue.remove(Object), this method throws GridException if operation fails.

Throws:
GridException - If operation failed.
Parameters:
item - Item to delete.
Returns:
True if an element was removed as a result of this call.

removeAsync

GridFuture<Boolean> removeAsync(T item)
Asynchronously removes a single instance of the specified element from this queue, if it is present.

Parameters:
item - Item to delete.
Returns:
Future for the operation.

removeAll

boolean removeAll(Collection<?> items)
                  throws GridRuntimeException
Bulk operation that removes all of this queue's elements that are also contained in the specified collection. After this call returns, this queue will contain no elements in common with the specified collection.

Specified by:
removeAll in interface Collection<T>
Throws:
GridRuntimeException - If operation failed.
Parameters:
items - collection containing elements to be removed from this queue.
Returns:
True if this queue changed as a result of the call.

removeAllx

boolean removeAllx(Collection<?> items)
                   throws GridException
Bulk operation that removes all of this queue's elements that are also contained in the specified collection. After this call returns, this queue will contain no elements in common with the specified collection.

Unlike GridCacheQueue.removeAll(Collection) this method throws GridException if operation fails.

Throws:
GridException - If operation failed.
Parameters:
items - collection containing elements to be removed from this queue.
Returns:
True if this queue changed as a result of the call.

removeAllAsync

GridFuture<Boolean> removeAllAsync(Collection<?> items)
Asynchronous bulk operation that removes all of this queue's elements that are also contained in the specified collection. After this call returns, this queue will contain no elements in common with the specified collection.

Parameters:
items - collection containing elements to be removed from this queue.
Returns:
Future for the operation.

isEmpty

boolean isEmpty()
                throws GridRuntimeException
Returns true if this queue contains no elements.

Specified by:
isEmpty in interface Collection<T>
Throws:
GridRuntimeException - If operation failed.
Returns:
True if this queue contains no elements.

isEmptyx

boolean isEmptyx()
                 throws GridException
Returns true if this queue contains no elements.

Unlike GridCacheQueue.isEmpty() this method throws GridException if operation fails.

Throws:
GridException - If operation failed.
Returns:
True if this queue contains no elements.

iterator

Iterator<T> iterator()
                     throws GridRuntimeException
Returns an iterator over the elements in this queue.

Specified by:
iterator in interface Collection<T>
Specified by:
iterator in interface Iterable<T>
Throws:
GridRuntimeException
Returns:
Iterator over the elements in this queue.

toArray

Object[] toArray()
                 throws GridRuntimeException
Returns an array containing all of the elements in this queue.

Specified by:
toArray in interface Collection<T>
Throws:
GridRuntimeException - If operation failed.
Returns:
An array containing all of the elements in this queue.

toArray

<T> T[] toArray(T[] a)
            throws GridRuntimeException
Returns an array containing all of the elements in this queue; the runtime type of the returned array is that of the specified array. If the queue fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this queue.

Specified by:
toArray in interface Collection<T>
Throws:
GridRuntimeException - If operation failed.
Parameters:
a - The array into which the elements of this queue are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
An array containing all of the elements in this queue.

retainAll

boolean retainAll(Collection<?> items)
                  throws GridRuntimeException
Retains only the elements in this queue that are contained in the specified collection. In other words, removes from this collection all of its elements that are not contained in the specified collection.

Specified by:
retainAll in interface Collection<T>
Throws:
GridRuntimeException - If operation failed.
Parameters:
items - Collection containing elements to be retained in this collection.
Returns:
True if this collection changed as a result of the call.

retainAllx

boolean retainAllx(Collection<?> items)
                   throws GridException
Retains only the elements in this queue that are contained in the specified collection. In other words, removes from this collection all of its elements that are not contained in the specified collection.

Throws:
GridException - If operation failed.
Parameters:
items - Collection containing elements to be retained in this collection.
Returns:
True if this collection changed as a result of the call.

retainAllAsync

GridFuture<Boolean> retainAllAsync(Collection<?> items)
Retains only the elements in this queue that are contained in the specified collection. In other words, removes from this collection all of its elements that are not contained in the specified collection.

Parameters:
items - Collection containing elements to be retained in this collection.
Returns:
Future for the operation.

size

int size()
         throws GridRuntimeException
Returns the number of elements in this queue. If this queue contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Specified by:
size in interface Collection<T>
Throws:
GridRuntimeException - If operation failed.
Returns:
the number of elements in this collection

poll

@Nullable
T poll()
       throws GridException
Retrieves and removes the head item of the queue, or returns null if this queue is empty.

Throws:
GridException - If operation failed.
Returns:
Item from the head of the queue.

pollAsync

GridFuture<T> pollAsync()
Asynchronously retrieves and removes the head item of the queue. Future returns null if this queue is empty.

Returns:
Future for the operation.

pollLast

@Nullable
T pollLast()
           throws GridException
Retrieves and removes the tail item of the queue, or returns null if this queue is empty.

Throws:
GridException - If operation failed.
Returns:
Item from the tail of the queue.

pollLastAsync

GridFuture<T> pollLastAsync()
Retrieves and removes the tail item of the queue. Future returns null if this queue is empty.

Returns:
Future for the operation.

peek

@Nullable
T peek()
       throws GridException
Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.

Throws:
GridException - If operation failed.
Returns:
The head of this queue, or null if this queue is empty.

peekAsync

GridFuture<T> peekAsync()
Asynchronously retrieves, but does not remove, the head of this queue. Future returns null if this queue is empty.

Returns:
Future for the operation.

peekLast

@Nullable
T peekLast()
           throws GridException
Retrieves, but does not remove, the tail of this queue, or returns null if this queue is empty.

Throws:
GridException - If operation failed.
Returns:
Future for the operation.

peekLastAsync

GridFuture<T> peekLastAsync()
Asynchronously retrieves, but does not remove, the tail of this queue. Future returns null if this queue is empty.

Returns:
Future for the operation.

position

int position(T item)
             throws GridException
Gets position of the specified item in the queue. First element (head of the queue) is at position 0.

Note this operation is supported only in collocated mode.

Throws:
GridException - If operation failed or operations executes in non-collocated mode.
Parameters:
item - Item to get position for.
Returns:
Position of specified item in the queue or -1 if item is not found.

items

@Nullable
Collection<T> items(Integer... positions)
                    throws GridException
Gets items from the queue at specified positions. First element (head of the queue) is at position 0.

Note this operation is supported only in collocated mode.

Throws:
GridException - If operation failed or operations executes in non-collocated mode.
Parameters:
positions - Positions of items to get from queue.
Returns:
Queue items at specified positions.

put

void put(T item)
         throws GridException
Puts specified item to the queue. Waits until place will be available in this queue.

Throws:
GridException - If operation failed.
Parameters:
item - Queue item to put.

put

boolean put(T item,
            long timeout,
            TimeUnit unit)
            throws GridException
Try to put specified item to the queue during timeout.

Throws:
GridException - If operation failed.
Parameters:
item - Queue item to put.
timeout - Timeout.
unit - Type of time representations.
Returns:
false if timed out while waiting for queue to go below maximum capacity, true otherwise. If queue is not bounded, then true is always returned.

putAsync

GridFuture<Boolean> putAsync(T item)
Puts specified item to the queue asynchronously.

Parameters:
item - Queue item to put.
Returns:
Future for the operation.

take

@Nullable
T take()
       throws GridException
Retrieves and removes the head item of the queue. Waits if no elements are present in this queue.

Throws:
GridException - If operation failed.
Returns:
Item from the head of the queue.

takeLast

@Nullable
T takeLast()
           throws GridException
Retrieves and removes the tail item of the queue. Waits if no elements are present in this queue.

Throws:
GridException - If operation failed.
Returns:
Item from the tail of the queue.

take

@Nullable
T take(long timeout,
                TimeUnit unit)
       throws GridException
Try to retrieve and remove the head item of the queue during timeout.

Throws:
GridException - If operation failed or timeout was exceeded.
Parameters:
timeout - Timeout.
unit - Type of time representations.
Returns:
Item from the head of the queue, or null if method timed out before queue had at least one item.

takeLast

@Nullable
T takeLast(long timeout,
                    TimeUnit unit)
           throws GridException
Try to retrieve and remove the tail item of the queue during timeout.

Throws:
GridException - If operation failed or timeout was exceeded.
Parameters:
timeout - Timeout.
unit - Type of time representations.
Returns:
Item from the tail of the queue, or null if method timed out before queue had at least one item.

takeAsync

GridFuture<T> takeAsync()
Retrieves and removes the head item of the queue asynchronously.

Returns:
Future for the take operation.

takeLastAsync

GridFuture<T> takeLastAsync()
Try to retrieve and remove the tail item of the queue asynchronously.

Returns:
Future for the operation.

get

@Nullable
T get()
      throws GridException
Retrieves, but does not remove, the head of this queue. Waits if no elements are present in this queue.

Throws:
GridException - If operation failed.
Returns:
The head of this queue.

getLast

@Nullable
T getLast()
          throws GridException
Retrieves, but does not remove, the tail of this queue. Waits if no elements are present in this queue.

Throws:
GridException - If operation failed.
Returns:
The tail of this queue.

get

@Nullable
T get(long timeout,
               TimeUnit unit)
      throws GridException
Try to retrieve but does not remove the head of this queue within given timeout. Waits if no elements are present in this queue.

Throws:
GridException - If operation failed or timeout was exceeded.
Parameters:
timeout - Timeout.
unit - Type of time representations.
Returns:
The head of this queue or null if method timed out before queue had at least one item.

getLast

@Nullable
T getLast(long timeout,
                   TimeUnit unit)
          throws GridException
Try to retrieve but does not remove the tail of this queue within given timeout. Waits if no elements are present in this queue.

Throws:
GridException - If operation failed or timeout was exceeded.
Parameters:
timeout - Timeout.
unit - Type of time representations.
Returns:
The tail of this queue, or null if method timed out before queue had at least one item.

getAsync

GridFuture<T> getAsync()
Try to retrieve but does not remove the tail of this queue asynchronously.

Returns:
Future for the operation.

getLastAsync

GridFuture<T> getLastAsync()
Try to retrieve but does not remove the tail of this queue asynchronously.

Returns:
Future for the operation.

clearAsync

GridFuture<Boolean> clearAsync()
Clears the queue asynchronously.

Returns:
Future for the operation.

sizex

int sizex()
          throws GridException
Gets size of the queue.

Throws:
GridException - If operation failed.
Returns:
Size of the queue.

capacity

int capacity()
             throws GridException
Gets maximum number of elements of the queue.

Throws:
GridException - If operation failed.
Returns:
Maximum number of elements. If queue is unbounded Integer.MAX_SIZE will return.

bounded

boolean bounded()
                throws GridException
Returns true if this queue is bounded.

Throws:
GridException - If operation failed.
Returns:
true if this queue is bounded.

collocated

boolean collocated()
                   throws GridException
Returns true if this queue can be kept on the one node only. Returns false if this queue can be kept on the many nodes.

Throws:
GridException - If operation failed.
Returns:
true if this queue is in collocated mode false otherwise.

removed

boolean removed()
Gets status of queue.

Returns:
true if queue was removed from cache false otherwise.

GridGain™ 3.6.0e
Enterprise Edition

GridGain - Real Time Big Data
Enterprise Edition, ver. 3.6.0e.13012012
2012 Copyright © GridGain Systems
Follow us:   Follow GridGain on Github Follow GridGain on Facebook Join GridGain User Group Follow GridGain on Twitter Follow GridGain on YouTube