Package datomic
Interface ListenableFuture<T>
-
- All Superinterfaces:
java.util.concurrent.Future<T>
public interface ListenableFuture<T> extends java.util.concurrent.Future<T>
A future that supports completion listeners.- Since:
- 0.8.3591
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListener(java.lang.Runnable listener, java.util.concurrent.Executor executor)
Register a listener to run on the given executor.
-
-
-
Method Detail
-
addListener
void addListener(java.lang.Runnable listener, java.util.concurrent.Executor executor)
Register a listener to run on the given executor. The listener will run once and only once, if and when the Future's work is complete. If the future has completed already, the listener will run immediately. Ordering of listeners is not guaranteed.- Parameters:
listener
- the listener to runexecutor
- the executor to run the listener
-
-