Apache Mesos
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
process::Future< T > Class Template Reference

#include <future.hpp>

Public Types

typedef lambda::CallableOnce< void()> AbandonedCallback
 
typedef lambda::CallableOnce< void()> DiscardCallback
 
typedef lambda::CallableOnce< void(const T &)> ReadyCallback
 
typedef lambda::CallableOnce< void(const std::string &)> FailedCallback
 
typedef lambda::CallableOnce< void()> DiscardedCallback
 
typedef lambda::CallableOnce< void(const Future< T > &)> AnyCallback
 

Public Member Functions

 Future ()
 
 Future (const T &_t)
 
 Future (T &&_t)
 
template<typename U >
 Future (const U &u)
 
 Future (const Failure &failure)
 
 Future (const ErrnoFailure &failure)
 
 Future (const Future< T > &that)=default
 
 Future (Future< T > &&that)=default
 
template<typename E >
 Future (const Try< T, E > &t)
 
template<typename E >
 Future (const Try< Future< T >, E > &t)
 
 ~Future ()=default
 
Future< T > & operator= (const Future< T > &that)=default
 
Future< T > & operator= (Future< T > &&that)=default
 
bool operator== (const Future< T > &that) const
 
bool operator!= (const Future< T > &that) const
 
bool operator< (const Future< T > &that) const
 
bool isPending () const
 
bool isReady () const
 
bool isDiscarded () const
 
bool isFailed () const
 
bool isAbandoned () const
 
bool hasDiscard () const
 
bool discard ()
 
bool await (const Duration &duration=Seconds(-1)) const
 
const T & get () const
 
const T * operator-> () const
 
const std::string & failure () const
 
const Future< T > & onAbandoned (AbandonedCallback &&callback) const
 
const Future< T > & onDiscard (DiscardCallback &&callback) const
 
const Future< T > & onReady (ReadyCallback &&callback) const
 
const Future< T > & onFailed (FailedCallback &&callback) const
 
const Future< T > & onDiscarded (DiscardedCallback &&callback) const
 
const Future< T > & onAny (AnyCallback &&callback) const
 
template<typename F >
const Future< T > & onAbandoned (_Deferred< F > &&deferred) const
 
template<typename F >
const Future< T > & onDiscard (_Deferred< F > &&deferred) const
 
template<typename F >
const Future< T > & onReady (_Deferred< F > &&deferred) const
 
template<typename F >
const Future< T > & onFailed (_Deferred< F > &&deferred) const
 
template<typename F >
const Future< T > & onDiscarded (_Deferred< F > &&deferred) const
 
template<typename F >
const Future< T > & onAny (_Deferred< F > &&deferred) const
 
template<typename F >
const Future< T > & onAbandoned (F &&f) const
 
template<typename F >
const Future< T > & onDiscard (F &&f) const
 
template<typename F >
const Future< T > & onReady (F &&f) const
 
template<typename F >
const Future< T > & onFailed (F &&f) const
 
template<typename F >
const Future< T > & onDiscarded (F &&f) const
 
template<typename F >
const Future< T > & onAny (F &&f) const
 
template<typename X >
Future< X > then (lambda::CallableOnce< Future< X >(const T &)> f) const
 
template<typename X >
Future< X > then (lambda::CallableOnce< X(const T &)> f) const
 
template<typename X >
Future< X > then (lambda::CallableOnce< Future< X >()> f) const
 
template<typename X >
Future< X > then (lambda::CallableOnce< X()> f) const
 
template<typename F >
auto then (F &&f) const -> decltype(this->then(std::forward< F >(f), Prefer()))
 
template<typename F >
Future< T > recover (F &&f) const
 
template<typename F >
Future< T > recover (_Deferred< F > &&deferred) const
 
Future< T > repair (lambda::CallableOnce< Future< T >(const Future< T > &)> f) const
 
Future< T > after (const Duration &duration, lambda::CallableOnce< Future< T >(const Future< T > &)> f) const
 

Static Public Member Functions

static Future< T > failed (const std::string &message)
 

Friends

template<typename U >
class Future
 
class Promise< T >
 
class WeakFuture< T >
 
template<typename U >
std::ostream & operator<< (std::ostream &, const Future< U > &)
 

Member Typedef Documentation

template<typename T>
typedef lambda::CallableOnce<void()> process::Future< T >::AbandonedCallback
template<typename T>
typedef lambda::CallableOnce<void(const Future<T>&)> process::Future< T >::AnyCallback
template<typename T>
typedef lambda::CallableOnce<void()> process::Future< T >::DiscardCallback
template<typename T>
typedef lambda::CallableOnce<void()> process::Future< T >::DiscardedCallback
template<typename T>
typedef lambda::CallableOnce<void(const std::string&)> process::Future< T >::FailedCallback
template<typename T>
typedef lambda::CallableOnce<void(const T&)> process::Future< T >::ReadyCallback

Constructor & Destructor Documentation

template<typename T >
process::Future< T >::Future ( )
template<typename T>
process::Future< T >::Future ( const T &  _t)
template<typename T>
process::Future< T >::Future ( T &&  _t)
template<typename T >
template<typename U >
process::Future< T >::Future ( const U &  u)
template<typename T>
process::Future< T >::Future ( const Failure failure)
template<typename T>
process::Future< T >::Future ( const ErrnoFailure failure)
template<typename T>
process::Future< T >::Future ( const Future< T > &  that)
default
template<typename T>
process::Future< T >::Future ( Future< T > &&  that)
default
template<typename T>
template<typename E >
process::Future< T >::Future ( const Try< T, E > &  t)
template<typename T>
template<typename E >
process::Future< T >::Future ( const Try< Future< T >, E > &  t)
template<typename T>
process::Future< T >::~Future ( )
default

