com.sun.xml.ws.rx.util
Class DelayedReference<V>
java.lang.Object
com.sun.xml.ws.rx.util.DelayedReference<V>
- All Implemented Interfaces:
- Comparable<Delayed>, Delayed
public class DelayedReference<V>
- extends Object
- implements Delayed
A generic immutable reference holder that implements Delayed interface
and thus is suitable for use in a DelayQueue
instances.
Instances of this DelayedReference class work with a milliseconds precision.
- Author:
- Marek Potociar
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DelayedReference
public DelayedReference(V data,
long delay,
TimeUnit timeUnit)
getValue
public V getValue()
getDelay
public long getDelay(TimeUnit unit)
- Specified by:
getDelay in interface Delayed
compareTo
public int compareTo(Delayed other)
- Specified by:
compareTo in interface Comparable<Delayed>
updateData
public DelayedReference<V> updateData(V data)
updateDelay
public DelayedReference<V> updateDelay(long newDelay,
TimeUnit timeUnit)
Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.