|
std::shared_ptr< Builder > | withBatchProcessing (bool isBatchProcessing) const |
| Enables or disables batch processing.
|
|
std::shared_ptr< Builder > | withSnapshotProcessing (bool isSnapshotProcessing) const |
| Enables or disables snapshot processing.
|
|
std::shared_ptr< Builder > | withFeed (const std::shared_ptr< DXFeed > &feed) const |
| Sets the feed for the model being created.
|
|
std::shared_ptr< Builder > | withSymbol (const SymbolWrapper &symbol) const |
| Sets the subscription symbol for the model being created.
|
|
std::shared_ptr< Builder > | withListener (std::shared_ptr< TimeSeriesTxModelListener< E > > listener) const |
| Sets the listener for transaction notifications.
|
|
std::shared_ptr< Builder > | withListener (std::function< void(const std::vector< std::shared_ptr< E > > &, bool)> onEventsReceived) const |
| Sets the listener for transaction notifications.
|
|
std::shared_ptr< Builder > | withFromTime (std::int64_t fromTime) const |
| Sets the time from which to subscribe for time-series.
|
|
std::shared_ptr< Builder > | withFromTime (std::chrono::milliseconds fromTime) const |
| Sets the time from which to subscribe for time-series.
|
|
std::shared_ptr< TimeSeriesTxModel > | build () const |
| Builds an instance of TimeSeriesTxModel based on the provided parameters.
|
|
template<typename T > |
bool | is () const noexcept |
| Checks that pointer to the current type could be converted to type T* In other words: whether type T belongs to the type hierarchy in which the current type resides.
|
|
template<typename T > |
std::shared_ptr< T > | sharedAs () noexcept |
| Returns a pointer to the current object wrapped in a smart pointer to type T.
|
|
template<typename T > |
std::shared_ptr< T > | sharedAs () const noexcept |
| Returns a pointer to the current object wrapped in a smart pointer to type T.
|
|
virtual std::string | toString () const |
| Returns a string representation of the current object.
|
|
virtual | ~Entity () noexcept=default |
| The default virtual d-tor.
|
|
template<Derived<
TimeSeriesEvent > E>
struct TimeSeriesTxModel< E >::Builder
A builder class for creating an instance of TimeSeriesTxModel.
Enables or disables batch processing.
This is enabled by default.
If batch processing is disabled, the model will notify listener separately for each transaction (even if it is represented by a single event); otherwise, transactions can be combined in a single listener call.
A transaction may represent either a snapshot or update events that are received after a snapshot. Whether this flag is set or not, the model will always notify listeners that a snapshot has been received and will not combine multiple snapshots or a snapshot with another transaction into a single listener notification.
- Parameters
-
isBatchProcessing | true to enable batch processing; false otherwise. |
- Returns
- The builder instance.
Enables or disables snapshot processing.
This is disabled by default.
If snapshot processing is enabled, transactions representing a snapshot will be processed as follows: events that are marked for removal will be removed, repeated indexes will be merged, and eventFlags of events are set to zero; otherwise, the user will see the snapshot in raw form, with possible repeated indexes, events marked for removal, and eventFlags unchanged.
Whether this flag is set or not, in transactions that are not a snapshot, events that are marked for removal will not be removed, repeated indexes will not be merged, and eventFlags of events will not be changed. This flag only affects the processing of transactions that are a snapshot.
- Parameters
-
isSnapshotProcessing | true to enable snapshot processing; false otherwise. |
- Returns
- The builder instance.