Class ConcurrentQueueImpl.HandleImpl<V>
- java.lang.Object
-
- com.sun.corba.ee.impl.transport.concurrent.ConcurrentQueueImpl.HandleImpl<V>
-
- All Implemented Interfaces:
ConcurrentQueue.Handle<V>
- Enclosing class:
- ConcurrentQueueImpl<V>
private final class ConcurrentQueueImpl.HandleImpl<V> extends java.lang.Object implements ConcurrentQueue.Handle<V>
-
-
Field Summary
Fields Modifier and Type Field Description private ConcurrentQueueImpl.Entry<V>entryprivate longexpirationprivate booleanvalidprivate Vvalue
-
Constructor Summary
Constructors Constructor Description HandleImpl(ConcurrentQueueImpl.Entry<V> entry, V value, long expiration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ConcurrentQueueImpl.Entry<V>entry()longexpiration()Time at which the element will expirebooleanremove()Delete the element corresponding to this handle from the queue.Vvalue()Return the value that corresponds to this handle.
-
-
-
Field Detail
-
entry
private ConcurrentQueueImpl.Entry<V> entry
-
value
private final V value
-
valid
private boolean valid
-
expiration
private long expiration
-
-
Constructor Detail
-
HandleImpl
HandleImpl(ConcurrentQueueImpl.Entry<V> entry, V value, long expiration)
-
-
Method Detail
-
entry
ConcurrentQueueImpl.Entry<V> entry()
-
value
public V value()
Description copied from interface:ConcurrentQueue.HandleReturn the value that corresponds to this handle.- Specified by:
valuein interfaceConcurrentQueue.Handle<V>- Returns:
- the value
-
remove
public boolean remove()
Delete the element corresponding to this handle from the queue. Takes constant time.- Specified by:
removein interfaceConcurrentQueue.Handle<V>- Returns:
- if operation succeeded
-
expiration
public long expiration()
Description copied from interface:ConcurrentQueue.HandleTime at which the element will expire- Specified by:
expirationin interfaceConcurrentQueue.Handle<V>- Returns:
- time in milliseconds since 1/1/70 when this item expires.
-
-