| Apache Ignite C++

Public Types | Public Member Functions | List of all members
ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V > Class Template Reference

Continuous query client. More...

`#include <continuous_query_client.h>`

## Public Types
enum | { DEFAULT_BUFFER_SIZE = 1 }
| Default value for the buffer size.
enum | { DEFAULT_TIME_INTERVAL = 0 }
| Default value for the time interval.

## Public Member Functions
| ~ContinuousQueryClient ()
| Destructor.
| ContinuousQueryClient (Reference< event::CacheEntryEventListener< K, V > > lsnr)
| Constructor. More...
void | SetBufferSize (int32_t val)
| Set buffer size. More...
int32_t | GetBufferSize () const
| Get buffer size. More...
void | SetTimeInterval (int64_t val)
| Set time interval. More...
int64_t | GetTimeInterval () const
| Get time interval. More...
void | SetIncludeExpired (bool val)
| Sets a value indicating whether to notify about Expired events. More...
bool | GetIncludeExpired () const
| Gets a value indicating whether to notify about Expired events. More...
void | SetListener (Reference< event::CacheEntryEventListener< K, V > > lsnr)
| Set cache entry event listener. More...
const event::CacheEntryEventListener< K, V > & | GetListener () const
| Get cache entry event listener. More...
event::CacheEntryEventListener< K, V > & | GetListener ()
| Get cache entry event listener. More...

## Detailed Description

### template<typename K, typename V>
class ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >

Continuous query client.

Continuous query client allow to register a listener for cache update events. On any update to the related cache an event is sent to the client that has executed the query and listener is notified on that client.

Continuous query can either be executed on the whole topology or only on local node.

To execute the query over the cache use method ignite::thin::cache::CacheClient::QueryContinuous().

## Constructor & Destructor Documentation

## ◆ ContinuousQueryClient()

template<typename K , typename V >

ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >::ContinuousQueryClient | ( | Reference< event::CacheEntryEventListener< K, V > > | lsnr | ) |
| inline explicit

Constructor.

Parameters

  lsnr | Event listener. Invoked on the node where continuous query execution has been started.

## Member Function Documentation

## ◆ GetBufferSize()

template<typename K , typename V >

int32_t ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >::GetBufferSize | ( |  | ) | const
| inline

Get buffer size.

When a cache update happens, entry is first put into a buffer. Entries from buffer will be sent to the master node only if the buffer is full or time provided via SetTimeInterval is exceeded.

Returns
  Buffer size.

## ◆ GetIncludeExpired()

template<typename K , typename V >

bool ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >::GetIncludeExpired | ( |  | ) | const
| inline

Gets a value indicating whether to notify about Expired events.

If `true`, then the listener will get notifications about expired cache entries. Otherwise, only Created, Updated, and Removed events will be passed to the listener.

Defaults to `false`.

Returns
  Flag value.

## ◆ GetListener() [1/2]

template<typename K , typename V >

event::CacheEntryEventListener<K, V>& ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >::GetListener | ( |  | ) |
| inline

Get cache entry event listener.

Returns
  Cache entry event listener.

## ◆ GetListener() [2/2]

template<typename K , typename V >

const event::CacheEntryEventListener<K, V>& ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >::GetListener | ( |  | ) | const
| inline

Get cache entry event listener.

Returns
  Cache entry event listener.

## ◆ GetTimeInterval()

template<typename K , typename V >

int64_t ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >::GetTimeInterval | ( |  | ) | const
| inline

Get time interval.

When a cache update happens, entry is first put into a buffer. Entries from buffer are sent to the master node only if the buffer is full (its size can be changed via SetBufferSize) or time provided via this method is exceeded.

Default value is DEFAULT_TIME_INTERVAL, i.e. 0, which means that time check is disabled and entries will be sent only when buffer is full.

Returns
  Time interval.

## ◆ SetBufferSize()

template<typename K , typename V >

void ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >::SetBufferSize | ( | int32_t | val | ) |
| inline

Set buffer size.

When a cache update happens, entry is first put into a buffer. Entries from buffer will be sent to the master node only if the buffer is full or time provided via SetTimeInterval is exceeded.

Parameters

  val | Buffer size.

## ◆ SetIncludeExpired()

template<typename K , typename V >

void ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >::SetIncludeExpired | ( | bool | val | ) |
| inline

Sets a value indicating whether to notify about Expired events.

If `true`, then the listener will get notifications about expired cache entries. Otherwise, only Created, Updated, and Removed events will be passed to the listener.

Defaults to `false`.

Parameters

  val | Flag value.

## ◆ SetListener()

template<typename K , typename V >

void ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >::SetListener | ( | Reference< event::CacheEntryEventListener< K, V > > | lsnr | ) |
| inline

Set cache entry event listener.

Parameters

  lsnr | Cache entry event listener. Invoked on the node where continuous query execution has been started.

## ◆ SetTimeInterval()

template<typename K , typename V >

void ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >::SetTimeInterval | ( | int64_t | val | ) |
| inline

Set time interval.

When a cache update happens, entry is first put into a buffer. Entries from buffer are sent to the master node only if the buffer is full (its size can be changed via SetBufferSize) or time provided via this method is exceeded.

Default value is DEFAULT_TIME_INTERVAL, i.e. 0, which means that time check is disabled and entries will be sent only when buffer is full.

Parameters

  val | Time interval in miliseconds.

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

- continuous_query_client.h