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...
 
void SetJavaFilter (const event::JavaCacheEntryEventFilter &fltr)
 Set Java event filter to be used on server to determine what events should be transferred to local event listener. More...
 
event::JavaCacheEntryEventFilterGetJavaFilter ()
 Get remote Java filter reference. More...
 
const event::JavaCacheEntryEventFilterGetJavaFilter () const
 Get remote Java filter reference. 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)
inlineexplicit

Constructor.

Parameters
lsnrEvent 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.

◆ GetJavaFilter() [1/2]

template<typename K , typename V >
event::JavaCacheEntryEventFilter& ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >::GetJavaFilter ( )
inline

Get remote Java filter reference.

Returns
Remote Java filter.

◆ GetJavaFilter() [2/2]

template<typename K , typename V >
const event::JavaCacheEntryEventFilter& ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >::GetJavaFilter ( ) const
inline

Get remote Java filter reference.

Returns
Remote Java filter.

◆ 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
valBuffer 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
valFlag value.

◆ SetJavaFilter()

template<typename K , typename V >
void ignite::thin::cache::query::continuous::ContinuousQueryClient< K, V >::SetJavaFilter ( const event::JavaCacheEntryEventFilter fltr)
inline

Set Java event filter to be used on server to determine what events should be transferred to local event listener.

Parameters
fltrJava remote filter.

◆ 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
lsnrCache 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
valTime interval in miliseconds.

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