dxFeed Graal Native SDK 3.9.0
Loading...
Searching...
No Matches
SubscriptionController

Data Structures

struct  dxfg_subscription_controller_t

Typedefs

typedef struct dxfg_feed_t dxfg_feed_t
typedef struct dxfg_subscription_controller_t dxfg_subscription_controller_t

Functions

int32_t dxfg_SubscriptionController_attach (graal_isolatethread_t *thread, dxfg_subscription_controller_t *subscriptionController, dxfg_feed_t *feed)
int32_t dxfg_SubscriptionController_detach (graal_isolatethread_t *thread, dxfg_subscription_controller_t *subscriptionController, dxfg_feed_t *feed)
int32_t dxfg_SubscriptionController_getEventsBatchLimit (graal_isolatethread_t *thread, dxfg_subscription_controller_t *subscriptionController, DXFG_OUT int32_t *eventsBatchLimit)
int32_t dxfg_SubscriptionController_setEventsBatchLimit (graal_isolatethread_t *thread, dxfg_subscription_controller_t *subscriptionController, int32_t eventsBatchLimit)
int32_t dxfg_SubscriptionController_getAggregationPeriod (graal_isolatethread_t *thread, dxfg_subscription_controller_t *subscriptionController, DXFG_OUT dxfg_time_period_t **aggregationPeriod)
int32_t dxfg_SubscriptionController_getAggregationPeriodMillis (graal_isolatethread_t *thread, dxfg_subscription_controller_t *subscriptionController, DXFG_OUT int64_t *aggregationPeriod)
int32_t dxfg_SubscriptionController_setAggregationPeriod (graal_isolatethread_t *thread, dxfg_subscription_controller_t *subscriptionController, dxfg_time_period_t *aggregationPeriod)
int32_t dxfg_SubscriptionController_setAggregationPeriodMillis (graal_isolatethread_t *thread, dxfg_subscription_controller_t *subscriptionController, int64_t aggregationPeriod)
int32_t dxfg_SubscriptionController_getExecutor (graal_isolatethread_t *thread, dxfg_subscription_controller_t *subscriptionController, DXFG_OUT dxfg_executor_t **executor)
int32_t dxfg_SubscriptionController_setExecutor (graal_isolatethread_t *thread, dxfg_subscription_controller_t *subscriptionController, dxfg_executor_t *executor)

Detailed Description

Typedef Documentation

◆ dxfg_feed_t

typedef struct dxfg_feed_t dxfg_feed_t

◆ dxfg_subscription_controller_t

typedef struct dxfg_subscription_controller_t dxfg_subscription_controller_t

The SubscriptionController instance's handle.

Javadoc

Function Documentation

◆ dxfg_SubscriptionController_attach()

int32_t dxfg_SubscriptionController_attach ( graal_isolatethread_t * thread,
dxfg_subscription_controller_t * subscriptionController,
dxfg_feed_t * feed )

Attaches the underlying subscription to the specified feed.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subscriptionControllerThe subscription controller handle.
[in]feedThe feed to attach to.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.
See also
https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/SubscriptionController.html#attach-com.dxfeed.api.DXFeed-

◆ dxfg_SubscriptionController_detach()

int32_t dxfg_SubscriptionController_detach ( graal_isolatethread_t * thread,
dxfg_subscription_controller_t * subscriptionController,
dxfg_feed_t * feed )

Detaches the underlying subscription from the specified feed.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subscriptionControllerThe subscription controller handle.
[in]feedThe feed to detach from.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.
See also
https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/SubscriptionController.html#detach-com.dxfeed.api.DXFeed-

◆ dxfg_SubscriptionController_getAggregationPeriod()

int32_t dxfg_SubscriptionController_getAggregationPeriod ( graal_isolatethread_t * thread,
dxfg_subscription_controller_t * subscriptionController,
DXFG_OUT dxfg_time_period_t ** aggregationPeriod )

Returns the aggregation period for data for this underlying subscription.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subscriptionControllerThe subscription controller handle.
[out]aggregationPeriodThe aggregation period for data, represented as a TimePeriod object.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown. Use dxfg_JavaObjectHandler_release() to free the TimePeriod handle.

◆ dxfg_SubscriptionController_getAggregationPeriodMillis()

int32_t dxfg_SubscriptionController_getAggregationPeriodMillis ( graal_isolatethread_t * thread,
dxfg_subscription_controller_t * subscriptionController,
DXFG_OUT int64_t * aggregationPeriod )

Returns the aggregation period for data for this underlying subscription in millis.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subscriptionControllerThe subscription controller handle.
[out]aggregationPeriodThe aggregation period for data, represented as a timestamp in millis.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.

◆ dxfg_SubscriptionController_getEventsBatchLimit()

int32_t dxfg_SubscriptionController_getEventsBatchLimit ( graal_isolatethread_t * thread,
dxfg_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.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subscriptionControllerThe subscription controller handle.
[out]eventsBatchLimitThe maximum number of events in the single notification of the listener.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.

◆ dxfg_SubscriptionController_getExecutor()

int32_t dxfg_SubscriptionController_getExecutor ( graal_isolatethread_t * thread,
dxfg_subscription_controller_t * subscriptionController,
DXFG_OUT dxfg_executor_t ** executor )

Returns executor for processing event notifications on this underlying subscription.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subscriptionControllerThe subscription controller handle.
[out]executorThe executor for processing event notifications on this underlying subscription. Or NULL if the default executor is used.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown. Use dxfg_JavaObjectHandler_release() to free the Executor handle.

◆ dxfg_SubscriptionController_setAggregationPeriod()

int32_t dxfg_SubscriptionController_setAggregationPeriod ( graal_isolatethread_t * thread,
dxfg_subscription_controller_t * subscriptionController,
dxfg_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.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subscriptionControllerThe subscription controller handle.
[in]aggregationPeriodThe aggregation period for data.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.

◆ dxfg_SubscriptionController_setAggregationPeriodMillis()

int32_t dxfg_SubscriptionController_setAggregationPeriodMillis ( graal_isolatethread_t * thread,
dxfg_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.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subscriptionControllerThe subscription controller handle.
[in]aggregationPeriodThe aggregation period for data.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.

◆ dxfg_SubscriptionController_setEventsBatchLimit()

int32_t dxfg_SubscriptionController_setEventsBatchLimit ( graal_isolatethread_t * thread,
dxfg_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.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subscriptionControllerThe subscription controller handle.
[in]eventsBatchLimitThe notification events limit
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.

◆ dxfg_SubscriptionController_setExecutor()

int32_t dxfg_SubscriptionController_setExecutor ( graal_isolatethread_t * thread,
dxfg_subscription_controller_t * subscriptionController,
dxfg_executor_t * executor )

Changes executor for processing event notifications on this underlying subscription.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]subscriptionControllerThe subscription controller handle.
[out]executorThe executor for processing event notifications on this underlying subscription. Or NULL if the default executor is used.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_get_and_clear_thread_exception_t() to determine if an exception was thrown.