Apache Mesos
Public Member Functions | Static Public Member Functions | List of all members
mesos::internal::PendingFutureTracker Class Reference

#include <future_tracker.hpp>

Public Member Functions

 ~PendingFutureTracker ()
 
template<typename T >
process::Future< T > track (const process::Future< T > &future, const std::string &operation, const std::string &component, const std::map< std::string, std::string > &args={})
 This method subscribes on state transitions of the future to keep track of pending operations/promises associated with this future. More...
 
process::Future< std::vector< FutureMetadata > > pendingFutures ()
 This method returns a list of pending futures represented as objects of FutureMetadata class, whose variables are initialized by the arguments passed to the track method. More...
 

Static Public Member Functions

static Try< PendingFutureTracker * > create ()
 

Constructor & Destructor Documentation

mesos::internal::PendingFutureTracker::~PendingFutureTracker ( )
inline

Member Function Documentation

static Try<PendingFutureTracker*> mesos::internal::PendingFutureTracker::create ( )
inlinestatic
process::Future<std::vector<FutureMetadata> > mesos::internal::PendingFutureTracker::pendingFutures ( )
inline

This method returns a list of pending futures represented as objects of FutureMetadata class, whose variables are initialized by the arguments passed to the track method.

template<typename T >
process::Future<T> mesos::internal::PendingFutureTracker::track ( const process::Future< T > &  future,
const std::string &  operation,
const std::string &  component,
const std::map< std::string, std::string > &  args = {} 
)
inline

This method subscribes on state transitions of the future to keep track of pending operations/promises associated with this future.

Parameters
operationOperation's name identifies the place in the code related to this future. E.g., "some/isolator::prepare".
componentComponent is used to distinguish pending futures related to different components so that they can be exposed by different API endpoints.
argsA list of pairs <argument name, argument value> representing arguments passed to the function that returned the given future.
Returns
The same future which is passed as the first argument.

The documentation for this class was generated from the following file: