com.apama.md.adapter
Event SpreaderSession


Spreader Session.

Connects to an underlying source providing either a Depth Interface, an Aggregated Book Interface or a BBA Interface, prices the resulting data using the provided parameters to calculate spread and skew, and routes the resulting priced data as a BBA.
Routes:
com.apama.md.BBA - 
com.apama.md.WrappedBBA - 
Sends:
com.apama.md.BBA - 
com.apama.md.WrappedBBA - 

Import summary
 TimeFormatPlugintimeMgr

Used to generate timestamps.
 
Action summary
 voidcreate(context mainCtx, string newSessionName, com.apama.session.SessionInfo underlyingSessionInfo, com.apama.session.SessionConfigParams underlyingSessionConfig, com.apama.session.CtrlParams underlyingCtrlParams, action<dictionary<string, com.apama.session.SessionInfo>> onSpreaderSuccess, action<sequence<string>> onSpreaderFailure)

Creates a Spreader Session, including creating the underlying source.
 com.apama.md.BBAgetLastPublishedBBA(com.apama.md.adapter.ConnectionKey connKey)

Return the last published BBA for the given connection key.
 com.apama.md.adapter.SpreaderParamsgetSpreaderParams(com.apama.md.adapter.ConnectionKey connKey)

Return the SpreaderParams for the given connection key.
 booleanrepublishBBA(com.apama.md.adapter.ConnectionKey connKey)

Republish the last published BBA for the given connection key.
 voidresetCtrlParams(com.apama.session.CtrlParams ctrlParams)

Sets the control params to new values.
 booleanresetSpreaderParams(com.apama.md.adapter.ConnectionKey connKey, com.apama.session.CtrlParams ctrlParams)

Validates and sets the spreader parameters for the given connection to those given in the CtrlParams.
 voidsetThrottling(float newThrottlePeriod)

Sets the throttle period in seconds.
 voidsetThrottlingFromCtrlParams(com.apama.session.CtrlParams ctrlParams)

Set the throttling period from the CtrlParams.
 voidstartSendingData(com.apama.md.adapter.StartSendingData ssd, string underlyingSymbolName, action<com.apama.md.adapter.ConnectionKey, integer, string> success)
 
Import detail

timeMgr

            TimeFormatPlugin timeMgr
        
Used to generate timestamps.
Action detail

create

            void create(context mainCtx, string newSessionName, com.apama.session.SessionInfo underlyingSessionInfo, com.apama.session.SessionConfigParams underlyingSessionConfig, com.apama.session.CtrlParams underlyingCtrlParams, action<dictionary<string, com.apama.session.SessionInfo>> onSpreaderSuccess, action<sequence<string>> onSpreaderFailure)
        
Creates a Spreader Session, including creating the underlying source.
Parameters:
mainCtx - The correlator's main context.
newSessionName - Name of the session being created.
underlyingSessionInfo - SessionInfo of the data source on which this session's prices will be based.
underlyingSessionConfig - Configuration parameters from the underlying session for the data source.
underlyingCtrlParams - Control parameters from the underlying session for the data source.
onSpreaderSuccess - Callback used when the session creation is successful.
onSpreaderFailure - Callback used when an error occurs during the session creation.

getLastPublishedBBA

            com.apama.md.BBA getLastPublishedBBA(com.apama.md.adapter.ConnectionKey connKey)
        
Return the last published BBA for the given connection key.
Parameters:
connKey - The connection key for the required BBA.
Returns:
The last published BBA if found, otherwise a new BBA.

getSpreaderParams

            com.apama.md.adapter.SpreaderParams getSpreaderParams(com.apama.md.adapter.ConnectionKey connKey)
        
Return the SpreaderParams for the given connection key.
Parameters:
connKey - The connection key for the required SpreaderParams.
Returns:
The SpreaderParams if found, otherwise a new SpreaderParams.

republishBBA

            boolean republishBBA(com.apama.md.adapter.ConnectionKey connKey)
        
Republish the last published BBA for the given connection key.
Parameters:
connKey - The connection key for the required BBA.
Returns:
True if the republication is successful, false otherwise. In the latter case an error message will also be logged.

resetCtrlParams

            void resetCtrlParams(com.apama.session.CtrlParams ctrlParams)
        
Sets the control params to new values.
Parameters:
ctrlParams - CtrlParams from which the new control parameters will be extracts.

resetSpreaderParams

            boolean resetSpreaderParams(com.apama.md.adapter.ConnectionKey connKey, com.apama.session.CtrlParams ctrlParams)
        
Validates and sets the spreader parameters for the given connection to those given in the CtrlParams.
Parameters:
connKey - Connection key for which the parameters are to be set.
ctrlParams
Returns:
True for a successful update, false if there was an error, eg: if the validation check fails.

setThrottling

            void setThrottling(float newThrottlePeriod)
        
Sets the throttle period in seconds.
Parameters:
newThrottlePeriod - The new time period to be used for throttling. A value <= 0 indicates no throttling.

setThrottlingFromCtrlParams

            void setThrottlingFromCtrlParams(com.apama.session.CtrlParams ctrlParams)
        
Set the throttling period from the CtrlParams.
Parameters:
ctrlParams - CtrlParams containing the throttling information. If the information is missing, the call is ignored.

startSendingData

            void startSendingData(com.apama.md.adapter.StartSendingData ssd, string underlyingSymbolName, action<com.apama.md.adapter.ConnectionKey, integer, string> success)
        
Parameters:
ssd
underlyingSymbolName
success