Hazelcast C++ Client
|
A Future where one can asynchronously listen on completion. More...
#include <ICompletableFuture.h>
Public Member Functions | |
virtual void | andThen (const boost::shared_ptr< ExecutionCallback< V > > &callback)=0 |
Registers a callback that will run after this future is completed. More... | |
virtual void | andThen (const boost::shared_ptr< ExecutionCallback< V > > &callback, const boost::shared_ptr< Executor > &executor)=0 |
Registers a callback that will run with the provided executor after this future is completed. More... | |
Public Member Functions inherited from hazelcast::client::IFuture< V > | |
virtual bool | cancel (bool mayInterruptIfRunning)=0 |
Attempts to cancel execution of this task. More... | |
virtual bool | isCancelled ()=0 |
Returns. More... | |
virtual bool | isDone ()=0 |
Returns. More... | |
virtual boost::shared_ptr< V > | get ()=0 |
Waits if necessary for the computation to complete, and then retrieves its result. More... | |
virtual boost::shared_ptr< V > | get (int64_t timeout, const TimeUnit &unit)=0 |
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available. More... | |
A Future where one can asynchronously listen on completion.
This functionality is needed for the reactive programming model.
<V> | The result type returned by this Future's get |
|
pure virtual |
Registers a callback that will run after this future is completed.
If this future is already completed, it runs immediately.
Please note that there is no ordering guarantee for running multiple callbacks. It is also not guaranteed that the callback will run within the same thread that completes the future.
callback | the callback to execute |
|
pure virtual |
Registers a callback that will run with the provided executor after this future is completed.
If this future is already completed, it runs immediately. The callback is called using the given
.
Please note that there is no ordering guarantee for executing multiple callbacks.
callback | the callback to execute |
executor | the executor in which the callback will be run |