Member Function Documentation

template<typename T>
Future< T > process::Future< T >::after ( const Duration duration,
lambda::CallableOnce< Future< T >(const Future< T > &)>  f 
) const
template<typename T >
bool process::Future< T >::await ( const Duration duration = Seconds(-1)) const
template<typename T >
bool process::Future< T >::discard ( )
template<typename T >
Future< T > process::Future< T >::failed ( const std::string &  message)
static
template<typename T >
const std::string & process::Future< T >::failure ( ) const
template<typename T >
const T & process::Future< T >::get ( ) const
template<typename T >
bool process::Future< T >::hasDiscard ( ) const
template<typename T >
bool process::Future< T >::isAbandoned ( ) const
template<typename T >
bool process::Future< T >::isDiscarded ( ) const
template<typename T >
bool process::Future< T >::isFailed ( ) const
template<typename T >
bool process::Future< T >::isPending ( ) const
template<typename T >
bool process::Future< T >::isReady ( ) const
template<typename T >
const Future< T > & process::Future< T >::onAbandoned ( AbandonedCallback &&  callback) const
template<typename T>
template<typename F >
const Future<T>& process::Future< T >::onAbandoned ( _Deferred< F > &&  deferred) const
inline
template<typename T>
template<typename F >
const Future<T>& process::Future< T >::onAbandoned ( F &&  f) const
inline
template<typename T >
const Future< T > & process::Future< T >::onAny ( AnyCallback &&  callback) const
template<typename T>
template<typename F >
const Future<T>& process::Future< T >::onAny ( _Deferred< F > &&  deferred) const
inline
template<typename T>
template<typename F >
const Future<T>& process::Future< T >::onAny ( F &&  f) const
inline
template<typename T >
const Future< T > & process::Future< T >::onDiscard ( DiscardCallback &&  callback) const
template<typename T>
template<typename F >
const Future<T>& process::Future< T >::onDiscard ( _Deferred< F > &&  deferred) const
inline
template<typename T>
template<typename F >
const Future<T>& process::Future< T >::onDiscard ( F &&  f) const
inline
template<typename T >
const Future< T > & process::Future< T >::onDiscarded ( DiscardedCallback &&  callback) const
template<typename T>
template<typename F >
const Future<T>& process::Future< T >::onDiscarded ( _Deferred< F > &&  deferred) const
inline
template<typename T>
template<typename F >
const Future<T>& process::Future< T >::onDiscarded ( F &&  f) const
inline
template<typename T >
const Future< T > & process::Future< T >::onFailed ( FailedCallback &&  callback) const
template<typename T>
template<typename F >
const Future<T>& process::Future< T >::onFailed ( _Deferred< F > &&  deferred) const
inline
template<typename T>
template<typename F >
const Future<T>& process::Future< T >::onFailed ( F &&  f) const
inline
template<typename T >
const Future< T > & process::Future< T >::onReady ( ReadyCallback &&  callback) const
template<typename T>
template<typename F >
const Future<T>& process::Future< T >::onReady ( _Deferred< F > &&  deferred) const
inline
template<typename T>
template<typename F >
const Future<T>& process::Future< T >::onReady ( F &&  f) const
inline
template<typename T>
bool process::Future< T >::operator!= ( const Future< T > &  that) const
template<typename T >
const T * process::Future< T >::operator-> ( ) const
template<typename T>
bool process::Future< T >::operator< ( const Future< T > &  that) const
template<typename T>
Future<T>& process::Future< T >::operator= ( const Future< T > &  that)
default
template<typename T>
Future<T>& process::Future< T >::operator= ( Future< T > &&  that)
default
template<typename T>
bool process::Future< T >::operator== ( const Future< T > &  that) const
template<typename T >
template<typename F >
Future< T > process::Future< T >::recover ( F &&  f) const
template<typename T>
template<typename F >
Future<T> process::Future< T >::recover ( _Deferred< F > &&  deferred) const
inline
template<typename T>
Future< T > process::Future< T >::repair ( lambda::CallableOnce< Future< T >(const Future< T > &)>  f) const
template<typename T>
template<typename X >
Future< X > process::Future< T >::then ( lambda::CallableOnce< Future< X >(const T &)>  f) const
template<typename T>
template<typename X >
Future< X > process::Future< T >::then ( lambda::CallableOnce< X(const T &)>  f) const
template<typename T>
template<typename X >
Future<X> process::Future< T >::then ( lambda::CallableOnce< Future< X >()>  f) const
inline
template<typename T>
template<typename X >
Future<X> process::Future< T >::then ( lambda::CallableOnce< X()>  f) const
inline
template<typename T>
template<typename F >
auto process::Future< T >::then ( F &&  f) const -> decltype(this->then(std::forward<F>(f), Prefer()))
inline

Friends And Related Function Documentation

template<typename T>
template<typename U >
friend class Future
friend
template<typename T>
template<typename U >
std::ostream& operator<< ( std::ostream &  ,
const Future< U > &   
)
friend
template<typename T>
friend class Promise< T >
friend
template<typename T>
friend class WeakFuture< T >
friend

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