Public Member Functions

GridFutureImpl< T > Class Template Reference

#include <gridfutureimpl.hpp>

Inheritance diagram for GridFutureImpl< T >:
GridClientFuture< T >

List of all members.

Public Member Functions

 GridFutureImpl (TGridThreadPoolPtr &threadPool)
virtual bool success () const
virtual T result () const
virtual T get ()
virtual T get (const boost::posix_time::time_duration &timeout)
void task (boost::packaged_task< T > &pt)

Detailed Description

template<class T>
class GridFutureImpl< T >

Generic future implementation.


Constructor & Destructor Documentation

template<class T >
GridFutureImpl< T >::GridFutureImpl ( TGridThreadPoolPtr &  threadPool  )  [inline]

Default constructor.


Member Function Documentation

template<class T >
virtual T GridFutureImpl< T >::get (  )  [inline, virtual]

Waits for future to complete and fills success and result values.

Returns:
Operation result.

Implements GridClientFuture< T >.

template<class T >
virtual T GridFutureImpl< T >::get ( const boost::posix_time::time_duration &  timeout  )  [inline, virtual]

Waits for future to finish and returns the result of operation.

Parameters:
timeout Time to wait for result.
Returns:
Operation result.
Exceptions:
GridClientException In case an operation has thrown exception (it is rethrown).
GridClientFutureTimeoutException If timed out before future finishes.

Implements GridClientFuture< T >.

template<class T >
virtual T GridFutureImpl< T >::result (  )  const [inline, virtual]

Result of operation. If the operation was not successful, it is not valid.

Returns:
Result value.

Implements GridClientFuture< T >.

template<class T >
virtual bool GridFutureImpl< T >::success (  )  const [inline, virtual]

Was the operation successful or not. If it was not successful, result is not valid.

Returns:
Flag indicating the success of operation.

Implements GridClientFuture< T >.

template<class T >
void GridFutureImpl< T >::task ( boost::packaged_task< T > &  pt  )  [inline]

Init future from Boost packaged task with typed return type.

Parameters:
pt Packaged task to use for this future.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends