Package datomic
Interface ListenableFuture<T>
- All Superinterfaces:
Future<T>
A future that supports completion listeners.
- Since:
- 0.8.3591
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(Runnable listener, Executor executor) Register a listener to run on the given executor.
-
Method Details
-
addListener
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
-