OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.15.1
API documentation
FeedEngineListener Class Reference

#include <FeedEngineListener.h>

Public Member Functions

virtual void onFeedEngineThreadBegin (const FeedEngine &engine)
 
virtual void onFeedEngineThreadEnd (const FeedEngine &engine)
 
virtual void onFeedEngineThreadIdle (const FeedEngine &engine, FeedEngineThreadIdleReason reason, unsigned int &timeout)
 

Protected Member Functions

virtual ~FeedEngineListener ()
 

Detailed Description

Listener for thread-related events.

Members of this classes are invoked to reflect various life-time events of threads spawned and used by the feed engine while processing market data.

Definition at line 54 of file FeedEngineListener.h.

Constructor & Destructor Documentation

virtual ~FeedEngineListener ( )
inlineprotectedvirtual

Definition at line 96 of file FeedEngineListener.h.

Member Function Documentation

void onFeedEngineThreadBegin ( const FeedEngine engine)
inlinevirtual

Member invoked by feed engine when a new processing thread is spawned.

Note
Invocation is done within newly started thread.
Parameters
engineAn instance of the feed angine.

Definition at line 99 of file FeedEngineListener.h.

void onFeedEngineThreadEnd ( const FeedEngine engine)
inlinevirtual

Member is invoked by feed engine when processing thread is about to end.

Note
Invocation is done within the thread that is about to end.
Parameters
engineAn instance of the feed angine.

Definition at line 103 of file FeedEngineListener.h.

void onFeedEngineThreadIdle ( const FeedEngine engine,
FeedEngineThreadIdleReason  reason,
unsigned int &  timeout 
)
inlinevirtual

Is called when feed engine's thread is idle.

Thread becomes idle when either no data is received within time interval defined by FeedEngineSettings::dataWaitTime parameter or no pending data is available for processing. In the first case, callback is invoked with 'DataWaitTimeout' reason. In the second case, thread is considered as redundant and thus callback is invoked with 'Redundant' reason. After callback invocation threads may sleep in kernel to reduce load onto CPU and racing between feed engine working threads.

Parameters
engineAn instance of the feed angine.
reasonReason feed engine threads becomes idle.
timeoutDefines amount of time feed engine suggest for thread to sleep in kernel after invoking given member.

Definition at line 107 of file FeedEngineListener.h.


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