OnixS C++ CME iLink 3 Binary Order Entry Handler  1.14.0
API Documentation
SessionScheduler Class Reference

#include <OnixS/CME/iLink3/scheduling/SessionScheduler.h>

Public Member Functions

 SessionScheduler (const SessionSchedulerOptions &options)
 
 ~SessionScheduler ()
 
const SessionSchedulefindSchedule (const SessionScheduleId &id) const
 
const SessionConnectionSettingsfindConnectionSettings (const SessionConnectionSettingsId &id) const
 
SessionScheduleradd (Session *session, const SessionSchedule &schedule, const SessionConnectionSettings &connection)
 
SessionScheduleradd (Session *session, const SessionScheduleId &scheduleId, const SessionConnectionSettingsId &connectionId)
 
SessionSchedulerremove (Session *session)
 
SessionSchedulerserviceThreadAffinity (const OnixS::CME::iLink3::CpuIndexes &cpuIndexes)
 
const OnixS::CME::iLink3::CpuIndexesserviceThreadAffinity () const ONIXS_ILINK3_NOEXCEPT
 
SessionSchedulerreconnectAttempts (int value)
 
int reconnectAttempts () const
 
SessionSchedulerreconnectInterval (int value)
 
int reconnectInterval () const
 
SessionSchedulerutcTimeUsage (bool value)
 
bool utcTimeUsage () const
 

Detailed Description

Definition at line 92 of file SessionScheduler.h.

Constructor & Destructor Documentation

Performs the graceful shutdown of scheduling sessions.

Member Function Documentation

SessionScheduler& add ( Session session,
const SessionSchedule schedule,
const SessionConnectionSettings connection 
)

Adds the session to the automatic connection management.

  • If the session is being added during the active time frame, it will be connected immediately.
  • If the session is being registered during the inactive time frame and is in the active state, it will be disconnected.
  • If the session is already registered, and exception will be thrown.
Parameters
sessionthe instance of the session to be maintained.
scheduleSession's schedule.
connectionSession's connection settings.
SessionScheduler& add ( Session session,
const SessionScheduleId scheduleId,
const SessionConnectionSettingsId connectionId 
)

Adds the session to the automatic connection management.

  • If the session is being added during the active time frame, it will be connected immediately.
  • If the session is being registered during the inactive time frame and is in the active state, it will be disconnected.
  • If the session is already registered, and exception will be thrown.
Parameters
sessionthe instance of the session to be maintained.
scheduleIdthe ID of the predefined schedule.
connectionIdthe ID of the predefined connection settings.
const SessionConnectionSettings* findConnectionSettings ( const SessionConnectionSettingsId id) const

Looks for the predefined session connection settings associated with the given id that was specified in Scheduler's configuration file.

Returns
NULL if no settings is available for the given id.
const SessionSchedule* findSchedule ( const SessionScheduleId id) const

Looks for the predefined session schedule associated with the given id that was specified in Scheduler's configuration file.

Returns
NULL if no schedule is available for the given id.
SessionScheduler& reconnectAttempts ( int  value)

Sets the number of logon attempts in case of a logon failure.

int reconnectAttempts ( ) const
Returns
the number of logon attempts in case of a logon failure.

The default value is 3.

SessionScheduler& reconnectInterval ( int  value)

Sets the time interval between the logon attempts in case of a logon failure (in seconds).

int reconnectInterval ( ) const
Returns
the time interval between the logon attempts in case of a logon failure (in seconds).

The default value is 180 seconds.

SessionScheduler& remove ( Session session)

Removes the session from the automatic connection management services.

SessionScheduler& serviceThreadAffinity ( const OnixS::CME::iLink3::CpuIndexes cpuIndexes)

Sets the CPU affinity for the Scheduler service thread.

const OnixS::CME::iLink3::CpuIndexes& serviceThreadAffinity ( ) const
Returns
the CPU affinity for the Scheduler service thread.
SessionScheduler& utcTimeUsage ( bool  value)

Activates the UTC usage.

bool utcTimeUsage ( ) const
Returns
true if the UTC is used, otherwise - false.

The default value is false.


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