|
dxFeed Graal Native SDK 3.14.0-rc2
|
The v4 functions and type names of the group SubscriptionController. Every function returns DXFG_EXECUTE_SUCCESSFULLY or DXFG_EXECUTE_FAIL and writes its result to a DXFG_OUT parameter, see The v4 functions. More...
Typedefs | |
| typedef dxfg_feed_t | dxfg_v4_feed_t |
| A handle of a Java DXFeed object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef dxfg_subscription_controller_t | dxfg_v4_subscription_controller_t |
| A handle of a Java SubscriptionController object; release it with dxfg_JavaObjectHandler_release(). | |
The v4 functions and type names of the group SubscriptionController. Every function returns DXFG_EXECUTE_SUCCESSFULLY or DXFG_EXECUTE_FAIL and writes its result to a DXFG_OUT parameter, see The v4 functions.
| typedef dxfg_feed_t dxfg_v4_feed_t |
A handle of a Java DXFeed object; release it with dxfg_JavaObjectHandler_release().
Get the feed of the default endpoint with dxfg_DXFeed_getInstance() or the feed of an endpoint with dxfg_DXEndpoint_getFeed(). Releasing the handle does not close the endpoint of the feed.
A handle of a Java SubscriptionController object; release it with dxfg_JavaObjectHandler_release().
Get it with dxfg_DXFeedSubscription_getSubscriptionController() or from a model. Releasing the handle does not affect the subscription.
| int32_t dxfg_v4_SubscriptionController_attach | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_subscription_controller_t * | subscriptionController, | ||
| dxfg_v4_feed_t * | feed ) |
Attaches the underlying subscription to the specified feed.
The attached subscription receives the events of the feed. It can be attached to several feeds at the same time, but this is rarely necessary and is not recommended.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | subscriptionController | The subscription controller handle. |
| [in] | feed | The feed to attach to. |
Java: SubscriptionController.attach(DXFeed).
| int32_t dxfg_v4_SubscriptionController_detach | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_subscription_controller_t * | subscriptionController, | ||
| dxfg_v4_feed_t * | feed ) |
Detaches the underlying subscription from the specified feed.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | subscriptionController | The subscription controller handle. |
| [in] | feed | The feed to detach from. |
Java: SubscriptionController.detach(DXFeed).
| int32_t dxfg_v4_SubscriptionController_getAggregationPeriod | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_subscription_controller_t * | subscriptionController, | ||
| DXFG_OUT dxfg_v4_time_period_t ** | aggregationPeriod ) |
Returns the aggregation period for data for this underlying subscription.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | subscriptionController | The subscription controller handle. |
| [out] | aggregationPeriod | The aggregation period for data, represented as a TimePeriod object. It is NULL if no aggregation period was set. Release the handle with dxfg_v4_JavaObjectHandler_release(). It is written on success only. |
Java: SubscriptionController.getAggregationPeriod().
| int32_t dxfg_v4_SubscriptionController_getAggregationPeriodMillis | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_subscription_controller_t * | subscriptionController, | ||
| DXFG_OUT int64_t * | aggregationPeriod ) |
Returns the aggregation period for data for this underlying subscription in millis.
The function fails if no aggregation period was set (the Java side throws a NullPointerException): use dxfg_v4_SubscriptionController_getAggregationPeriod(), which gives NULL in this case.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | subscriptionController | The subscription controller handle. |
| [out] | aggregationPeriod | The aggregation period for data, represented as a timestamp in millis. It is written on success only. |
Java: SubscriptionController.getAggregationPeriod().
| int32_t dxfg_v4_SubscriptionController_getEventsBatchLimit | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_subscription_controller_t * | subscriptionController, | ||
| DXFG_OUT int32_t * | eventsBatchLimit ) |
Returns maximum number of events in the single notification of the listener. This is not a strict guarantee, some implementations may exceed the limit.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | subscriptionController | The subscription controller handle. |
| [out] | eventsBatchLimit | The maximum number of events in the single notification of the listener: 0 for the optimal limit (the default), INT32_MAX for the maximum limit. It is written on success only. |
Java: SubscriptionController.getEventsBatchLimit().
| int32_t dxfg_v4_SubscriptionController_getExecutor | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_subscription_controller_t * | subscriptionController, | ||
| DXFG_OUT dxfg_v4_executor_t ** | executor ) |
Returns executor for processing event notifications on this underlying subscription.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | subscriptionController | The subscription controller handle. |
| [out] | executor | The executor for processing event notifications on this underlying subscription. Or NULL if the default executor is used. Release the handle with dxfg_v4_JavaObjectHandler_release(). It is written on success only. |
Java: SubscriptionController.getExecutor().
| int32_t dxfg_v4_SubscriptionController_setAggregationPeriod | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_subscription_controller_t * | subscriptionController, | ||
| dxfg_v4_time_period_t * | aggregationPeriod ) |
Sets the aggregation period for data that limits the rate of data notifications. For example, setting the value to 0.1s limits notification to once every 100ms (at most 10 per second). The new aggregation period will take effect during the next iteration of data notification.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | subscriptionController | The subscription controller handle. |
| [in] | aggregationPeriod | The aggregation period for data. The controller does not take the handle: release it with dxfg_v4_JavaObjectHandler_release() when it is no longer needed. For a subscription the period must not exceed 24 hours. |
Java: SubscriptionController.setAggregationPeriod(TimePeriod).
| int32_t dxfg_v4_SubscriptionController_setAggregationPeriodMillis | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_subscription_controller_t * | subscriptionController, | ||
| int64_t | aggregationPeriod ) |
Sets the aggregation period for data that limits the rate of data notifications. For example, setting the value to 100 limits notification to once every 100ms (at most 10 per second). The new aggregation period will take effect during the next iteration of data notification.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | subscriptionController | The subscription controller handle. |
| [in] | aggregationPeriod | The aggregation period for data in millis. For a subscription it must not exceed 24 hours (86400000). |
Java: SubscriptionController.setAggregationPeriod(TimePeriod), called with TimePeriod.valueOf(long).
| int32_t dxfg_v4_SubscriptionController_setEventsBatchLimit | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_subscription_controller_t * | subscriptionController, | ||
| int32_t | eventsBatchLimit ) |
Sets maximum number of events in the single notification of the listener. This is not a strict guarantee, some implementations may exceed the limit.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | subscriptionController | The subscription controller handle. |
| [in] | eventsBatchLimit | The notification events limit: 0 for the optimal limit (the default), INT32_MAX for the maximum limit. It must not be negative. |
Java: SubscriptionController.setEventsBatchLimit(int).
| int32_t dxfg_v4_SubscriptionController_setExecutor | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_subscription_controller_t * | subscriptionController, | ||
| dxfg_v4_executor_t * | executor ) |
Changes executor for processing event notifications on this underlying subscription.
The controller does not take the handle of the executor: release it with dxfg_v4_JavaObjectHandler_release() when it is no longer needed. As dxfg_v4_DXFeedSubscription_setExecutor(), the function fails with IllegalStateException for a subscription attached to an event queue and for the executor of an attached subscription, and accepts the executor of a shared queue (dxfg_v4_EventQueue_getExecutor()).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | subscriptionController | The subscription controller handle. |
| [in] | executor | The executor for processing event notifications on this underlying subscription. Or NULL if the default executor is used. |
Java: SubscriptionController.setExecutor(Executor).