Interface ConcurrentQueue.Handle<V>
- All Known Implementing Classes:
ConcurrentQueueBlockingImpl.HandleImpl
,ConcurrentQueueImpl.HandleImpl
,ConcurrentQueueNonBlockingImpl.HandleImpl
- Enclosing interface:
ConcurrentQueue<V>
public static interface ConcurrentQueue.Handle<V>
A Handle provides the capability to delete an element of a ConcurrentQueue
very quickly. Typically, the handle is stored in the element, so that an
element located from another data structure can be quickly deleted from
a ConcurrentQueue.
-
Method Details
-
value
V value()Return the value that corresponds to this handle.- Returns:
- the value
-
remove
boolean remove()Delete the element corresponding to this handle from the queue. Takes constant time. Returns true if the removal succeeded, or false if it failed. which can occur if another thread has already called poll or remove on this element.- Returns:
- if operation succeeded
-
expiration
long expiration()Time at which the element will expire- Returns:
- time in milliseconds since 1/1/70 when this item expires.
-