Lean  $LEAN_TAG$
QuantConnect.Data.DataQueueHandlerSubscriptionManager Class Referenceabstract

Count number of subscribers for each channel (Symbol, Socket) pair More...

Inheritance diagram for QuantConnect.Data.DataQueueHandlerSubscriptionManager:
[legend]

Public Member Functions

void Subscribe (SubscriptionDataConfig dataConfig)
 Increment number of subscribers for current TickType More...
 
void Unsubscribe (SubscriptionDataConfig dataConfig)
 Decrement number of subscribers for current TickType More...
 
IEnumerable< SymbolGetSubscribedSymbols ()
 Returns subscribed symbols More...
 
IEnumerable< SymbolGetSubscribedSymbols (TickType tickType)
 Retrieves the list of unique Symbol instances that are currently subscribed for a specific TickType. More...
 
bool IsSubscribed (Symbol symbol, TickType tickType)
 Checks if there is existing subscriber for current channel More...
 
virtual void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 

Protected Member Functions

abstract bool Subscribe (IEnumerable< Symbol > symbols, TickType tickType)
 Describes the way IDataQueueHandler implements subscription More...
 
abstract bool Unsubscribe (IEnumerable< Symbol > symbols, TickType tickType)
 Describes the way IDataQueueHandler implements unsubscription More...
 
abstract string ChannelNameFromTickType (TickType tickType)
 Brokerage maps TickType to real socket/api channel More...
 

Properties

ConcurrentDictionary< Channel, int > SubscribersByChannel = new ConcurrentDictionary<Channel, int>() [get]
 Counter More...
 

Detailed Description

Count number of subscribers for each channel (Symbol, Socket) pair

Definition at line 28 of file DataQueueHandlerSubscriptionManager.cs.

Member Function Documentation

◆ Subscribe() [1/2]

void QuantConnect.Data.DataQueueHandlerSubscriptionManager.Subscribe ( SubscriptionDataConfig  dataConfig)

Increment number of subscribers for current TickType

Parameters
dataConfigdefines the subscription configuration data.


Definition at line 39 of file DataQueueHandlerSubscriptionManager.cs.

Here is the call graph for this function:

◆ Unsubscribe() [1/2]

void QuantConnect.Data.DataQueueHandlerSubscriptionManager.Unsubscribe ( SubscriptionDataConfig  dataConfig)

Decrement number of subscribers for current TickType

Parameters
dataConfigdefines the subscription configuration data.


Definition at line 67 of file DataQueueHandlerSubscriptionManager.cs.

Here is the call graph for this function:

◆ GetSubscribedSymbols() [1/2]

IEnumerable<Symbol> QuantConnect.Data.DataQueueHandlerSubscriptionManager.GetSubscribedSymbols ( )

Returns subscribed symbols

Returns
list of Symbol currently subscribed

Definition at line 98 of file DataQueueHandlerSubscriptionManager.cs.

◆ GetSubscribedSymbols() [2/2]

IEnumerable<Symbol> QuantConnect.Data.DataQueueHandlerSubscriptionManager.GetSubscribedSymbols ( TickType  tickType)

Retrieves the list of unique Symbol instances that are currently subscribed for a specific TickType.

Parameters
tickTypeThe type of tick data to filter subscriptions by.
Returns
A collection of unique Symbol objects that match the specified tickType .

Definition at line 110 of file DataQueueHandlerSubscriptionManager.cs.

Here is the call graph for this function:

◆ IsSubscribed()

bool QuantConnect.Data.DataQueueHandlerSubscriptionManager.IsSubscribed ( Symbol  symbol,
TickType  tickType 
)

Checks if there is existing subscriber for current channel

Parameters
symbolSymbol
tickTypeType of tick data
Returns
return true if there is one subscriber at least; otherwise false

Definition at line 126 of file DataQueueHandlerSubscriptionManager.cs.

◆ Dispose()

virtual void QuantConnect.Data.DataQueueHandlerSubscriptionManager.Dispose ( )
virtual

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Reimplemented in QuantConnect.Brokerages.BrokerageMultiWebSocketSubscriptionManager.

Definition at line 136 of file DataQueueHandlerSubscriptionManager.cs.

◆ Subscribe() [2/2]

abstract bool QuantConnect.Data.DataQueueHandlerSubscriptionManager.Subscribe ( IEnumerable< Symbol symbols,
TickType  tickType 
)
protectedpure virtual

Describes the way IDataQueueHandler implements subscription

Parameters
symbolsSymbols to subscribe
tickTypeType of tick data
Returns
Returns true if subsribed; otherwise false

Implemented in QuantConnect.Brokerages.BrokerageMultiWebSocketSubscriptionManager, and QuantConnect.Data.EventBasedDataQueueHandlerSubscriptionManager.

◆ Unsubscribe() [2/2]

abstract bool QuantConnect.Data.DataQueueHandlerSubscriptionManager.Unsubscribe ( IEnumerable< Symbol symbols,
TickType  tickType 
)
protectedpure virtual

Describes the way IDataQueueHandler implements unsubscription

Parameters
symbolsSymbols to unsubscribe
tickTypeType of tick data
Returns
Returns true if unsubsribed; otherwise false

Implemented in QuantConnect.Brokerages.BrokerageMultiWebSocketSubscriptionManager, and QuantConnect.Data.EventBasedDataQueueHandlerSubscriptionManager.

◆ ChannelNameFromTickType()

abstract string QuantConnect.Data.DataQueueHandlerSubscriptionManager.ChannelNameFromTickType ( TickType  tickType)
protectedpure virtual

Brokerage maps TickType to real socket/api channel

Parameters
tickTypeType of tick data
Returns

Implemented in QuantConnect.Data.EventBasedDataQueueHandlerSubscriptionManager.

Here is the caller graph for this function:

Property Documentation

◆ SubscribersByChannel

ConcurrentDictionary<Channel, int> QuantConnect.Data.DataQueueHandlerSubscriptionManager.SubscribersByChannel = new ConcurrentDictionary<Channel, int>()
getprotected

Counter

Definition at line 33 of file DataQueueHandlerSubscriptionManager.cs.


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