com.apama.marketdata
Event TickKey


Deprecated:
The market data key should be used instead
The tick data key represents a source of tick data. It stores information required to identify that data from that source as well as actions that perform those tests.

This event should always be used when subscribing to a source of tick data. It is only possible to filter events based on symbol. All the other parameters e.g. service id are kept in the extra parameters. This event implements the test to see if the tick or tick event came from the source that was subscribed to. This is particularly important when more than one adapter publishes data for the same symbol.

The tick data key is a utility event object that can be used to ensure that tick data subscriptions, unsubscriptions and events match the key of symbol, service, exchange and market as well as any other key extraParameters. That key can be initialised from explicit parameters or those garnered from an example event.
Since:
CMF 1.1.0
Version:
10.2
See Also:
com.apama.marketdata.MarketDataKey - For most uses the market data key should be used not the tick key

Member summary
 com.apama.marketdata.MarketDataKeyMDKey

The market data key.
 com.apama.marketdata.InnerTickKeyinnerTickKey

The symbol, service, exchange and market for this source of market data.
 
Action summary
 string_toString()

This action returns a string representation of this key that is shorter than the standard toString action.
 stringgetExchange()

This action returns the exchange for this tick data source.
 com.apama.marketdata.InnerTickKeygetInnerKey()

This action returns the inner key, which does not contain key extra parameters. This is useful e.g. for using as a key in a dictionary.
 dictionary<string, string>getKeyExtraParams()

This action returns any key extra parameters for this tick data source.
 stringgetMarket()

This action returns the market for this tick data source.
 stringgetService()

This action returns the service for this tick data source.
 stringgetSymbol()

This action returns the symbol for this tick data source.
 booleanmatches(com.apama.marketdata.Tick tick)

This action tests a tick event to establish whether it came from the source the key represents.
 booleanmatchesKey(com.apama.marketdata.TickKey otherKey)

Tests whether two tick data keys are the same.
 booleanmatchesSub(com.apama.marketdata.SubscribeTick sub)

This action tests if a subscription is for the source this key represents.
 booleanmatchesUnsub(com.apama.marketdata.UnsubscribeTick unsub)

This action tests if an unsubscription is for the source this key represents.
 voidset(string symbol, string service, string exchange, string market, dictionary<string, string> keyExtraParams)

This constructor is used to set a tick data key by specifying each field explicitly.
 voidsetFromMDKey(com.apama.marketdata.MarketDataKey key)

This constructor is used to create a tick data key from a market data key.
 voidsetFromSub(com.apama.marketdata.SubscribeTick sub)

This constructor is used to set a tick data key from a subscription event.
 voidsetFromTick(com.apama.marketdata.Tick tick)

This constructor is used to set a tick data key from a tick event by extracting the extra parameters from it.
 voidsetFromUnsub(com.apama.marketdata.UnsubscribeTick unsub)

This constructor is used to set a tick data key from an unsubscription event.
 
Member detail

innerTickKey

com.apama.marketdata.InnerTickKey innerTickKey
The symbol, service, exchange and market for this source of market data.

MDKey

com.apama.marketdata.MarketDataKey MDKey
The market data key.
Action detail

_toString

string _toString()
This action returns a string representation of this key that is shorter than the standard toString action.
Returns:
The string representation

getExchange

string getExchange()
This action returns the exchange for this tick data source.
Returns:
The exchange

getInnerKey

com.apama.marketdata.InnerTickKey getInnerKey()
This action returns the inner key, which does not contain key extra parameters. This is useful e.g. for using as a key in a dictionary.
Returns:
The inner tick data key

getKeyExtraParams

dictionary<string, string> getKeyExtraParams()
This action returns any key extra parameters for this tick data source.
Returns:
The key extra parameters

getMarket

string getMarket()
This action returns the market for this tick data source.
Returns:
The market

getService

string getService()
This action returns the service for this tick data source.
Returns:
The service

getSymbol

string getSymbol()
This action returns the symbol for this tick data source.
Returns:
The symbol

matches

boolean matches(com.apama.marketdata.Tick tick)
This action tests a tick event to establish whether it came from the source the key represents.
Parameters:
tick - The tick event to test matches the key
Returns:
Whether the tick event matches the key

matchesKey

boolean matchesKey(com.apama.marketdata.TickKey otherKey)
Tests whether two tick data keys are the same.
Parameters:
otherKey - The other key
Returns:
Whether the keys represent the same source

matchesSub

boolean matchesSub(com.apama.marketdata.SubscribeTick sub)
This action tests if a subscription is for the source this key represents.
Parameters:
sub - The subscription
Returns:
Whether the tick subscription event matches the key

matchesUnsub

boolean matchesUnsub(com.apama.marketdata.UnsubscribeTick unsub)
This action tests if an unsubscription is for the source this key represents.
Parameters:
unsub - The unsubscription
Returns:
Whether the tick unsubscription event matches the key

set

void set(string symbol, string service, string exchange, string market, dictionary<string, string> keyExtraParams)
This constructor is used to set a tick data key by specifying each field explicitly.
Parameters:
symbol - The symbol for the source of tick data
service - The service id of the tick data source
exchange - The exchange id of the tick data source
market - The market id of the tick data source
keyExtraParams - Any additional key extra parameters that need to be used to discriminate a particular tick data source

setFromMDKey

void setFromMDKey(com.apama.marketdata.MarketDataKey key)
This constructor is used to create a tick data key from a market data key.
Parameters:
key - The market data key that contains details of the tick source

setFromSub

void setFromSub(com.apama.marketdata.SubscribeTick sub)
This constructor is used to set a tick data key from a subscription event.
Parameters:
sub - The subscription event that specifies the key fields

setFromTick

void setFromTick(com.apama.marketdata.Tick tick)
This constructor is used to set a tick data key from a tick event by extracting the extra parameters from it.
Parameters:
tick - The tick event that acts as a template for the source

setFromUnsub

void setFromUnsub(com.apama.marketdata.UnsubscribeTick unsub)
This constructor is used to set a tick data key from an unsubscription event.
Parameters:
unsub - The unsubscription event that specifies the key fields