Package com.tangosol.net
Interface NamedQueue<E>
- Type Parameters:
E
- the type of values in the queue
- All Superinterfaces:
AutoCloseable
,Collection<E>
,Iterable<E>
,NamedCollection
,ObservableCollection<E>
,Queue<E>
,Releasable
- All Known Subinterfaces:
NamedBlockingDeque<E>
,NamedBlockingQueue<E>
,NamedDeque<E>
- All Known Implementing Classes:
NamedDequeProxy
,NamedQueueProxy
,com.tangosol.net.queue.WrapperNamedDeque
,com.tangosol.net.queue.WrapperNamedQueue
A
Queue
based data-structure that manages values across one or more processes.
Values are typically managed in memory.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tangosol.net.NamedCollection
NamedCollection.Option
-
Method Summary
Modifier and TypeMethodDescriptionlong
Insert an element to the tail thisNamedQueue
.int
Return the consistent hash of the queue name.com.tangosol.net.queue.QueueStatistics
Returns the current statistics for this queue.Return the Service that this NamedCollection is a part of.boolean
isActive()
Returnstrue
if this map is not released or destroyed.default boolean
isReady()
Returns whether thisNamedMap
is ready to be used.Methods inherited from interface java.util.Collection
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
Methods inherited from interface com.tangosol.net.NamedCollection
destroy, getName, isDestroyed
Methods inherited from interface com.tangosol.util.ObservableCollection
addListener, addListener, removeListener, removeListener
Methods inherited from interface com.tangosol.net.Releasable
close, isReleased, release
-
Method Details
-
getService
QueueService getService()Description copied from interface:NamedCollection
Return the Service that this NamedCollection is a part of.- Specified by:
getService
in interfaceNamedCollection
- Returns:
- the Service
-
isReady
default boolean isReady()Returns whether thisNamedMap
is ready to be used. An example of when this method would returnfalse
would be where a partitioned cache service that owns this cache has no storage-enabled members.- Returns:
- return
true
if theNamedMap
may be used otherwise returnsfalse
. - Since:
- 14.1.1.2206.5
-
isActive
boolean isActive()Returnstrue
if this map is not released or destroyed. In other words, callingisActive()
is equivalent to calling!cache.isReleased() && !cache.isDestroyed()
.- Specified by:
isActive
in interfaceReleasable
- Returns:
true
if the cache is active, otherwisefalse
-
getQueueStatistics
com.tangosol.net.queue.QueueStatistics getQueueStatistics()Returns the current statistics for this queue.- Returns:
- the current statistics for this queue
-
getQueueNameHash
int getQueueNameHash()Return the consistent hash of the queue name.- Returns:
- the consistent hash of the queue name
-
append
Insert an element to the tail thisNamedQueue
.- Parameters:
e
- the element to insert- Returns:
- the identifier for the inserted element, or
Long.MIN_VALUE
if the element could not be inserted
-