| Apache Ignite C++

Public Types | Public Member Functions | Friends | List of all members
ignite::Future< common::concurrent::SharedPointer< T > > Class Template Reference

Specialization for shared pointer. More...

`#include <future.h>`

## Public Types
typedef T | ValueType
| Template value type.
typedef common::concurrent::SharedPointer< ValueType > | SP_ValueType
| Template value type shared pointer.

## Public Member Functions
| Future (const Future< SP_ValueType > &src)
| Copy constructor. More...
Future & | operator= (const Future< SP_ValueType > &other)
| Assignment operator. More...
void | Wait () const
| Wait for value to be set. More...
bool | WaitFor (int32_t msTimeout) const
| Wait for value to be set for specified time. More...
SP_ValueType | GetValue () const
| Get the set value. More...
void | Cancel ()
| Cancel related operation.
bool | IsReady ()
| Check if the future ready.

## Friends
class | common::Promise< common::concurrent::SharedPointer< T > >

## Detailed Description

### template<typename T>
class ignite::Future< common::concurrent::SharedPointer< T > >

Specialization for shared pointer.

## Constructor & Destructor Documentation

## ◆ Future()

template<typename T >

ignite::Future< common::concurrent::SharedPointer< T > >::Future | ( | const Future< SP_ValueType > & | src | ) |
| inline

Copy constructor.

Parameters

  src | Instance to copy.

## Member Function Documentation

## ◆ GetValue()

template<typename T >

SP_ValueType ignite::Future< common::concurrent::SharedPointer< T > >::GetValue | ( |  | ) | const
| inline

Get the set value.

Active thread will be blocked until value or error will be set.

Exceptions

  IgniteError | if error has been set.

Returns
  Value that has been set on success.

## ◆ operator=()

template<typename T >

Future& ignite::Future< common::concurrent::SharedPointer< T > >::operator= | ( | const Future< SP_ValueType > & | other | ) |
| inline

Assignment operator.

Parameters

  other | Other instance.

Returns
  *this.

## ◆ Wait()

template<typename T >

void ignite::Future< common::concurrent::SharedPointer< T > >::Wait | ( |  | ) | const
| inline

Wait for value to be set.

Active thread will be blocked until value or error will be set.

## ◆ WaitFor()

template<typename T >

bool ignite::Future< common::concurrent::SharedPointer< T > >::WaitFor | ( | int32_t | msTimeout | ) | const
| inline

Wait for value to be set for specified time.

Active thread will be blocked until value or error will be set or timeout will end.

Parameters

  msTimeout | Timeout in milliseconds.

Returns
  True if the object has been triggered and false in case of timeout.

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

- future.h