E
- the type of indexed events processed by the model being created.public static final class IndexedEventTxModel.Builder<E extends IndexedEvent<?>> extends Object
IndexedEventTxModel
.Constructor and Description |
---|
Builder(Class<E> eventType)
Constructs a new
builder for the specified event type. |
Modifier and Type | Method and Description |
---|---|
IndexedEventTxModel<E> |
build()
Builds a new instance of
IndexedEventTxModel with the provided configuration. |
IndexedEventTxModel.Builder<E> |
withAggregationPeriod(com.devexperts.util.TimePeriod aggregationPeriod)
Sets the aggregation period for data that limits the rate of data notifications.
|
IndexedEventTxModel.Builder<E> |
withEventsBatchLimit(int eventsBatchLimit)
Sets maximum number of events in the single notification of
eventsReceived . |
IndexedEventTxModel.Builder<E> |
withExecutor(Executor executor)
Sets the executor for processing listener notifications.
|
IndexedEventTxModel.Builder<E> |
withFeed(DXFeed feed)
Sets the
feed for the model being created. |
IndexedEventTxModel.Builder<E> |
withListener(IndexedEventTxModel.Listener<E> listener)
Sets the listener for transaction notifications.
|
IndexedEventTxModel.Builder<E> |
withSource(IndexedEventSource source)
Sets the source to subscribe to.
|
IndexedEventTxModel.Builder<E> |
withSymbol(IndexedEventSubscriptionSymbol<?> symbol)
Sets the subscription symbol and its source for the model being created.
|
IndexedEventTxModel.Builder<E> |
withSymbol(String symbol)
Sets the subscription symbol for the model being created.
|
public IndexedEventTxModel.Builder<E> withFeed(DXFeed feed)
feed
for the model being created.
The feed
can also be attached later, after the model has been built using the
subscription controller
.
feed
- the feed
.this
builder.public IndexedEventTxModel.Builder<E> withSymbol(IndexedEventSubscriptionSymbol<?> symbol)
This symbol and source cannot be added or changed after the model has been built.
symbol
- the subscription symbol.this
builder.withSymbol(String)
,
withSource(IndexedEventSource)
public IndexedEventTxModel.Builder<E> withSymbol(String symbol)
The symbol cannot be added or changed after the model has been built.
symbol
- the subscription symbol.this
builder.public IndexedEventTxModel.Builder<E> withSource(IndexedEventSource source)
Use the DEFAULT
value for source
with events that do not
have multiple sources (like Series
). For events with multiple sources (like Order
,
AnalyticOrder
, OtcMarketsOrder
and SpreadOrder
), use an event-specific
source class (for example, OrderSource
).
The source cannot be added or changed after the model has been built.
source
- the specified source.this
builder.public IndexedEventTxModel.Builder<E> withListener(IndexedEventTxModel.Listener<E> listener)
executor
.
The listener cannot be added or changed after the model has been built.
listener
- the model listener.this
builder.public IndexedEventTxModel.Builder<E> withEventsBatchLimit(int eventsBatchLimit)
eventsReceived
.
This value can be exceeded if the size of the received transaction exceeds the set limit.
This value can be change later, after the model has been built using the
subscription controller
.
eventsBatchLimit
- the notification events limit.public IndexedEventTxModel.Builder<E> withAggregationPeriod(com.devexperts.util.TimePeriod aggregationPeriod)
This value can be change later, after the model has been built using the
subscription controller
.
aggregationPeriod
- the aggregation period for data.public IndexedEventTxModel.Builder<E> withExecutor(Executor executor)
Default executor for all models is configured with
DXEndpoint.executor
method.
This executor can be change later, after the model has been built using the
subscription controller
.
executor
- the executor instance.this
builder.public IndexedEventTxModel<E> build()
IndexedEventTxModel
with the provided configuration.Copyright © 2002–2025 Devexperts LLC. All rights reserved.