public abstract class BaseNotifyingFuture<T> extends java.lang.Object implements NotifyingFuture<T>
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
callCompleted |
(package private) java.util.concurrent.locks.ReadWriteLock |
listenerLock |
(package private) java.util.Set<FutureListener<T>> |
listeners |
Constructor and Description |
---|
BaseNotifyingFuture() |
Modifier and Type | Method and Description |
---|---|
NotifyingFuture<T> |
attachListener(FutureListener<T> objectFutureListener)
Attaches a listener and returns the same future instance, to allow for 'building'.
|
protected void |
fireListeners() |
final java.util.Set<FutureListener<T>> listeners
volatile boolean callCompleted
final java.util.concurrent.locks.ReadWriteLock listenerLock
public final NotifyingFuture<T> attachListener(FutureListener<T> objectFutureListener)
NotifyingFuture
attachListener
in interface NotifyingFuture<T>
objectFutureListener
- listener to attachprotected void fireListeners()