|
dxFeed Graal CXX API v9.0.0
|
A builder class for creating an instance of TimeSeriesTxModel. More...
#include <TimeSeriesTxModel.hpp>
Public Member Functions | |
| 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. | |
| Public Member Functions inherited from SharedEntity | |
| template<typename T> | |
| bool | is () const noexcept |
| Checks that the object is of type T: its dynamic type is T or derived from T. | |
| template<typename T> | |
| std::shared_ptr< T > | sharedAs () noexcept |
| Returns a pointer to the current object wrapped in a smart pointer to type T or std::shared_ptr<T>{nullptr} if the object is not managed by std::shared_ptr. | |
| 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 or std::shared_ptr<T>{nullptr} if the object is not managed by std::shared_ptr. | |
| virtual std::string | toString () const |
| Returns a string representation of the current object. | |
| Public Member Functions inherited from Entity | |
| virtual | ~Entity () noexcept |
| The default virtual d-tor. | |
Additional Inherited Members | |
| Public Types inherited from SharedEntity | |
| using | Ptr = std::shared_ptr<SharedEntity> |
| The alias to a type of shared pointer to the SharedEntity object. | |
| Static Public Member Functions inherited from RequireMakeShared< Builder > | |
| static auto | createShared (Args &&...args) |
| Creates a smart pointer to an object. | |
A builder class for creating an instance of TimeSeriesTxModel.
|
inline |
Builds an instance of TimeSeriesTxModel based on the provided parameters.
|
inline |
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.
| isBatchProcessing | true to enable batch processing; false otherwise. |
|
inline |
|
inline |
Sets the time from which to subscribe for time-series.
This time defaults to std::chrono::milliseconds(std::numeric_limits<std::int64_t>::max()), which means that this model is not subscribed. This time can be changed later, after the model has been created, by calling setFromTime.
A time that is now or in the future is set too, but no events come before it: ErrorManager reports a warning (ErrorInfo::Level::WARN, component TimeSeriesTxModel).
| fromTime | The duration in milliseconds, since Unix epoch of January 1, 1970. |
References withFromTime().
Referenced by withFromTime().
|
inline |
Sets the time from which to subscribe for time-series.
This time defaults to std::numeric_limits<std::int64_t>::max(), which means that this model is not subscribed. This time can be changed later, after the model has been created, by calling setFromTime.
A time that is now or in the future is set too, but no events come before it: ErrorManager reports a warning (ErrorInfo::Level::WARN, component TimeSeriesTxModel).
| fromTime | The time in milliseconds, since Unix epoch of January 1, 1970. |
|
inline |
Sets the listener for transaction notifications.
The listener cannot be changed or added once the model has been built.
| onEventsReceived | A functional object, lambda, or function to which time series event data will be passed. |
References withListener().
|
inline |
Sets the listener for transaction notifications.
The listener cannot be changed or added once the model has been built.
| E | The type of event (derived from TimeSeriesEvent) |
| listener | The transaction listener. |
Referenced by withListener().
|
inline |
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.
| isSnapshotProcessing | true to enable snapshot processing; false otherwise. |
|
inline |
Sets the subscription symbol for the model being created.
The symbol cannot be added or changed after the model has been built.
| symbol | The subscription symbol. |