|
dxFeed Graal Native SDK 3.14.0
|
The Java system properties of the isolate and the shutdown of the SDK's resources. More...
Functions | |
| int32_t | dxfg_system_set_property (graal_isolatethread_t *thread, const char *key, const char *value) |
| Sets the Java system property indicated by the specified key. | |
| const char * | dxfg_system_get_property (graal_isolatethread_t *thread, const char *key) |
| Gets the Java system property indicated by the specified key. | |
| int32_t | dxfg_system_release_property (graal_isolatethread_t *thread, const char *value) |
| Releases a property value that dxfg_system_get_property() returned. | |
| int32_t | dxfg_system_close_all_and_await_termination (graal_isolatethread_t *thread) |
| Closes all the endpoints and instrument profile connections created through the SDK in this isolate and waits for the termination of the endpoints. | |
The Java system properties of the isolate and the shutdown of the SDK's resources.
The ownership rules of the strings are described in the group Javac.
| int32_t dxfg_system_close_all_and_await_termination | ( | graal_isolatethread_t * | thread | ) |
Closes all the endpoints and instrument profile connections created through the SDK in this isolate and waits for the termination of the endpoints.
It includes the default endpoints of dxfg_DXEndpoint_getInstance(), dxfg_DXFeed_getInstance(), dxfg_DXPublisher_getInstance() and dxfg_OnDemandService_getInstance(). The handles of the objects stay valid and must be released as usual.
Call it before graal_tear_down_isolate() (or before the process exits): the threads of an open endpoint ("DXEndpoint-DXExecutorThread-N", etc.) do not stop on Thread.interrupt(), so graal_tear_down_isolate() waits for them forever while any endpoint is open. To stop the calls of the native listeners, release them (see dxfg_JavaObjectHandler_release()) before tearing down the isolate. To find the threads that block the tear-down, pass the -XX:TearDownWarningSeconds=<seconds> option in graal_create_isolate_params_t.argv.
Recommended shutdown sequence:
The function blocks the calling thread until the endpoints are terminated: do not call it from a listener of an endpoint, it would wait for the notification that is calling it. The endpoints and connections created after the call are not closed by it. The function is a function of the SDK: there is no QD method that it calls.
| [in] | thread | The current GraalVM Isolate's thread. |
| const char * dxfg_system_get_property | ( | graal_isolatethread_t * | thread, |
| const char * | key ) |
Gets the Java system property indicated by the specified key.
Java: System.getProperty(String).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | key | The name of the property, a NUL-terminated UTF-8 string. It must not be NULL or empty. |
| int32_t dxfg_system_release_property | ( | graal_isolatethread_t * | thread, |
| const char * | value ) |
Releases a property value that dxfg_system_get_property() returned.
The string is freed: do not use it after that. Passing NULL does nothing.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | value | The value returned by dxfg_system_get_property(). |
| int32_t dxfg_system_set_property | ( | graal_isolatethread_t * | thread, |
| const char * | key, | ||
| const char * | value ) |
Sets the Java system property indicated by the specified key.
The property is a property of the Java system of the isolate (System.setProperty): the QD library and the SDK read their settings from it, e.g. the properties of the endpoints (dxfeed.address, dxfeed.threadPoolSize, ...) and of the logging (log.className, log.level, see the group Logging). The properties that configure endpoints must be set before the first endpoint is created. For example:
Java: System.setProperty(String, String).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | key | The name of the property, a NUL-terminated UTF-8 string; the SDK copies it. It must not be NULL or empty. |
| [in] | value | The value of the property, a NUL-terminated UTF-8 string; the SDK copies it. It must not be NULL. |