|
dxFeed Graal Native SDK 3.14.0-rc2
|
The models of the events of one or more symbols: the order book, indexed, time series and transaction models. More...
Data Structures | |
| struct | dxfg_order_book_model_t |
| A handle of a Java OrderBookModel object; release it with dxfg_JavaObjectHandler_release(). More... | |
| struct | dxfg_indexed_event_model_t |
| A handle of a Java IndexedEventModel object; release it with dxfg_JavaObjectHandler_release(). More... | |
| struct | dxfg_time_series_event_model_t |
| A handle of a Java TimeSeriesEventModel object; release it with dxfg_JavaObjectHandler_release(). More... | |
| struct | dxfg_observable_list_model_t |
| A handle of a Java ObservableListModel object; release it with dxfg_JavaObjectHandler_release(). More... | |
| struct | dxfg_observable_list_model_listener_t |
| A handle of a Java ObservableListModelListener object; release it with dxfg_JavaObjectHandler_release(). More... | |
| struct | dxfg_order_book_model_listener_t |
| A handle of a Java OrderBookModelListener object; release it with dxfg_JavaObjectHandler_release(). More... | |
| struct | dxfg_indexed_tx_model_t |
| A handle of a Java IndexedTxModel object; release it with dxfg_JavaObjectHandler_release(). More... | |
| struct | dxfg_indexed_tx_model_builder_t |
| A handle of a Java IndexedTxModel.Builder object; release it with dxfg_JavaObjectHandler_release(). More... | |
| struct | dxfg_time_series_tx_model_t |
| A handle of a Java TimeSeriesTxModel object; release it with dxfg_JavaObjectHandler_release(). More... | |
| struct | dxfg_time_series_tx_model_builder_t |
| A handle of a Java TimeSeriesTxModel.Builder object; release it with dxfg_JavaObjectHandler_release(). More... | |
| struct | dxfg_tx_model_listener_t |
| A handle of a Java TxModelListener object; release it with dxfg_JavaObjectHandler_release(). More... | |
Typedefs | |
| typedef struct dxfg_order_book_model_t | dxfg_order_book_model_t |
| A handle of a Java OrderBookModel object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef struct dxfg_indexed_event_model_t | dxfg_indexed_event_model_t |
| A handle of a Java IndexedEventModel object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef struct dxfg_time_series_event_model_t | dxfg_time_series_event_model_t |
| A handle of a Java TimeSeriesEventModel object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef struct dxfg_observable_list_model_t | dxfg_observable_list_model_t |
| A handle of a Java ObservableListModel object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef struct dxfg_observable_list_model_listener_t | dxfg_observable_list_model_listener_t |
| A handle of a Java ObservableListModelListener object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef void(*) | dxfg_observable_list_model_listener_function(graal_isolatethread_t *thread, dxfg_event_type_list *orders, void *user_data) |
| The function of a dxfg_observable_list_model_listener_t: called after a list of events has changed. | |
| typedef struct dxfg_order_book_model_listener_t | dxfg_order_book_model_listener_t |
| A handle of a Java OrderBookModelListener object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef void(*) | dxfg_order_book_model_listener_function(graal_isolatethread_t *thread, dxfg_order_book_model_t *model, void *user_data) |
| The function of a dxfg_order_book_model_listener_t: called after an order book model has changed. | |
| typedef enum dxfg_order_book_model_filter_t | dxfg_order_book_model_filter_t |
| The filter of an order book model: which scopes of the order events are shown in the book. | |
| typedef enum dxfg_TimeSeriesTxModelSortOrder_t | dxfg_TimeSeriesTxModelSortOrder_t |
| The order in which the events of a snapshot are delivered by a time-series transactional model. | |
Enumerations | |
| enum | dxfg_order_book_model_filter_t { COMPOSITE , REGIONAL , AGGREGATE , ORDER , COMPOSITE_REGIONAL , COMPOSITE_REGIONAL_AGGREGATE , ALL } |
| The filter of an order book model: which scopes of the order events are shown in the book. More... | |
| enum | dxfg_TimeSeriesTxModelSortOrder_t { NONE , ASCENDING , DESCENDING } |
| The order in which the events of a snapshot are delivered by a time-series transactional model. More... | |
Functions | |
| dxfg_order_book_model_t * | dxfg_OrderBookModel_new (graal_isolatethread_t *thread) |
| Creates a new order book model. | |
| dxfg_indexed_event_model_t * | dxfg_IndexedEventModel_new (graal_isolatethread_t *thread, dxfg_event_clazz_t clazz) |
| Creates a new model of indexed events of the event type. | |
| dxfg_time_series_event_model_t * | dxfg_TimeSeriesEventModel_new (graal_isolatethread_t *thread, dxfg_event_clazz_t clazz) |
| Creates a new model of time-series events of the event type. | |
| int32_t | dxfg_OrderBookModel_attach (graal_isolatethread_t *thread, dxfg_order_book_model_t *model, dxfg_feed_t *feed) |
| Attaches the order book model to the feed: the model starts receiving the events of its symbol. | |
| int32_t | dxfg_OrderBookModel_detach (graal_isolatethread_t *thread, dxfg_order_book_model_t *model, dxfg_feed_t *feed) |
| Detaches the order book model from the feed. | |
| int32_t | dxfg_OrderBookModel_close (graal_isolatethread_t *thread, dxfg_order_book_model_t *model) |
| Closes the order book model: it becomes permanently detached from all feeds and removes all its listeners. | |
| dxfg_executor_t * | dxfg_OrderBookModel_getExecutor (graal_isolatethread_t *thread, dxfg_order_book_model_t *model) |
| Returns the executor that calls the listeners of the order book model. | |
| int32_t | dxfg_OrderBookModel_setExecutor (graal_isolatethread_t *thread, dxfg_order_book_model_t *model, dxfg_executor_t *executor) |
| Sets the executor that calls the listeners of the order book model. | |
| int32_t | dxfg_OrderBookModel_clear (graal_isolatethread_t *thread, dxfg_order_book_model_t *model) |
| Clears the subscription symbol and, with it, all the orders of the model. | |
| int32_t | dxfg_IndexedEventModel_attach (graal_isolatethread_t *thread, dxfg_indexed_event_model_t *model, dxfg_feed_t *feed) |
| Attaches the indexed event model to the feed: the model starts receiving the events of its symbol. | |
| int32_t | dxfg_IndexedEventModel_detach (graal_isolatethread_t *thread, dxfg_indexed_event_model_t *model, dxfg_feed_t *feed) |
| Detaches the indexed event model from the feed. | |
| int32_t | dxfg_IndexedEventModel_close (graal_isolatethread_t *thread, dxfg_indexed_event_model_t *model) |
| Closes the indexed event model: it becomes permanently detached from all feeds and removes all its listeners. | |
| dxfg_executor_t * | dxfg_IndexedEventModel_getExecutor (graal_isolatethread_t *thread, dxfg_indexed_event_model_t *model) |
| Returns the executor that calls the listeners of the indexed event model. | |
| int32_t | dxfg_IndexedEventModel_setExecutor (graal_isolatethread_t *thread, dxfg_indexed_event_model_t *model, dxfg_executor_t *executor) |
| Sets the executor that calls the listeners of the indexed event model. | |
| int32_t | dxfg_IndexedEventModel_clear (graal_isolatethread_t *thread, dxfg_indexed_event_model_t *model) |
| Clears the subscription symbol and, with it, all the events of the model. | |
| int32_t | dxfg_TimeSeriesEventModel_attach (graal_isolatethread_t *thread, dxfg_time_series_event_model_t *model, dxfg_feed_t *feed) |
| Attaches the time-series event model to the feed: the model starts receiving the events of its symbol. | |
| int32_t | dxfg_TimeSeriesEventModel_detach (graal_isolatethread_t *thread, dxfg_time_series_event_model_t *model, dxfg_feed_t *feed) |
| Detaches the time-series event model from the feed. | |
| int32_t | dxfg_TimeSeriesEventModel_close (graal_isolatethread_t *thread, dxfg_time_series_event_model_t *model) |
| Closes the time-series event model: it becomes permanently detached from all feeds and removes all its listeners. | |
| dxfg_executor_t * | dxfg_TimeSeriesEventModel_getExecutor (graal_isolatethread_t *thread, dxfg_time_series_event_model_t *model) |
| Returns the executor that calls the listeners of the time-series event model. | |
| int32_t | dxfg_TimeSeriesEventModel_setExecutor (graal_isolatethread_t *thread, dxfg_time_series_event_model_t *model, dxfg_executor_t *executor) |
| Sets the executor that calls the listeners of the time-series event model. | |
| int32_t | dxfg_TimeSeriesEventModel_clear (graal_isolatethread_t *thread, dxfg_time_series_event_model_t *model) |
| Clears the subscription symbol, sets the from-time to INT64_MAX and, with it, clears all the events of the model. | |
| int32_t | dxfg_OrderBookModel_getFilter (graal_isolatethread_t *thread, dxfg_order_book_model_t *model) |
| Returns the filter of the order book model. | |
| int32_t | dxfg_OrderBookModel_setFilter (graal_isolatethread_t *thread, dxfg_order_book_model_t *model, dxfg_order_book_model_filter_t filter) |
| Sets the filter of the order book model. | |
| const char * | dxfg_OrderBookModel_getSymbol (graal_isolatethread_t *thread, dxfg_order_book_model_t *model) |
| Returns the subscription symbol of the order book model. | |
| int32_t | dxfg_OrderBookModel_setSymbol (graal_isolatethread_t *thread, dxfg_order_book_model_t *model, const char *symbol) |
| Sets the subscription symbol of the order book model. | |
| dxfg_symbol_t * | dxfg_IndexedEventModel_getSymbol (graal_isolatethread_t *thread, dxfg_indexed_event_model_t *model) |
| Returns the subscription symbol of the indexed event model. | |
| int32_t | dxfg_IndexedEventModel_setSymbol (graal_isolatethread_t *thread, dxfg_indexed_event_model_t *model, dxfg_symbol_t *symbol) |
| Sets the subscription symbol of the indexed event model. | |
| dxfg_symbol_t * | dxfg_TimeSeriesEventModel_getSymbol (graal_isolatethread_t *thread, dxfg_time_series_event_model_t *model) |
| Returns the subscription symbol of the time-series event model. | |
| int32_t | dxfg_TimeSeriesEventModel_setSymbol (graal_isolatethread_t *thread, dxfg_time_series_event_model_t *model, dxfg_symbol_t *symbol) |
| Sets the subscription symbol of the time-series event model. | |
| int32_t | dxfg_OrderBookModel_getLotSize (graal_isolatethread_t *thread, dxfg_order_book_model_t *model) |
| Returns the lot size of the order book model. | |
| int32_t | dxfg_OrderBookModel_setLotSize (graal_isolatethread_t *thread, dxfg_order_book_model_t *model, int32_t lotSize) |
| Sets the lot size of the order book model. | |
| int32_t | dxfg_IndexedEventModel_getSizeLimit (graal_isolatethread_t *thread, dxfg_indexed_event_model_t *model) |
| Returns the size limit of the indexed event model. | |
| int32_t | dxfg_IndexedEventModel_setSizeLimit (graal_isolatethread_t *thread, dxfg_indexed_event_model_t *model, int32_t sizeLimit) |
| Sets the size limit of the indexed event model. | |
| int32_t | dxfg_TimeSeriesEventModel_getSizeLimit (graal_isolatethread_t *thread, dxfg_time_series_event_model_t *model) |
| Returns the size limit of the time-series event model. | |
| int32_t | dxfg_TimeSeriesEventModel_setSizeLimit (graal_isolatethread_t *thread, dxfg_time_series_event_model_t *model, int32_t sizeLimit) |
| Sets the size limit of the time-series event model. | |
| int64_t | dxfg_TimeSeriesEventModel_getFromTime (graal_isolatethread_t *thread, dxfg_time_series_event_model_t *model) |
| Returns the time from which the time-series event model subscribes for events. | |
| int32_t | dxfg_TimeSeriesEventModel_setFromTime (graal_isolatethread_t *thread, dxfg_time_series_event_model_t *model, int64_t fromTime) |
| Sets the time from which the time-series event model subscribes for events. | |
| dxfg_observable_list_model_t * | dxfg_OrderBookModel_getBuyOrders (graal_isolatethread_t *thread, dxfg_order_book_model_t *model) |
| Returns the buy orders (the bid side) of the order book model. | |
| dxfg_observable_list_model_t * | dxfg_OrderBookModel_getSellOrders (graal_isolatethread_t *thread, dxfg_order_book_model_t *model) |
| Returns the sell orders (the offer side) of the order book model. | |
| dxfg_observable_list_model_t * | dxfg_IndexedEventModel_getEventsList (graal_isolatethread_t *thread, dxfg_indexed_event_model_t *model) |
| Returns the list of events of the indexed event model. | |
| dxfg_observable_list_model_t * | dxfg_TimeSeriesEventModel_getEventsList (graal_isolatethread_t *thread, dxfg_time_series_event_model_t *model) |
| Returns the list of events of the time-series event model. | |
| dxfg_observable_list_model_listener_t * | dxfg_ObservableListModelListener_new (graal_isolatethread_t *thread, dxfg_observable_list_model_listener_function user_func, void *user_data) |
| Creates a listener of the changes of a list that calls the function with the user data. | |
| int32_t | dxfg_ObservableListModel_addListener (graal_isolatethread_t *thread, dxfg_observable_list_model_t *list, dxfg_observable_list_model_listener_t *listener) |
| Adds the listener to the list. | |
| int32_t | dxfg_ObservableListModel_removeListener (graal_isolatethread_t *thread, dxfg_observable_list_model_t *list, dxfg_observable_list_model_listener_t *listener) |
| Removes the listener from the list. If the listener is not added to the list, nothing happens. | |
| dxfg_order_book_model_listener_t * | dxfg_OrderBookModelListener_new (graal_isolatethread_t *thread, dxfg_order_book_model_listener_function user_func, void *user_data) |
| Creates a listener of the changes of an order book model that calls the function with the user data. | |
| int32_t | dxfg_OrderBookModel_addListener (graal_isolatethread_t *thread, dxfg_order_book_model_t *model, dxfg_order_book_model_listener_t *listener) |
| Adds the listener to the order book model. A closed model does not add listeners. | |
| int32_t | dxfg_OrderBookModel_removeListener (graal_isolatethread_t *thread, dxfg_order_book_model_t *model, dxfg_order_book_model_listener_t *listener) |
| Removes the listener from the order book model. If the listener is not added to the model, nothing happens. | |
| dxfg_event_type_list * | dxfg_ObservableListModel_toArray (graal_isolatethread_t *thread, dxfg_observable_list_model_t *list) |
| Returns the events of the list as a new list of events. | |
The models of the events of one or more symbols: the order book, indexed, time series and transaction models.
Threads: dxfg_order_book_model_t, dxfg_indexed_event_model_t and dxfg_time_series_event_model_t are not thread-safe. Only their attach, detach and close functions may be called from any thread. Call any other function of an attached model, and of its lists, only from inside a listener call or from the thread of the executor that calls the listeners, or synchronize the calls. The transaction models (dxfg_indexed_tx_model_t and dxfg_time_series_tx_model_t) are thread-safe.
| typedef struct dxfg_indexed_event_model_t dxfg_indexed_event_model_t |
A handle of a Java IndexedEventModel object; release it with dxfg_JavaObjectHandler_release().
The model of a list of indexed events of its symbol, see dxfg_IndexedEventModel_getEventsList().
| typedef struct dxfg_indexed_tx_model_builder_t dxfg_indexed_tx_model_builder_t |
A handle of a Java IndexedTxModel.Builder object; release it with dxfg_JavaObjectHandler_release().
The builder of dxfg_indexed_tx_model_t, see dxfg_IndexedTxModel_newBuilder().
| typedef struct dxfg_indexed_tx_model_t dxfg_indexed_tx_model_t |
A handle of a Java IndexedTxModel object; release it with dxfg_JavaObjectHandler_release().
The model is an incremental model of indexed events: it delivers the complete transactions of the events of its symbol and sources to its listener. Close the model with dxfg_IndexedTxModel_close() before releasing the handle: an attached model stays attached to the feed.
| typedef void(*) dxfg_observable_list_model_listener_function(graal_isolatethread_t *thread, dxfg_event_type_list *orders, void *user_data) |
The function of a dxfg_observable_list_model_listener_t: called after a list of events has changed.
The function is called by the executor of the model that owns the list (by default the executor of the feed the model is attached to, see dxfg_IndexedEventModel_setExecutor()), not by the thread that added the listener. Calls of one model are never concurrent. It is safe to query the model and its lists from inside the call.
The SDK frees the passed list right after the function returns: the callee must not release it and must copy whatever it needs to keep.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | orders | All the events of the changed list, not only the changed ones. The list belongs to the SDK and is valid during the call only. |
| [in] | user_data | The pointer that was passed to dxfg_ObservableListModelListener_new(); the SDK does not use it. |
| typedef struct dxfg_observable_list_model_listener_t dxfg_observable_list_model_listener_t |
A handle of a Java ObservableListModelListener object; release it with dxfg_JavaObjectHandler_release().
Create it with dxfg_ObservableListModelListener_new(). The last handle of the listener that is released deactivates the listener: its function is not called anymore.
| typedef struct dxfg_observable_list_model_t dxfg_observable_list_model_t |
A handle of a Java ObservableListModel object; release it with dxfg_JavaObjectHandler_release().
A live list of events that notifies its listeners about its changes. The handle refers to the same list that the model keeps: the list changes as the model receives events.
The filter of an order book model: which scopes of the order events are shown in the book.
If more than one scope is allowed, the events of a more detailed scope hide the events of a less detailed one: an aggregate order of an exchange and a market maker hides the regional order of that exchange, which in turn hides the composite order.
Java: OrderBookModelFilter.
| typedef void(*) dxfg_order_book_model_listener_function(graal_isolatethread_t *thread, dxfg_order_book_model_t *model, void *user_data) |
The function of a dxfg_order_book_model_listener_t: called after an order book model has changed.
The function is called by the executor of the model (by default the executor of the feed the model is attached to, see dxfg_OrderBookModel_setExecutor()), not by the thread that added the listener. The calls of one model are never concurrent. The notification says which model changed, not what changed: query the lists dxfg_OrderBookModel_getBuyOrders() and dxfg_OrderBookModel_getSellOrders() to get the new orders.
The handle of the model is created for the call and released by the SDK right after the function returns: the callee must not release it. To keep the model, clone the handle with dxfg_JavaObjectHandler_clone().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The model that has changed. The handle is valid during the call only. |
| [in] | user_data | The pointer that was passed to dxfg_OrderBookModelListener_new(); the SDK does not use it. |
| typedef struct dxfg_order_book_model_listener_t dxfg_order_book_model_listener_t |
A handle of a Java OrderBookModelListener object; release it with dxfg_JavaObjectHandler_release().
Create it with dxfg_OrderBookModelListener_new(). The last handle of the listener that is released deactivates the listener: its function is not called anymore.
| typedef struct dxfg_order_book_model_t dxfg_order_book_model_t |
A handle of a Java OrderBookModel object; release it with dxfg_JavaObjectHandler_release().
The model of an order book: it keeps the buy and the sell orders of its symbol in two lists, see dxfg_OrderBookModel_getBuyOrders() and dxfg_OrderBookModel_getSellOrders().
| typedef struct dxfg_time_series_event_model_t dxfg_time_series_event_model_t |
A handle of a Java TimeSeriesEventModel object; release it with dxfg_JavaObjectHandler_release().
The model of a list of time-series events of its symbol, see dxfg_TimeSeriesEventModel_getEventsList().
| typedef struct dxfg_time_series_tx_model_builder_t dxfg_time_series_tx_model_builder_t |
A handle of a Java TimeSeriesTxModel.Builder object; release it with dxfg_JavaObjectHandler_release().
The builder of dxfg_time_series_tx_model_t, see dxfg_TimeSeriesTxModel_newBuilder().
| typedef struct dxfg_time_series_tx_model_t dxfg_time_series_tx_model_t |
A handle of a Java TimeSeriesTxModel object; release it with dxfg_JavaObjectHandler_release().
The model is an incremental model of time-series events: it delivers the complete transactions of the events of its symbol from its time to its listener. Close the model with dxfg_TimeSeriesTxModel_close() before releasing the handle: an attached model stays attached to the feed.
The order in which the events of a snapshot are delivered by a time-series transactional model.
Java: TimeSeriesTxModel.SortOrder.
| typedef struct dxfg_tx_model_listener_t dxfg_tx_model_listener_t |
A handle of a Java TxModelListener object; release it with dxfg_JavaObjectHandler_release().
The listener of the transactional models, create it with dxfg_TxModelListener_new().
| typedef void(*) dxfg_TxModelListener_function_eventsReceived(graal_isolatethread_t *thread, dxfg_indexed_event_source_t *source, dxfg_event_type_list *events, int32_t isSnapshot, void *user_data) |
The function of a dxfg_tx_model_listener_t: called when one or more complete transactions are received.
The function is called by the executor of the model (set with dxfg_IndexedTxModel_Builder_withExecutor() or dxfg_TimeSeriesTxModel_Builder_withExecutor(); by default the executor of the feed), not by the thread that built the model. The calls of one model are never concurrent. The events of one call have the same source and symbol.
The SDK creates the source and the list of events for the call and frees them right after the function returns: the callee must not release them and must copy whatever it needs to keep.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The source of the events. It is valid during the call only. |
| [in] | events | The events of one or more transactions. They belong to the SDK and are valid during the call only. The list can be empty if an empty snapshot was received and the snapshot processing is on. |
| [in] | isSnapshot | 1 if the events are a snapshot (the state kept for the source has to be cleared), 0 otherwise. |
| [in] | user_data | The pointer that was passed to dxfg_TxModelListener_new(); the SDK does not use it. |
The filter of an order book model: which scopes of the order events are shown in the book.
If more than one scope is allowed, the events of a more detailed scope hide the events of a less detailed one: an aggregate order of an exchange and a market maker hides the regional order of that exchange, which in turn hides the composite order.
Java: OrderBookModelFilter.
The order in which the events of a snapshot are delivered by a time-series transactional model.
Java: TimeSeriesTxModel.SortOrder.
| int32_t dxfg_IndexedEventModel_attach | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_event_model_t * | model, | ||
| dxfg_feed_t * | feed ) |
Attaches the indexed event model to the feed: the model starts receiving the events of its symbol.
The feed keeps an attached model: releasing the handle of the model does not detach it. Detach the model with dxfg_IndexedEventModel_detach() or close it with dxfg_IndexedEventModel_close().
Java: IndexedEventModel.attach(DXFeed).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The indexed event model handle. |
| [in] | feed | The feed to attach to. |
| int32_t dxfg_IndexedEventModel_clear | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_event_model_t * | model ) |
Clears the subscription symbol and, with it, all the events of the model.
This is a shortcut for dxfg_IndexedEventModel_setSymbol() with NULL.
Java: IndexedEventModel.clear().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The indexed event model handle. |
| int32_t dxfg_IndexedEventModel_close | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_event_model_t * | model ) |
Closes the indexed event model: it becomes permanently detached from all feeds and removes all its listeners.
Java: IndexedEventModel.close().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The indexed event model handle. |
| int32_t dxfg_IndexedEventModel_detach | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_event_model_t * | model, | ||
| dxfg_feed_t * | feed ) |
Detaches the indexed event model from the feed.
Java: IndexedEventModel.detach(DXFeed).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The indexed event model handle. |
| [in] | feed | The feed to detach from. |
| dxfg_observable_list_model_t * dxfg_IndexedEventModel_getEventsList | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_event_model_t * | model ) |
Returns the list of events of the indexed event model.
The events are ordered by the id of their source and by their index. The handle refers to the live list of the model: its content changes as the model receives events. The function creates a new handle on every call. Read the list with dxfg_ObservableListModel_toArray().
Java: IndexedEventModel.getEventsList().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The indexed event model handle. |
| dxfg_executor_t * dxfg_IndexedEventModel_getExecutor | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_event_model_t * | model ) |
Returns the executor that calls the listeners of the indexed event model.
Java: IndexedEventModel.getExecutor().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The indexed event model handle. |
| int32_t dxfg_IndexedEventModel_getSizeLimit | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_event_model_t * | model ) |
Returns the size limit of the indexed event model.
Java: IndexedEventModel.getSizeLimit().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The indexed event model handle. |
| dxfg_symbol_t * dxfg_IndexedEventModel_getSymbol | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_event_model_t * | model ) |
Returns the subscription symbol of the indexed event model.
Java: IndexedEventModel.getSymbol().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The indexed event model handle. |
| dxfg_indexed_event_model_t * dxfg_IndexedEventModel_new | ( | graal_isolatethread_t * | thread, |
| dxfg_event_clazz_t | clazz ) |
Creates a new model of indexed events of the event type.
The model is not attached to any feed and not subscribed to any symbol. Set the symbol with dxfg_IndexedEventModel_setSymbol() and attach the model with dxfg_IndexedEventModel_attach() to start receiving events.
Java: new IndexedEventModel(Class).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | clazz | The event type of the model; it has to be an indexed event type. |
| int32_t dxfg_IndexedEventModel_setExecutor | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_event_model_t * | model, | ||
| dxfg_executor_t * | executor ) |
Sets the executor that calls the listeners of the indexed event model.
Java: IndexedEventModel.setExecutor(Executor).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The indexed event model handle. |
| [in] | executor | The executor, or NULL to use the default executor of the feed. |
| int32_t dxfg_IndexedEventModel_setSizeLimit | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_event_model_t * | model, | ||
| int32_t | sizeLimit ) |
Sets the size limit of the indexed event model.
A negative size limit is an error.
Java: IndexedEventModel.setSizeLimit(int).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The indexed event model handle. |
| [in] | sizeLimit | The size limit, not negative. When the limit is exceeded, the first events of the list are dropped. |
| int32_t dxfg_IndexedEventModel_setSymbol | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_event_model_t * | model, | ||
| dxfg_symbol_t * | symbol ) |
Sets the subscription symbol of the indexed event model.
Java: IndexedEventModel.setSymbol(Object).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The indexed event model handle. |
| [in] | symbol | The symbol, or NULL to unsubscribe (that removes the events of the model). |
| int32_t dxfg_IndexedTxModel_attach | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_t * | source, | ||
| dxfg_feed_t * | feed ) |
Attaches the model to the feed.
Java: AbstractTxModel.attach(DXFeed).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| [in] | feed | The feed to attach to. |
| dxfg_indexed_tx_model_t * dxfg_IndexedTxModel_Builder_build | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_builder_t * | source ) |
Builds the model (the symbol must be set).
Java: IndexedTxModel.Builder.build().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| dxfg_indexed_tx_model_builder_t * dxfg_IndexedTxModel_Builder_withAggregationPeriod | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_builder_t * | source, | ||
| dxfg_time_period_t * | aggregationPeriod ) |
Sets the aggregation period of the events.
Java: AbstractTxModel.Builder.withAggregationPeriod(TimePeriod).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | aggregationPeriod | The aggregation period of the events. |
| dxfg_indexed_tx_model_builder_t * dxfg_IndexedTxModel_Builder_withBatchProcessing | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_builder_t * | source, | ||
| int32_t | isBatchProcessing ) |
Sets whether the listener gets all the pending transactions in one call (1, default) or one by one (0).
Java: AbstractTxModel.Builder.withBatchProcessing(boolean).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | isBatchProcessing | 1 to deliver all the pending transactions in one call, 0 to deliver them one by one. |
| dxfg_indexed_tx_model_builder_t * dxfg_IndexedTxModel_Builder_withExecutor | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_builder_t * | source, | ||
| dxfg_executor_t * | executor ) |
Sets the executor that calls the listener (by default, the executor of the feed).
Java: AbstractTxModel.Builder.withExecutor(Executor).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | executor | The executor that calls the listener. |
| dxfg_indexed_tx_model_builder_t * dxfg_IndexedTxModel_Builder_withFeed | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_builder_t * | source, | ||
| dxfg_feed_t * | feed ) |
Sets the feed the model is attached to.
Java: AbstractTxModel.Builder.withFeed(DXFeed).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | feed | The feed the model is attached to. |
| dxfg_indexed_tx_model_builder_t * dxfg_IndexedTxModel_Builder_withListener | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_builder_t * | source, | ||
| dxfg_tx_model_listener_t * | listener ) |
Sets the listener of the transactions.
Java: AbstractTxModel.Builder.withListener(TxModelListener).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | listener | The listener of the transactions (see dxfg_TxModelListener_new()). |
| dxfg_indexed_tx_model_builder_t * dxfg_IndexedTxModel_Builder_withSnapshotProcessing | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_builder_t * | source, | ||
| int32_t | isSnapshotProcessing ) |
Sets whether a snapshot is delivered as its resulting state (1) or as it comes (0, default).
Java: AbstractTxModel.Builder.withSnapshotProcessing(boolean).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | isSnapshotProcessing | 1 to deliver a snapshot as its resulting state (without the removed events), 0 to deliver it as it comes. |
| dxfg_indexed_tx_model_builder_t * dxfg_IndexedTxModel_Builder_withSources | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_builder_t * | source, | ||
| dxfg_indexed_event_source_list * | sources ) |
Sets the sources (an empty list means all the sources).
Java: IndexedTxModel.Builder.withSources(Collection).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | sources | The sources of the events; an empty list means all the sources. |
| dxfg_indexed_tx_model_builder_t * dxfg_IndexedTxModel_Builder_withSymbol | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_builder_t * | source, | ||
| dxfg_symbol_t * | symbol ) |
Sets the symbol of the subscription.
Java: AbstractTxModel.Builder.withSymbol(Object).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | symbol | The symbol to subscribe for (a dxfg_symbol_t). |
| int32_t dxfg_IndexedTxModel_close | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_t * | source ) |
Closes the model: it is detached from all the feeds for good. Closing it again does nothing.
Java: AbstractTxModel.close().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| int32_t dxfg_IndexedTxModel_detach | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_t * | source, | ||
| dxfg_feed_t * | feed ) |
Detaches the model from the feed.
Java: AbstractTxModel.detach(DXFeed).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| [in] | feed | The feed to detach from. |
| dxfg_indexed_event_source_list * dxfg_IndexedTxModel_getSources | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_t * | source ) |
Returns the sources of the model.
Java: IndexedTxModel.getSources().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| int32_t dxfg_IndexedTxModel_isBatchProcessing | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_t * | source ) |
Returns whether the listener gets all the pending transactions in one call.
Java: AbstractTxModel.isBatchProcessing().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| int32_t dxfg_IndexedTxModel_isSnapshotProcessing | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_t * | source ) |
Returns whether a snapshot is delivered as its resulting state (without the removed events).
Java: AbstractTxModel.isSnapshotProcessing().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| dxfg_indexed_tx_model_builder_t * dxfg_IndexedTxModel_newBuilder | ( | graal_isolatethread_t * | thread, |
| dxfg_event_clazz_t | eventType ) |
Creates a new builder of a model of the indexed events of the type.
Java: IndexedTxModel.newBuilder(Class).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | eventType | The type of the indexed events of the model. |
| int32_t dxfg_IndexedTxModel_setAggregationPeriod | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_t * | source, | ||
| dxfg_time_period_t * | aggregationPeriod ) |
Sets the aggregation period of the events.
Java: AbstractTxModel.setAggregationPeriod(TimePeriod).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| [in] | aggregationPeriod | The new aggregation period of the events. |
| int32_t dxfg_IndexedTxModel_setSources | ( | graal_isolatethread_t * | thread, |
| dxfg_indexed_tx_model_t * | source, | ||
| dxfg_indexed_event_source_list * | sources ) |
Sets the sources of the model: it subscribes to the new ones and unsubscribes from the old ones.
An empty list means all the sources.
Java: IndexedTxModel.setSources(Set).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| [in] | sources | The new sources of the model; an empty list means all the sources. |
| int32_t dxfg_ObservableListModel_addListener | ( | graal_isolatethread_t * | thread, |
| dxfg_observable_list_model_t * | list, | ||
| dxfg_observable_list_model_listener_t * | listener ) |
Adds the listener to the list.
Java: ObservableListModel.addListener(ObservableListModelListener).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | list | The list handle. |
| [in] | listener | The listener handle. |
| int32_t dxfg_ObservableListModel_removeListener | ( | graal_isolatethread_t * | thread, |
| dxfg_observable_list_model_t * | list, | ||
| dxfg_observable_list_model_listener_t * | listener ) |
Removes the listener from the list. If the listener is not added to the list, nothing happens.
Java: ObservableListModel.removeListener(ObservableListModelListener).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | list | The list handle. |
| [in] | listener | The listener handle. |
| dxfg_event_type_list * dxfg_ObservableListModel_toArray | ( | graal_isolatethread_t * | thread, |
| dxfg_observable_list_model_t * | list ) |
Returns the events of the list as a new list of events.
The result is a snapshot: it does not change when the list changes. An empty list gives a list of size 0.
Java: the elements of ObservableListModel (a java.util.List).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | list | The list handle. |
| dxfg_observable_list_model_listener_t * dxfg_ObservableListModelListener_new | ( | graal_isolatethread_t * | thread, |
| dxfg_observable_list_model_listener_function | user_func, | ||
| void * | user_data ) |
Creates a listener of the changes of a list that calls the function with the user data.
Add the listener to a list with dxfg_ObservableListModel_addListener(). After the last handle of the listener is released the function is not called anymore and none of its calls is in progress, so the user data can be freed. Remove the listener from the list before releasing it, otherwise it stays added and does nothing, see dxfg_JavaObjectHandler_release().
Java: ObservableListModelListener.modelChanged(ObservableListModelListener.Change).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | user_func | The function to call after the list has changed; see dxfg_observable_list_model_listener_function for the thread and the ownership of its data. |
| [in] | user_data | The pointer that is passed to the function as is; the SDK does not use it. It has to stay valid until the listener is released. |
| int32_t dxfg_OrderBookModel_addListener | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model, | ||
| dxfg_order_book_model_listener_t * | listener ) |
Adds the listener to the order book model. A closed model does not add listeners.
Java: OrderBookModel.addListener(OrderBookModelListener).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| [in] | listener | The listener handle. |
| int32_t dxfg_OrderBookModel_attach | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model, | ||
| dxfg_feed_t * | feed ) |
Attaches the order book model to the feed: the model starts receiving the events of its symbol.
The feed keeps an attached model: releasing the handle of the model does not detach it. Detach the model with dxfg_OrderBookModel_detach() or close it with dxfg_OrderBookModel_close().
Java: OrderBookModel.attach(DXFeed).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| [in] | feed | The feed to attach to. |
| int32_t dxfg_OrderBookModel_clear | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model ) |
Clears the subscription symbol and, with it, all the orders of the model.
This is a shortcut for dxfg_OrderBookModel_setSymbol() with NULL.
Java: OrderBookModel.clear().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| int32_t dxfg_OrderBookModel_close | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model ) |
Closes the order book model: it becomes permanently detached from all feeds and removes all its listeners.
Java: OrderBookModel.close().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| int32_t dxfg_OrderBookModel_detach | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model, | ||
| dxfg_feed_t * | feed ) |
Detaches the order book model from the feed.
Java: OrderBookModel.detach(DXFeed).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| [in] | feed | The feed to detach from. |
| dxfg_observable_list_model_t * dxfg_OrderBookModel_getBuyOrders | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model ) |
Returns the buy orders (the bid side) of the order book model.
The orders are arranged by price: the first order is the top of the bid side (the highest price). The handle refers to the live list of the model: its content changes as the model receives events. The function creates a new handle on every call. Read the list with dxfg_ObservableListModel_toArray().
Java: OrderBookModel.getBuyOrders().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| dxfg_executor_t * dxfg_OrderBookModel_getExecutor | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model ) |
Returns the executor that calls the listeners of the order book model.
Java: OrderBookModel.getExecutor().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| int32_t dxfg_OrderBookModel_getFilter | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model ) |
Returns the filter of the order book model.
Java: OrderBookModel.getFilter().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| int32_t dxfg_OrderBookModel_getLotSize | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model ) |
Returns the lot size of the order book model.
The lot size is a multiplier applied to the sizes of the composite, regional and aggregate orders (1 by default).
Java: OrderBookModel.getLotSize().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| dxfg_observable_list_model_t * dxfg_OrderBookModel_getSellOrders | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model ) |
Returns the sell orders (the offer side) of the order book model.
The orders are arranged by price: the first order is the top of the offer side (the lowest price). The handle refers to the live list of the model: its content changes as the model receives events. The function creates a new handle on every call. Read the list with dxfg_ObservableListModel_toArray().
Java: OrderBookModel.getSellOrders().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| const char * dxfg_OrderBookModel_getSymbol | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model ) |
Returns the subscription symbol of the order book model.
Java: OrderBookModel.getSymbol().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| dxfg_order_book_model_t * dxfg_OrderBookModel_new | ( | graal_isolatethread_t * | thread | ) |
Creates a new order book model.
The model is not attached to any feed and not subscribed to any symbol. Its filter is ALL and its lot size is 1. Set the symbol with dxfg_OrderBookModel_setSymbol() and attach the model with dxfg_OrderBookModel_attach() to start receiving orders.
Java: new OrderBookModel().
| [in] | thread | The current GraalVM Isolate's thread. |
| int32_t dxfg_OrderBookModel_removeListener | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model, | ||
| dxfg_order_book_model_listener_t * | listener ) |
Removes the listener from the order book model. If the listener is not added to the model, nothing happens.
Java: OrderBookModel.removeListener(OrderBookModelListener).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| [in] | listener | The listener handle. |
| int32_t dxfg_OrderBookModel_setExecutor | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model, | ||
| dxfg_executor_t * | executor ) |
Sets the executor that calls the listeners of the order book model.
Java: OrderBookModel.setExecutor(Executor).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| [in] | executor | The executor, or NULL to use the default executor of the feed. |
| int32_t dxfg_OrderBookModel_setFilter | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model, | ||
| dxfg_order_book_model_filter_t | filter ) |
Sets the filter of the order book model.
Java: OrderBookModel.setFilter(OrderBookModelFilter).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| [in] | filter | The filter. |
| int32_t dxfg_OrderBookModel_setLotSize | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model, | ||
| int32_t | lotSize ) |
Sets the lot size of the order book model.
A lot size less than 1 is an error.
Java: OrderBookModel.setLotSize(int).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| [in] | lotSize | The lot size multiplier, 1 or greater. |
| int32_t dxfg_OrderBookModel_setSymbol | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_t * | model, | ||
| const char * | symbol ) |
Sets the subscription symbol of the order book model.
Java: OrderBookModel.setSymbol(String).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The order book model handle. |
| [in] | symbol | The symbol, a UTF-8 string, or NULL to unsubscribe (that removes the orders of the model). |
| dxfg_order_book_model_listener_t * dxfg_OrderBookModelListener_new | ( | graal_isolatethread_t * | thread, |
| dxfg_order_book_model_listener_function | user_func, | ||
| void * | user_data ) |
Creates a listener of the changes of an order book model that calls the function with the user data.
Add the listener to a model with dxfg_OrderBookModel_addListener(). After the last handle of the listener is released the function is not called anymore and none of its calls is in progress, so the user data can be freed. Remove the listener from the model before releasing it, otherwise it stays added and does nothing, see dxfg_JavaObjectHandler_release().
Java: OrderBookModelListener.modelChanged(OrderBookModelListener.Change).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | user_func | The function to call after the model has changed; see dxfg_order_book_model_listener_function for the thread and the ownership of its data. |
| [in] | user_data | The pointer that is passed to the function as is; the SDK does not use it. It has to stay valid until the listener is released. |
| int32_t dxfg_TimeSeriesEventModel_attach | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_event_model_t * | model, | ||
| dxfg_feed_t * | feed ) |
Attaches the time-series event model to the feed: the model starts receiving the events of its symbol.
The feed keeps an attached model: releasing the handle of the model does not detach it. Detach the model with dxfg_TimeSeriesEventModel_detach() or close it with dxfg_TimeSeriesEventModel_close().
Java: TimeSeriesEventModel.attach(DXFeed).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The time-series event model handle. |
| [in] | feed | The feed to attach to. |
| int32_t dxfg_TimeSeriesEventModel_clear | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_event_model_t * | model ) |
Clears the subscription symbol, sets the from-time to INT64_MAX and, with it, clears all the events of the model.
Java: TimeSeriesEventModel.clear().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The time-series event model handle. |
| int32_t dxfg_TimeSeriesEventModel_close | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_event_model_t * | model ) |
Closes the time-series event model: it becomes permanently detached from all feeds and removes all its listeners.
Java: TimeSeriesEventModel.close().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The time-series event model handle. |
| int32_t dxfg_TimeSeriesEventModel_detach | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_event_model_t * | model, | ||
| dxfg_feed_t * | feed ) |
Detaches the time-series event model from the feed.
Java: TimeSeriesEventModel.detach(DXFeed).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The time-series event model handle. |
| [in] | feed | The feed to detach from. |
| dxfg_observable_list_model_t * dxfg_TimeSeriesEventModel_getEventsList | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_event_model_t * | model ) |
Returns the list of events of the time-series event model.
The events are ordered by their time. The handle refers to the live list of the model: its content changes as the model receives events. The function creates a new handle on every call. Read the list with dxfg_ObservableListModel_toArray().
Java: TimeSeriesEventModel.getEventsList().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The time-series event model handle. |
| dxfg_executor_t * dxfg_TimeSeriesEventModel_getExecutor | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_event_model_t * | model ) |
Returns the executor that calls the listeners of the time-series event model.
Java: TimeSeriesEventModel.getExecutor().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The time-series event model handle. |
| int64_t dxfg_TimeSeriesEventModel_getFromTime | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_event_model_t * | model ) |
Returns the time from which the time-series event model subscribes for events.
Java: TimeSeriesEventModel.getFromTime().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The time-series event model handle. |
| int32_t dxfg_TimeSeriesEventModel_getSizeLimit | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_event_model_t * | model ) |
Returns the size limit of the time-series event model.
Java: TimeSeriesEventModel.getSizeLimit().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The time-series event model handle. |
| dxfg_symbol_t * dxfg_TimeSeriesEventModel_getSymbol | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_event_model_t * | model ) |
Returns the subscription symbol of the time-series event model.
Java: TimeSeriesEventModel.getSymbol().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The time-series event model handle. |
| dxfg_time_series_event_model_t * dxfg_TimeSeriesEventModel_new | ( | graal_isolatethread_t * | thread, |
| dxfg_event_clazz_t | clazz ) |
Creates a new model of time-series events of the event type.
The model is not attached to any feed and not subscribed to any symbol (its from-time is INT64_MAX). Set the symbol and the from-time with dxfg_TimeSeriesEventModel_setSymbol() and dxfg_TimeSeriesEventModel_setFromTime() and attach the model with dxfg_TimeSeriesEventModel_attach() to start receiving events.
Java: new TimeSeriesEventModel(Class).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | clazz | The event type of the model; it has to be a time-series event type. |
| int32_t dxfg_TimeSeriesEventModel_setExecutor | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_event_model_t * | model, | ||
| dxfg_executor_t * | executor ) |
Sets the executor that calls the listeners of the time-series event model.
Java: TimeSeriesEventModel.setExecutor(Executor).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The time-series event model handle. |
| [in] | executor | The executor, or NULL to use the default executor of the feed. |
| int32_t dxfg_TimeSeriesEventModel_setFromTime | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_event_model_t * | model, | ||
| int64_t | fromTime ) |
Sets the time from which the time-series event model subscribes for events.
Java: TimeSeriesEventModel.setFromTime(long).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The time-series event model handle. |
| [in] | fromTime | The time in milliseconds since the epoch; INT64_MAX unsubscribes. |
| int32_t dxfg_TimeSeriesEventModel_setSizeLimit | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_event_model_t * | model, | ||
| int32_t | sizeLimit ) |
Sets the size limit of the time-series event model.
A negative size limit is an error.
Java: TimeSeriesEventModel.setSizeLimit(int).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The time-series event model handle. |
| [in] | sizeLimit | The size limit, not negative. When the limit is exceeded, the first events of the list are dropped. |
| int32_t dxfg_TimeSeriesEventModel_setSymbol | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_event_model_t * | model, | ||
| dxfg_symbol_t * | symbol ) |
Sets the subscription symbol of the time-series event model.
Java: TimeSeriesEventModel.setSymbol(Object).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | model | The time-series event model handle. |
| [in] | symbol | The symbol, or NULL to unsubscribe (that removes the events of the model). |
| int32_t dxfg_TimeSeriesTxModel_attach | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_t * | source, | ||
| dxfg_feed_t * | feed ) |
Attaches the model to the feed.
Java: AbstractTxModel.attach(DXFeed).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| [in] | feed | The feed to attach to. |
| dxfg_time_series_tx_model_t * dxfg_TimeSeriesTxModel_Builder_build | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source ) |
Builds the model (the symbol must be set).
Java: TimeSeriesTxModel.Builder.build().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_Builder_ignoreEventsFromPast | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source, | ||
| int32_t | ignoreEventFromPast ) |
Sets whether the events with an index not greater than the last processed one are dropped (1) or delivered (0, default).
Java: TimeSeriesTxModel.Builder.ignoreEventsFromPast(boolean).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | ignoreEventFromPast | 1 to drop the events with an index not greater than the last processed one, 0 to deliver them. |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_Builder_ignoreRemoveEvents | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source, | ||
| int32_t | ignoreRemoveEvents ) |
Sets whether the removed events are dropped (1) or delivered (0, default).
Java: TimeSeriesTxModel.Builder.ignoreRemoveEvents(boolean).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | ignoreRemoveEvents | 1 to drop the removed events, 0 to deliver them. |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_Builder_withAggregationPeriod | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source, | ||
| dxfg_time_period_t * | aggregationPeriod ) |
Sets the aggregation period of the events.
Java: AbstractTxModel.Builder.withAggregationPeriod(TimePeriod).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | aggregationPeriod | The aggregation period of the events. |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_Builder_withBatchProcessing | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source, | ||
| int32_t | isBatchProcessing ) |
Sets whether the listener gets all the pending transactions in one call (1, default) or one by one (0).
Java: AbstractTxModel.Builder.withBatchProcessing(boolean).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | isBatchProcessing | 1 to deliver all the pending transactions in one call, 0 to deliver them one by one. |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_Builder_withConfirmationTick | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source, | ||
| int32_t | confirmationTick ) |
Sets whether a new bar comes after the previous (closing) one, to confirm it (1), or alone (0, default).
With 1, the snapshot processing and the ascending sorting are on.
Java: TimeSeriesTxModel.Builder.withConfirmationTick(boolean).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | confirmationTick | 1 to deliver a new bar after the previous (closing) one, to confirm it, 0 to deliver it alone. |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_Builder_withEventPeek | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source, | ||
| void * | eventPeek ) |
Accepted for compatibility: the pointer is ignored, the model gets no event peek (a Java Consumer).
Java: TimeSeriesTxModel.Builder.withEventPeek(Consumer).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | eventPeek | Ignored: pass NULL. |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_Builder_withExecutor | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source, | ||
| dxfg_executor_t * | executor ) |
Sets the executor that calls the listener (by default, the executor of the feed).
Java: AbstractTxModel.Builder.withExecutor(Executor).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | executor | The executor that calls the listener. |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_Builder_withFeed | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source, | ||
| dxfg_feed_t * | feed ) |
Sets the feed the model is attached to.
Java: AbstractTxModel.Builder.withFeed(DXFeed).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | feed | The feed the model is attached to. |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_Builder_withFromTime | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source, | ||
| int64_t | fromTime ) |
Sets the time to subscribe from, in milliseconds since the epoch (by default INT64_MAX: not subscribed).
Java: TimeSeriesTxModel.Builder.withFromTime(long).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | fromTime | The time to subscribe from, in milliseconds since the epoch (INT64_MAX: not subscribed). |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_Builder_withListener | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source, | ||
| dxfg_tx_model_listener_t * | listener ) |
Sets the listener of the transactions.
Java: AbstractTxModel.Builder.withListener(TxModelListener).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | listener | The listener of the transactions (see dxfg_TxModelListener_new()). |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_Builder_withSnapshotProcessing | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source, | ||
| int32_t | isSnapshotProcessing ) |
Sets whether a snapshot is delivered as its resulting state (1) or as it comes (0, default).
Java: AbstractTxModel.Builder.withSnapshotProcessing(boolean).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | isSnapshotProcessing | 1 to deliver a snapshot as its resulting state (without the removed events), 0 to deliver it as it comes. |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_Builder_withSorting | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source, | ||
| dxfg_TimeSeriesTxModelSortOrder_t | sortOrder ) |
Sets the order of the events of a snapshot.
Java: TimeSeriesTxModel.Builder.withSorting(TimeSeriesTxModel.SortOrder).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | sortOrder | The order of the events of a snapshot. |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_Builder_withSymbol | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_builder_t * | source, | ||
| dxfg_symbol_t * | symbol ) |
Sets the symbol of the subscription.
Java: AbstractTxModel.Builder.withSymbol(Object).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The builder handle. |
| [in] | symbol | The symbol to subscribe for (a dxfg_symbol_t). |
| int32_t dxfg_TimeSeriesTxModel_close | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_t * | source ) |
Closes the model: it is detached from all the feeds for good. Closing it again does nothing.
Java: AbstractTxModel.close().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| int32_t dxfg_TimeSeriesTxModel_detach | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_t * | source, | ||
| dxfg_feed_t * | feed ) |
Detaches the model from the feed.
Java: AbstractTxModel.detach(DXFeed).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| [in] | feed | The feed to detach from. |
| int64_t dxfg_TimeSeriesTxModel_getFromTime | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_t * | source ) |
Returns the time the model is subscribed from.
Java: TimeSeriesTxModel.getFromTime().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| int32_t dxfg_TimeSeriesTxModel_isBatchProcessing | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_t * | source ) |
Returns whether the listener gets all the pending transactions in one call.
Java: AbstractTxModel.isBatchProcessing().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| int32_t dxfg_TimeSeriesTxModel_isSnapshotProcessing | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_t * | source ) |
Returns whether a snapshot is delivered as its resulting state (without the removed events).
Java: AbstractTxModel.isSnapshotProcessing().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| dxfg_time_series_tx_model_builder_t * dxfg_TimeSeriesTxModel_newBuilder | ( | graal_isolatethread_t * | thread, |
| dxfg_event_clazz_t | eventType ) |
Creates a new builder of a model of the time-series events of the type.
Java: TimeSeriesTxModel.newBuilder(Class).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | eventType | The type of the time-series events of the model. |
| int32_t dxfg_TimeSeriesTxModel_setAggregationPeriod | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_t * | source, | ||
| dxfg_time_period_t * | aggregationPeriod ) |
Sets the aggregation period of the events.
Java: AbstractTxModel.setAggregationPeriod(TimePeriod).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| [in] | aggregationPeriod | The new aggregation period of the events. |
| int32_t dxfg_TimeSeriesTxModel_setFromTime | ( | graal_isolatethread_t * | thread, |
| dxfg_time_series_tx_model_t * | source, | ||
| int64_t | fromTime ) |
Sets the time the model is subscribed from (INT64_MAX unsubscribes); the model gets a new snapshot.
Java: TimeSeriesTxModel.setFromTime(long).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The model handle. |
| [in] | fromTime | The time to subscribe from, in milliseconds since the epoch; INT64_MAX unsubscribes. |
| dxfg_tx_model_listener_t * dxfg_TxModelListener_new | ( | graal_isolatethread_t * | thread, |
| dxfg_TxModelListener_function_eventsReceived | function_eventsReceived, | ||
| void * | user_data ) |
Creates a listener that calls the function with the user data.
After the last handle of the listener is released (dxfg_JavaObjectHandler_release()), the function is not called anymore and none of its calls is in progress, so the user data can be freed.
Java: TxModelListener.eventsReceived(IndexedEventSource, List, boolean).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | function_eventsReceived | The function to call when transactions are received; see dxfg_TxModelListener_function_eventsReceived for the thread and the ownership of its data. |
| [in] | user_data | The pointer that is passed to the function as is; the SDK does not use it. It has to stay valid until the listener is released. |