|
Lean
$LEAN_TAG$
|
Provides a means of distributing output from enumerators from a dedicated separate thread More...
Classes | |
| class | EnumeratorHandler |
| Handler used to manage a single enumerator's move next/end of stream behavior More... | |
Public Member Functions | |
| BaseDataExchange (string name) | |
| Initializes a new instance of the BaseDataExchange More... | |
| void | AddEnumerator (EnumeratorHandler handler) |
| Adds the enumerator to this exchange. If it has already been added then it will remain registered in the exchange only once More... | |
| void | AddEnumerator (Symbol symbol, IEnumerator< BaseData > enumerator, Func< bool > shouldMoveNext=null, Action< EnumeratorHandler > enumeratorFinished=null, Action< BaseData > handleData=null) |
| Adds the enumerator to this exchange. If it has already been added then it will remain registered in the exchange only once More... | |
| void | SetErrorHandler (Func< Exception, bool > isFatalError) |
| Sets the specified function as the error handler. This function returns true if it is a fatal error and queue consumption should cease. More... | |
| EnumeratorHandler | RemoveEnumerator (Symbol symbol) |
| Removes and returns enumerator handler with the specified symbol. The removed handler is returned, null if not found More... | |
| void | Start () |
| Begins consumption of the wrapped IDataQueueHandler on a separate thread More... | |
| void | Stop () |
| Ends consumption of the wrapped IDataQueueHandler More... | |
Properties | |
| uint | SleepInterval [get, set] |
| Gets or sets how long this thread will sleep when no data is available More... | |
| string | Name [get] |
| Gets a name for this exchange More... | |
Provides a means of distributing output from enumerators from a dedicated separate thread
Definition at line 31 of file BaseDataExchange.cs.
| QuantConnect.Lean.Engine.DataFeeds.BaseDataExchange.BaseDataExchange | ( | string | name | ) |
Initializes a new instance of the BaseDataExchange
| name | A name for this exchange |
Definition at line 70 of file BaseDataExchange.cs.
| void QuantConnect.Lean.Engine.DataFeeds.BaseDataExchange.AddEnumerator | ( | EnumeratorHandler | handler | ) |
Adds the enumerator to this exchange. If it has already been added then it will remain registered in the exchange only once
| handler | The handler to use when this symbol's data is encountered |
Definition at line 84 of file BaseDataExchange.cs.
| void QuantConnect.Lean.Engine.DataFeeds.BaseDataExchange.AddEnumerator | ( | Symbol | symbol, |
| IEnumerator< BaseData > | enumerator, | ||
| Func< bool > | shouldMoveNext = null, |
||
| Action< EnumeratorHandler > | enumeratorFinished = null, |
||
| Action< BaseData > | handleData = null |
||
| ) |
Adds the enumerator to this exchange. If it has already been added then it will remain registered in the exchange only once
| symbol | A unique symbol used to identify this enumerator |
| enumerator | The enumerator to be added |
| shouldMoveNext | Function used to determine if move next should be called on this enumerator, defaults to always returning true |
| enumeratorFinished | Delegate called when the enumerator move next returns false |
| handleData | Handler for data if HandlesData=true |
Definition at line 100 of file BaseDataExchange.cs.
| void QuantConnect.Lean.Engine.DataFeeds.BaseDataExchange.SetErrorHandler | ( | Func< Exception, bool > | isFatalError | ) |
Sets the specified function as the error handler. This function returns true if it is a fatal error and queue consumption should cease.
| isFatalError | The error handling function to use when an error is encountered during queue consumption. Returns true if queue consumption should be stopped, returns false if queue consumption should continue |
Definition at line 119 of file BaseDataExchange.cs.
| EnumeratorHandler QuantConnect.Lean.Engine.DataFeeds.BaseDataExchange.RemoveEnumerator | ( | Symbol | symbol | ) |
Removes and returns enumerator handler with the specified symbol. The removed handler is returned, null if not found
Definition at line 129 of file BaseDataExchange.cs.
| void QuantConnect.Lean.Engine.DataFeeds.BaseDataExchange.Start | ( | ) |
Begins consumption of the wrapped IDataQueueHandler on a separate thread
Definition at line 144 of file BaseDataExchange.cs.
| void QuantConnect.Lean.Engine.DataFeeds.BaseDataExchange.Stop | ( | ) |
Ends consumption of the wrapped IDataQueueHandler
Definition at line 162 of file BaseDataExchange.cs.
|
getset |
Gets or sets how long this thread will sleep when no data is available
Definition at line 46 of file BaseDataExchange.cs.
|
get |
Gets a name for this exchange
Definition at line 62 of file BaseDataExchange.cs.