/** * Clear the current reference. */ public void clear() { internalSet(null); }
BlockingReference(final ReusableLatch latch, final V initialValue) { this.latch = latch; internalSet(initialValue); }
/** * Set the value of this reference. This method is lock-free. A thread waiting * in {@link #take()} or {@link #take(long, TimeUnit)} will be released and * given this value. * * @param value the new value. */ public void set(@NotNull final V value) { notNull("value", value); internalSet(value); }