Package com.tangosol.net
Interface NamedBlockingQueue<E>
- Type Parameters:
E
- the type of values in the queue
- All Superinterfaces:
AutoCloseable
,BlockingQueue<E>
,Collection<E>
,Iterable<E>
,NamedCollection
,NamedQueue<E>
,ObservableCollection<E>
,Queue<E>
,Releasable
- All Known Subinterfaces:
NamedBlockingDeque<E>
A
BlockingQueue
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
Inserts the specified element at the end of thisNamedBlockingQueue
, waiting if necessary for space to become available.long
appendLast
(E e) Inserts the specified element at the end of thisNamedBlockingDeque
, waiting if necessary for space to become available.Methods inherited from interface java.util.concurrent.BlockingQueue
add, contains, drainTo, drainTo, offer, offer, poll, put, remainingCapacity, remove, take
Methods inherited from interface java.util.Collection
addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, 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.net.NamedQueue
append, getQueueNameHash, getQueueStatistics, getService, isActive, isReady
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
-
append
Inserts the specified element at the end of thisNamedBlockingQueue
, waiting if necessary for space to become available.- Parameters:
e
- the element to inserttimeout
- how long to wait before giving up, in units ofunit
unit
- aTimeUnit
determining how to interpret thetimeout
parameter- Returns:
- the identifier for the inserted element, or
-1L
if the element could not be inserted - Throws:
InterruptedException
- if interrupted while waiting
-
appendLast
Inserts the specified element at the end of thisNamedBlockingDeque
, waiting if necessary for space to become available.- Parameters:
e
- the element to insert- Returns:
- the identifier for the inserted element, or
-1L
if the element could not be inserted - Throws:
InterruptedException
- if interrupted while waiting
-