dxFeed Graal Native SDK 3.15.0
Loading...
Searching...
No Matches
Javac (v4)

The v4 functions and type names of the group Javac. Every function returns DXFG_EXECUTE_SUCCESSFULLY or DXFG_EXECUTE_FAIL and writes its result to a DXFG_OUT parameter, see The v4 functions. More...

Data Structures

struct  dxfg_v4_byte_list
 A list of bytes that a function returned: the array holds the bytes themselves. More...

Typedefs

typedef dxfg_java_object_handler dxfg_v4_java_object_handler
 The handle of a Java object: the reference by which the C code refers to an object that lives in Java.
typedef dxfg_java_object_t dxfg_v4_java_object_t
 A handle of a Java object with the same layout as dxfg_java_object_handler.
typedef dxfg_list dxfg_v4_list
 The common layout of the lists of the SDK: the number of elements and the array of pointers to them.
typedef dxfg_java_object_handler_list dxfg_v4_java_object_handler_list
 A list of handles of Java objects.
typedef dxfg_string_list dxfg_v4_string_list
 A list of strings.
typedef dxfg_executor_t dxfg_v4_executor_t
 A handle of a Java Executor object; release it with dxfg_JavaObjectHandler_release().
typedef dxfg_input_stream_t dxfg_v4_input_stream_t
 A handle of a Java InputStream object; release it with dxfg_JavaObjectHandler_release().
typedef dxfg_time_period_t dxfg_v4_time_period_t
 A handle of a Java TimePeriod object; release it with dxfg_JavaObjectHandler_release().
typedef dxfg_time_format_t dxfg_v4_time_format_t
 A handle of a Java TimeFormat object; release it with dxfg_JavaObjectHandler_release().
typedef dxfg_time_zone_t dxfg_v4_time_zone_t
 A handle of a Java TimeZone object; release it with dxfg_JavaObjectHandler_release().
typedef dxfg_auth_token_t dxfg_v4_auth_token_t
 A handle of a Java AuthToken object; release it with dxfg_JavaObjectHandler_release().
typedef dxfg_rounding_mode_t dxfg_v4_rounding_mode_t
 The rounding behavior of numerical operations that can discard precision (java.math.RoundingMode), e.g. of dxfg_PriceIncrements_roundPrice3().
typedef dxfg_finalize_function dxfg_v4_finalize_function
 The function registered by dxfg_Object_finalize(): called after the Java object has been garbage collected.
typedef struct dxfg_v4_byte_list dxfg_v4_byte_list
 A list of bytes that a function returned: the array holds the bytes themselves.

Functions

int32_t dxfg_v4_Object_finalize (graal_isolatethread_t *thread, dxfg_v4_java_object_handler *handler, dxfg_v4_finalize_function finalize, void *user_data)
int32_t dxfg_v4_JavaObjectHandler_release (graal_isolatethread_t *thread, dxfg_v4_java_object_handler *handler)
int32_t dxfg_v4_NativeListener_deactivate (graal_isolatethread_t *thread, dxfg_v4_java_object_handler *listener)
int32_t dxfg_v4_NativeListener_deactivateAll (graal_isolatethread_t *thread)
int32_t dxfg_v4_JavaObjectHandler_clone (graal_isolatethread_t *thread, dxfg_v4_java_object_handler *javaObjectHandler, DXFG_OUT dxfg_v4_java_object_handler **javaObjectHandlerClone)
int32_t dxfg_v4_JavaObjectHandler_array_release (graal_isolatethread_t *thread, const dxfg_v4_java_object_handler *handlersArray, int32_t size)
int32_t dxfg_v4_Object_new (graal_isolatethread_t *thread, DXFG_OUT dxfg_v4_java_object_handler **object)
int32_t dxfg_v4_Object_toString (graal_isolatethread_t *thread, dxfg_v4_java_object_handler *object, DXFG_OUT const char **string)
int32_t dxfg_v4_Object_equals (graal_isolatethread_t *thread, dxfg_v4_java_object_handler *object, dxfg_v4_java_object_handler *other, DXFG_OUT int32_t *equal)
int32_t dxfg_v4_Object_hashCode (graal_isolatethread_t *thread, dxfg_v4_java_object_handler *object, DXFG_OUT int32_t *hashCode)
int32_t dxfg_v4_Comparable_compareTo (graal_isolatethread_t *thread, dxfg_v4_java_object_handler *object, dxfg_v4_java_object_handler *other, DXFG_OUT int32_t *comparison)
int32_t dxfg_v4_java_object_handler_list_release (graal_isolatethread_t *thread, dxfg_v4_java_object_handler_list *list)
int32_t dxfg_v4_String_release (graal_isolatethread_t *thread, const char *string)
int32_t dxfg_v4_string_list_release (graal_isolatethread_t *thread, dxfg_v4_string_list *stringList)
int32_t dxfg_v4_Executors_newFixedThreadPool (graal_isolatethread_t *thread, int nThreads, const char *nameThreads, DXFG_OUT dxfg_v4_executor_t **executor)
int32_t dxfg_v4_Executors_newScheduledThreadPool (graal_isolatethread_t *thread, int nThreads, const char *nameThreads, DXFG_OUT dxfg_v4_executor_t **executor)
int32_t dxfg_v4_ExecutorBaseOnConcurrentLinkedQueue_new (graal_isolatethread_t *thread, DXFG_OUT dxfg_v4_executor_t **executor)
int32_t dxfg_v4_ExecutorBaseOnConcurrentLinkedQueue_processAllPendingTasks (graal_isolatethread_t *thread, dxfg_v4_executor_t *executor)
int32_t dxfg_v4_ByteArrayInputStream_new (graal_isolatethread_t *thread, const char *bytes, int32_t size, DXFG_OUT dxfg_v4_input_stream_t **inputStream)
int32_t dxfg_v4_byte_list_release (graal_isolatethread_t *thread, dxfg_v4_byte_list *list)
int32_t dxfg_v4_gc (graal_isolatethread_t *thread)
int32_t dxfg_v4_throw_exception (graal_isolatethread_t *thread, DXFG_OUT dxfg_v4_java_object_handler **object)
int32_t dxfg_v4_TimeZone_getTimeZone (graal_isolatethread_t *thread, const char *ID, DXFG_OUT dxfg_v4_time_zone_t **timeZone)
int32_t dxfg_v4_TimeZone_getDefault (graal_isolatethread_t *thread, DXFG_OUT dxfg_v4_time_zone_t **timeZone)
int32_t dxfg_v4_TimeZone_getID (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, DXFG_OUT const char **id)
int32_t dxfg_v4_TimeZone_getDisplayName (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, DXFG_OUT const char **displayName)
int32_t dxfg_v4_TimeZone_getDisplayNameWithStyle (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, int32_t daylight, int32_t style, DXFG_OUT const char **displayName)
int32_t dxfg_v4_TimeZone_getDSTSavings (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, DXFG_OUT int32_t *dstSavings)
int32_t dxfg_v4_TimeZone_useDaylightTime (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, DXFG_OUT int32_t *useDaylightTime)
int32_t dxfg_v4_TimeZone_observesDaylightTime (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, DXFG_OUT int32_t *observesDaylightTime)
int32_t dxfg_v4_TimeZone_getOffset (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, int64_t date, DXFG_OUT int32_t *offset)
int32_t dxfg_v4_TimeZone_getOffsetByCalendarFields (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, int32_t era, int32_t year, int32_t month, int32_t day, int32_t dayOfWeek, int32_t milliseconds, DXFG_OUT int32_t *offset)
int32_t dxfg_v4_TimeZone_getRawOffset (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, DXFG_OUT int32_t *rawOffset)
int32_t dxfg_v4_TimeZone_hasSameRules (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, dxfg_v4_time_zone_t *other, DXFG_OUT int32_t *hasSameRules)
int32_t dxfg_v4_TimeZone_inDaylightTime (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, int64_t date, DXFG_OUT int32_t *inDaylightTime)
int32_t dxfg_v4_TimeZone_setID (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, const char *ID)
int32_t dxfg_v4_TimeZone_setRawOffset (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, int32_t offsetMillis)
int32_t dxfg_v4_TimePeriod_ZERO (graal_isolatethread_t *thread, DXFG_OUT dxfg_v4_time_period_t **timePeriod)
int32_t dxfg_v4_TimePeriod_UNLIMITED (graal_isolatethread_t *thread, DXFG_OUT dxfg_v4_time_period_t **timePeriod)
int32_t dxfg_v4_TimePeriod_valueOf (graal_isolatethread_t *thread, int64_t value, DXFG_OUT dxfg_v4_time_period_t **timePeriod)
int32_t dxfg_v4_TimePeriod_valueOfString (graal_isolatethread_t *thread, const char *value, DXFG_OUT dxfg_v4_time_period_t **timePeriod)
int32_t dxfg_v4_TimePeriod_getTime (graal_isolatethread_t *thread, dxfg_v4_time_period_t *timePeriod, DXFG_OUT int64_t *time)
int32_t dxfg_v4_TimePeriod_getSeconds (graal_isolatethread_t *thread, dxfg_v4_time_period_t *timePeriod, DXFG_OUT int32_t *seconds)
int32_t dxfg_v4_TimePeriod_getNanos (graal_isolatethread_t *thread, dxfg_v4_time_period_t *timePeriod, DXFG_OUT int64_t *nanos)
int32_t dxfg_v4_TimeFormat_DEFAULT (graal_isolatethread_t *thread, DXFG_OUT dxfg_v4_time_format_t **timeFormat)
int32_t dxfg_v4_TimeFormat_GMT (graal_isolatethread_t *thread, DXFG_OUT dxfg_v4_time_format_t **timeFormat)
int32_t dxfg_v4_TimeFormat_getInstance (graal_isolatethread_t *thread, dxfg_v4_time_zone_t *timeZone, DXFG_OUT dxfg_v4_time_format_t **timeFormat)
int32_t dxfg_v4_TimeFormat_withTimeZone (graal_isolatethread_t *thread, dxfg_v4_time_format_t *timeFormat, DXFG_OUT dxfg_v4_time_format_t **formatWithTimeZone)
int32_t dxfg_v4_TimeFormat_withMillis (graal_isolatethread_t *thread, dxfg_v4_time_format_t *timeFormat, DXFG_OUT dxfg_v4_time_format_t **formatWithMillis)
int32_t dxfg_v4_TimeFormat_asFullIso (graal_isolatethread_t *thread, dxfg_v4_time_format_t *timeFormat, DXFG_OUT dxfg_v4_time_format_t **fullIsoFormat)
int32_t dxfg_v4_TimeFormat_parse (graal_isolatethread_t *thread, dxfg_v4_time_format_t *timeFormat, const char *value, DXFG_OUT int64_t *time)
int32_t dxfg_v4_TimeFormat_format (graal_isolatethread_t *thread, dxfg_v4_time_format_t *timeFormat, int64_t value, DXFG_OUT const char **string)
int32_t dxfg_v4_TimeFormat_getTimeZone (graal_isolatethread_t *thread, dxfg_v4_time_format_t *timeFormat, DXFG_OUT dxfg_v4_time_zone_t **timeZone)
int32_t dxfg_v4_AuthToken_valueOf (graal_isolatethread_t *thread, const char *string, DXFG_OUT dxfg_v4_auth_token_t **authToken)
int32_t dxfg_v4_AuthToken_createBasicToken (graal_isolatethread_t *thread, const char *userPassword, DXFG_OUT dxfg_v4_auth_token_t **authToken)
int32_t dxfg_v4_AuthToken_createBasicTokenWithUserAndPassword (graal_isolatethread_t *thread, const char *user, const char *password, DXFG_OUT dxfg_v4_auth_token_t **authToken)
int32_t dxfg_v4_AuthToken_createBasicTokenOrNull (graal_isolatethread_t *thread, const char *user, const char *password, DXFG_OUT dxfg_v4_auth_token_t **authToken)
int32_t dxfg_v4_AuthToken_createBearerToken (graal_isolatethread_t *thread, const char *token, DXFG_OUT dxfg_v4_auth_token_t **authToken)
int32_t dxfg_v4_AuthToken_createBearerTokenOrNull (graal_isolatethread_t *thread, const char *token, DXFG_OUT dxfg_v4_auth_token_t **authToken)
int32_t dxfg_v4_AuthToken_createCustomToken (graal_isolatethread_t *thread, const char *scheme, const char *value, DXFG_OUT dxfg_v4_auth_token_t **authToken)
int32_t dxfg_v4_AuthToken_getHttpAuthorization (graal_isolatethread_t *thread, dxfg_v4_auth_token_t *authToken, DXFG_OUT const char **httpAuthorization)
int32_t dxfg_v4_AuthToken_getUser (graal_isolatethread_t *thread, dxfg_v4_auth_token_t *authToken, DXFG_OUT const char **user)
int32_t dxfg_v4_AuthToken_getPassword (graal_isolatethread_t *thread, dxfg_v4_auth_token_t *authToken, DXFG_OUT const char **password)
int32_t dxfg_v4_AuthToken_getScheme (graal_isolatethread_t *thread, dxfg_v4_auth_token_t *authToken, DXFG_OUT const char **scheme)
int32_t dxfg_v4_AuthToken_getValue (graal_isolatethread_t *thread, dxfg_v4_auth_token_t *authToken, DXFG_OUT const char **value)

Detailed Description

The v4 functions and type names of the group Javac. Every function returns DXFG_EXECUTE_SUCCESSFULLY or DXFG_EXECUTE_FAIL and writes its result to a DXFG_OUT parameter, see The v4 functions.

Typedef Documentation

◆ dxfg_v4_auth_token_t

A handle of a Java AuthToken object; release it with dxfg_JavaObjectHandler_release().

An authorization token: an authorization scheme (e.g. "Basic" or "Bearer") and its value. Create it with dxfg_AuthToken_valueOf() or one of the dxfg_AuthToken_create*() functions.

◆ dxfg_v4_byte_list

typedef struct dxfg_v4_byte_list dxfg_v4_byte_list

A list of bytes that a function returned: the array holds the bytes themselves.

The functions that write data to memory return it, e.g. dxfg_v4_InstrumentProfileWriter_writeToBytes(). Release it with dxfg_v4_byte_list_release(). The bytes can be read back with dxfg_v4_ByteArrayInputStream_new().

Since
3.13.0

◆ dxfg_v4_executor_t

A handle of a Java Executor object; release it with dxfg_JavaObjectHandler_release().

An executor runs the tasks that the SDK gives it, e.g. the calls of the listeners of a subscription or a model. Create it with dxfg_Executors_newFixedThreadPool(), dxfg_Executors_newScheduledThreadPool() or dxfg_ExecutorBaseOnConcurrentLinkedQueue_new().

https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/concurrent/Executor.html

◆ dxfg_v4_finalize_function

The function registered by dxfg_Object_finalize(): called after the Java object has been garbage collected.

It is called by a daemon Java thread of the SDK, not by the thread that registered it. The calls are made one after another on that thread, so a function that blocks delays the other ones. A registration is called once. The SDK does not use the user data and does not free it.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]user_dataThe pointer that was passed to dxfg_Object_finalize().

◆ dxfg_v4_input_stream_t

A handle of a Java InputStream object; release it with dxfg_JavaObjectHandler_release().

A stream of bytes that the SDK reads, e.g. the instrument profile readers. Create it with dxfg_ByteArrayInputStream_new().

https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/io/InputStream.html

◆ dxfg_v4_java_object_handler

The handle of a Java object: the reference by which the C code refers to an object that lives in Java.

The handle is allocated by the SDK and owned by the caller: release it with dxfg_JavaObjectHandler_release(), which frees the structure and drops the reference to the Java object. As long as any handle of an object exists, the object is not garbage collected. Use dxfg_JavaObjectHandler_clone() to get another handle of the same object.

The typed handle structures (e.g. dxfg_executor_t, dxfg_time_zone_t) consist of this structure only (the field handler), so a pointer to a typed handle is passed to the functions that take a dxfg_java_object_handler * as &typed->handler (or by a cast).

Use dxfg_Object_toString() to get the string representation of the object, dxfg_Object_equals() to compare objects and dxfg_Object_hashCode() to get the hash code.

◆ dxfg_v4_java_object_handler_list

A list of handles of Java objects.

A list that a function returns is allocated by the SDK: release it with dxfg_CList_JavaObjectHandler_release(), which releases every handle of the list, frees the array of the elements and the list itself. A list that is passed to a function is only read by the SDK: the caller keeps its ownership.

◆ dxfg_v4_java_object_t

A handle of a Java object with the same layout as dxfg_java_object_handler.

No function of this API takes it: the functions use dxfg_java_object_handler.

◆ dxfg_v4_list

The common layout of the lists of the SDK: the number of elements and the array of pointers to them.

The concrete list types (dxfg_string_list, dxfg_java_object_handler_list, ...) have their own element types and their own release functions; there is no function that frees a dxfg_list as such.

◆ dxfg_v4_rounding_mode_t

The rounding behavior of numerical operations that can discard precision (java.math.RoundingMode), e.g. of dxfg_PriceIncrements_roundPrice3().

Specifies a rounding behavior for numerical operations capable of discarding precision. Each rounding mode indicates how the least significant returned digit of a rounded result is to be calculated. If fewer digits are returned than the digits needed to represent the exact numerical result, the discarded digits will be referred to as the discarded fraction regardless the digits' contribution to the value of the number. In other words, considered as a numerical value, the discarded fraction could have an absolute value greater than one.

https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/math/RoundingMode.html

◆ dxfg_v4_string_list

A list of strings.

A list that a function returns is allocated by the SDK: release it with dxfg_CList_String_release(), which frees every string, the array of the strings and the list itself. A list that is passed to a function is only read by the SDK: the caller keeps its ownership.

◆ dxfg_v4_time_format_t

A handle of a Java TimeFormat object; release it with dxfg_JavaObjectHandler_release().

A parser and a formatter of dates and times in an ISO-compatible format for a time zone. Create it with dxfg_TimeFormat_DEFAULT(), dxfg_TimeFormat_GMT() or dxfg_TimeFormat_getInstance().

◆ dxfg_v4_time_period_t

A handle of a Java TimePeriod object; release it with dxfg_JavaObjectHandler_release().

A period of time with a precision of milliseconds that is never negative. Create it with dxfg_TimePeriod_ZERO(), dxfg_TimePeriod_UNLIMITED() or dxfg_TimePeriod_valueOf().

◆ dxfg_v4_time_zone_t

Function Documentation

◆ dxfg_v4_AuthToken_createBasicToken()

int32_t dxfg_v4_AuthToken_createBasicToken ( graal_isolatethread_t * thread,
const char * userPassword,
DXFG_OUT dxfg_v4_auth_token_t ** authToken )

Creates the "Basic" authorization token (RFC 2617) from the string user:password. The user name and the password can be empty.

Java: AuthToken.createBasicToken(String).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]userPasswordThe string user:password; a string without a colon or NULL is an error.
[out]authTokenThe pointer to the variable that receives the token (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_AuthToken_createBasicTokenOrNull()

int32_t dxfg_v4_AuthToken_createBasicTokenOrNull ( graal_isolatethread_t * thread,
const char * user,
const char * password,
DXFG_OUT dxfg_v4_auth_token_t ** authToken )

Creates the "Basic" authorization token (RFC 2617) from the user name and the password, or returns NULL if both of them are NULL or empty (it is not an error). A NULL user name or password is taken as empty.

Java: AuthToken.createBasicTokenOrNull(String, String).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]userThe user name.
[in]passwordThe password.
[out]authTokenThe pointer to the variable that receives the token (release it with dxfg_v4_JavaObjectHandler_release()), or NULL if the user name and the password are both NULL or empty; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_AuthToken_createBasicTokenWithUserAndPassword()

int32_t dxfg_v4_AuthToken_createBasicTokenWithUserAndPassword ( graal_isolatethread_t * thread,
const char * user,
const char * password,
DXFG_OUT dxfg_v4_auth_token_t ** authToken )

Creates the "Basic" authorization token (RFC 2617) from the user name and the password. They can be empty.

Java: AuthToken.createBasicToken(String, String).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]userThe user name; NULL is an error.
[in]passwordThe password; NULL is an error.
[out]authTokenThe pointer to the variable that receives the token (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_AuthToken_createBearerToken()

int32_t dxfg_v4_AuthToken_createBearerToken ( graal_isolatethread_t * thread,
const char * token,
DXFG_OUT dxfg_v4_auth_token_t ** authToken )

Creates the "Bearer" authorization token (RFC 6750) from the access token.

Java: AuthToken.createBearerToken(String).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]tokenThe access token; NULL or an empty string is an error.
[out]authTokenThe pointer to the variable that receives the token (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_AuthToken_createBearerTokenOrNull()

int32_t dxfg_v4_AuthToken_createBearerTokenOrNull ( graal_isolatethread_t * thread,
const char * token,
DXFG_OUT dxfg_v4_auth_token_t ** authToken )

Creates the "Bearer" authorization token (RFC 6750) from the access token, or returns NULL if the access token is NULL or empty (it is not an error).

Java: AuthToken.createBearerTokenOrNull(String).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]tokenThe access token.
[out]authTokenThe pointer to the variable that receives the token (release it with dxfg_v4_JavaObjectHandler_release()), or NULL if the access token is NULL or empty; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_AuthToken_createCustomToken()

int32_t dxfg_v4_AuthToken_createCustomToken ( graal_isolatethread_t * thread,
const char * scheme,
const char * value,
DXFG_OUT dxfg_v4_auth_token_t ** authToken )

Creates the authorization token with a custom scheme and value.

Java: AuthToken.createCustomToken(String, String).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]schemeThe scheme; NULL or an empty string is an error.
[in]valueThe value; NULL or an empty string is an error.
[out]authTokenThe pointer to the variable that receives the token (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_AuthToken_getHttpAuthorization()

int32_t dxfg_v4_AuthToken_getHttpAuthorization ( graal_isolatethread_t * thread,
dxfg_v4_auth_token_t * authToken,
DXFG_OUT const char ** httpAuthorization )

Returns the value of the HTTP authorization header: the scheme and the value separated by a space.

Java: AuthToken.getHttpAuthorization().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]authTokenThe token.
[out]httpAuthorizationThe pointer to the variable that receives the string (release it with dxfg_v4_String_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_AuthToken_getPassword()

int32_t dxfg_v4_AuthToken_getPassword ( graal_isolatethread_t * thread,
dxfg_v4_auth_token_t * authToken,
DXFG_OUT const char ** password )

Returns the password of the token.

Java: AuthToken.getPassword().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]authTokenThe token.
[out]passwordThe pointer to the variable that receives the password (release it with dxfg_v4_String_release()), or NULL if the token has no password (it is not a "Basic" token); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_AuthToken_getScheme()

int32_t dxfg_v4_AuthToken_getScheme ( graal_isolatethread_t * thread,
dxfg_v4_auth_token_t * authToken,
DXFG_OUT const char ** scheme )

Returns the authorization scheme of the token, e.g. "Basic" or "Bearer".

Java: AuthToken.getScheme().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]authTokenThe token.
[out]schemeThe pointer to the variable that receives the scheme (release it with dxfg_v4_String_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_AuthToken_getUser()

int32_t dxfg_v4_AuthToken_getUser ( graal_isolatethread_t * thread,
dxfg_v4_auth_token_t * authToken,
DXFG_OUT const char ** user )

Returns the user name of the token.

Java: AuthToken.getUser().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]authTokenThe token.
[out]userThe pointer to the variable that receives the user name (release it with dxfg_v4_String_release()), or NULL if the token has no user name (it is not a "Basic" token); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_AuthToken_getValue()

int32_t dxfg_v4_AuthToken_getValue ( graal_isolatethread_t * thread,
dxfg_v4_auth_token_t * authToken,
DXFG_OUT const char ** value )

Returns the value of the token: the access token of the "Bearer" scheme (RFC 6750) or the Base64-encoded user:password of the "Basic" scheme (RFC 2617).

Java: AuthToken.getValue().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]authTokenThe token.
[out]valueThe pointer to the variable that receives the value (release it with dxfg_v4_String_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_AuthToken_valueOf()

int32_t dxfg_v4_AuthToken_valueOf ( graal_isolatethread_t * thread,
const char * string,
DXFG_OUT dxfg_v4_auth_token_t ** authToken )

Creates the authorization token from the string of the scheme and the value separated by a space, e.g. Bearer <token> or Basic <Base64 of user:password>. The value of the "Basic" scheme must be the Base64-encoded user:password.

Java: AuthToken.valueOf(String).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]stringThe string; NULL is an error.
[out]authTokenThe pointer to the variable that receives the token (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error (e.g. the string is malformed). Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_byte_list_release()

int32_t dxfg_v4_byte_list_release ( graal_isolatethread_t * thread,
dxfg_v4_byte_list * list )

Releases a list of bytes that a function returned (e.g. dxfg_v4_InstrumentProfileWriter_writeToBytes()): frees the array of the bytes and the list itself.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]listThe list to release. If it is NULL, nothing is done.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.
Since
3.13.0

◆ dxfg_v4_ByteArrayInputStream_new()

int32_t dxfg_v4_ByteArrayInputStream_new ( graal_isolatethread_t * thread,
const char * bytes,
int32_t size,
DXFG_OUT dxfg_v4_input_stream_t ** inputStream )

Creates an input stream that reads the bytes of the memory block. The bytes are copied: the caller keeps the memory block and may free it after the function returns.

Java: ByteArrayInputStream(byte[]).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]bytesThe bytes of the stream; must point to at least size bytes.
[in]sizeThe number of bytes; must not be negative.
[out]inputStreamThe pointer to the variable that receives the input stream (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_Comparable_compareTo()

int32_t dxfg_v4_Comparable_compareTo ( graal_isolatethread_t * thread,
dxfg_v4_java_object_handler * object,
dxfg_v4_java_object_handler * other,
DXFG_OUT int32_t * comparison )

Compares the Java objects by their natural order. The objects must implement the Java Comparable interface and be comparable to each other, otherwise the function fails. The handles of the same object are equal; a NULL handle is less than a non-NULL handle.

Java: Comparable.compareTo(Object).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]objectThe handle of the first object.
[in]otherThe handle of the second object.
[out]comparisonThe pointer to the variable that receives a negative value if the first object is less than the second one, 0 if they are equal, a positive value if it is greater; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_ExecutorBaseOnConcurrentLinkedQueue_new()

int32_t dxfg_v4_ExecutorBaseOnConcurrentLinkedQueue_new ( graal_isolatethread_t * thread,
DXFG_OUT dxfg_v4_executor_t ** executor )

Creates an executor that does not run the tasks by itself: a submitted task is added to a queue and runs when dxfg_v4_ExecutorBaseOnConcurrentLinkedQueue_processAllPendingTasks() is called, on the thread that calls it. Use it to have the calls of the listeners made on a thread of your own.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[out]executorThe pointer to the variable that receives the executor (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_ExecutorBaseOnConcurrentLinkedQueue_processAllPendingTasks()

int32_t dxfg_v4_ExecutorBaseOnConcurrentLinkedQueue_processAllPendingTasks ( graal_isolatethread_t * thread,
dxfg_v4_executor_t * executor )

Runs the tasks that are in the queue of the executor, on the calling thread, until the queue is empty (the tasks added by the running tasks are run as well). If a task throws an exception, the function fails and the rest of the tasks stay in the queue.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]executorThe executor created by dxfg_v4_ExecutorBaseOnConcurrentLinkedQueue_new(); any other executor (e.g. the executor of an event queue, dxfg_v4_EventQueue_getExecutor()) makes the function fail with IllegalArgumentException.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_Executors_newFixedThreadPool()

int32_t dxfg_v4_Executors_newFixedThreadPool ( graal_isolatethread_t * thread,
int nThreads,
const char * nameThreads,
DXFG_OUT dxfg_v4_executor_t ** executor )

Creates an executor with a fixed number of threads that runs the submitted tasks. The threads are daemon threads. The SDK has no function that shuts the executor down.

Read the "Threads and locks" section of https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html for how the executor is used by the listeners.

Java: Executors.newFixedThreadPool(int, ThreadFactory).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]nThreadsThe number of threads of the pool; must be positive.
[in]nameThreadsThe prefix of the names of the threads: they are named <nameThreads>-1, <nameThreads>-2, and so on.
[out]executorThe pointer to the variable that receives the executor (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_Executors_newScheduledThreadPool()

int32_t dxfg_v4_Executors_newScheduledThreadPool ( graal_isolatethread_t * thread,
int nThreads,
const char * nameThreads,
DXFG_OUT dxfg_v4_executor_t ** executor )

Creates an executor that runs the submitted tasks, also with a delay or periodically. The threads are daemon threads. The SDK has no function that shuts the executor down.

See dxfg_v4_Executors_newFixedThreadPool() for how the listeners use the executor.

Java: Executors.newScheduledThreadPool(int, ThreadFactory).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]nThreadsThe number of threads to keep in the pool, even if they are idle; must not be negative.
[in]nameThreadsThe prefix of the names of the threads: they are named <nameThreads>-1, <nameThreads>-2, and so on.
[out]executorThe pointer to the variable that receives the executor (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_gc()

int32_t dxfg_v4_gc ( graal_isolatethread_t * thread)

Requests a garbage collection. It is only for testing, e.g. of the functions registered by dxfg_v4_Object_finalize().

Parameters
[in]threadThe current GraalVM Isolate's thread.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

Java: System.gc().

◆ dxfg_v4_java_object_handler_list_release()

int32_t dxfg_v4_java_object_handler_list_release ( graal_isolatethread_t * thread,
dxfg_v4_java_object_handler_list * list )

Releases a list of handles that a function returned: releases every handle of the list, frees the array of the elements and the list itself.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]listThe list to release. If it is NULL, nothing is done.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_JavaObjectHandler_array_release()

int32_t dxfg_v4_JavaObjectHandler_array_release ( graal_isolatethread_t * thread,
const dxfg_v4_java_object_handler * handlersArray,
int32_t size )

Releases an array of handles (or simple structures containing only a handle) that a function returned as one block of consecutive structures: releases every handle of the array and frees the memory of the array.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]handlersArrayThe array of handles. If it is NULL or size is 0, nothing is done.
[in]sizeThe number of handles in the array.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_JavaObjectHandler_clone()

int32_t dxfg_v4_JavaObjectHandler_clone ( graal_isolatethread_t * thread,
dxfg_v4_java_object_handler * javaObjectHandler,
DXFG_OUT dxfg_v4_java_object_handler ** javaObjectHandlerClone )

Creates another handle of the Java object: allocates the memory of the new handle structure. Both handles refer to the same object and are released independently: the object stays alive until all of its handles are released.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]javaObjectHandlerThe handle to clone; it stays valid.
[out]javaObjectHandlerCloneThe pointer to which the pointer to the new handle is written; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown. Use dxfg_v4_JavaObjectHandler_release() to free the object clone handle.

◆ dxfg_v4_JavaObjectHandler_release()

int32_t dxfg_v4_JavaObjectHandler_release ( graal_isolatethread_t * thread,
dxfg_v4_java_object_handler * handler )

Frees the memory of the handle structure and releases the reference to the Java object. Do not use the handle after that. Passing NULL does nothing.

If the handle is the last handle (see dxfg_v4_JavaObjectHandler_clone()) of a listener created by a dxfg_*Listener_new function, the listener is deactivated (see dxfg_v4_NativeListener_deactivate()): the function waits for the listener's callbacks that are in progress on other threads and after it returns the listener's function is not called anymore, so its user data can be freed. Remove the listener (e.g. dxfg_v4_DXFeedSubscription_removeEventListener()) before releasing it, otherwise it stays added and does nothing.

Do not hold the locks that the listener's function may take while releasing the listener: it may deadlock. Releasing a listener from its own callback is allowed (the function does not wait for that call).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]handlerThe handle to release (e.g. &executor->handler for a dxfg_v4_executor_t).
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_NativeListener_deactivate()

int32_t dxfg_v4_NativeListener_deactivate ( graal_isolatethread_t * thread,
dxfg_v4_java_object_handler * listener )

Deactivates a listener created by a dxfg_*Listener_new function (e.g. dxfg_v4_DXFeedEventListener_new(), dxfg_v4_PropertyChangeListener_new()) regardless of the number of its handles: waits for the listener's callbacks that are in progress on other threads, after that the listener's function is not called anymore, so its user data can be freed. The listener stays added where it was added, but does nothing, and cannot be activated again.

Releasing the last handle of the listener with dxfg_v4_JavaObjectHandler_release() deactivates it as well. Do not hold the locks that the listener's function may take while deactivating the listener: it may deadlock. Deactivating a listener from its own callback is allowed (the function does not wait for that call).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]listenerThe listener handle.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error (e.g. the object is not a listener created by a dxfg_*Listener_new function). Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_NativeListener_deactivateAll()

int32_t dxfg_v4_NativeListener_deactivateAll ( graal_isolatethread_t * thread)

Deactivates all the listeners of this isolate created by the dxfg_*Listener_new functions, as dxfg_v4_NativeListener_deactivate() does for one: waits for the listeners' callbacks that are in progress on other threads, after that no listener's function is called anymore, so the user data of the listeners can be freed. The listeners created afterwards are inactive from the start. The deactivation cannot be undone for the isolate.

Then the function closes all the event queues of this isolate (dxfg_v4_EventQueue_close()) and waits for the polls in progress on other threads: they return DXFG_EVENT_QUEUE_CLOSED or the events they have already retrieved. The queues created afterwards are closed from the start.

The handles of the listeners stay valid and must be released as usual. Use dxfg_v4_system_shutdown() to deactivate the listeners and then close the endpoints. Only the listeners are deactivated: the handlers of dxfg_v4_Promise_whenDone(), dxfg_v4_Promise_whenDoneAsync(), the finalizers of dxfg_v4_Object_finalize() and the filters of dxfg_v4_SessionFilter_new() and dxfg_v4_DayFilter_new() are still called.

Calling it from a listener's callback is allowed (the function does not wait for that call), but not from the callbacks of two threads at once: each would wait for the other. Do not hold the locks that the listeners' functions may take while calling it, nor call it from an exit handler of a DLL (DLL_PROCESS_DETACH, a destructor of a static object of a DLL): a callback that waits for the loader lock never finishes.

Parameters
[in]threadThe current GraalVM Isolate's thread.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_Object_equals()

int32_t dxfg_v4_Object_equals ( graal_isolatethread_t * thread,
dxfg_v4_java_object_handler * object,
dxfg_v4_java_object_handler * other,
DXFG_OUT int32_t * equal )

Checks whether the Java objects are equal: the handles of the same object, and the handles of the objects that are equal in the sense of the Java equals method of the first object. Two NULL handles are equal, a NULL handle and a non-NULL handle are not.

Java: Objects.equals(Object, Object).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]objectThe handle of the first object.
[in]otherThe handle of the second object.
[out]equalThe pointer to the variable that receives 1 if the objects are equal, 0 if they are not; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_Object_finalize()

int32_t dxfg_v4_Object_finalize ( graal_isolatethread_t * thread,
dxfg_v4_java_object_handler * handler,
dxfg_v4_finalize_function finalize,
void * user_data )

Registers a function that is called with the user data after the Java object is garbage collected.

The Java object is not collected while a handle of it exists, so the function is called after all the handles of the object have been released and nothing else in Java refers to the object. The collected objects are checked about once a second. The function is called by a daemon Java thread of the SDK (see dxfg_v4_finalize_function), once for each registration.

It does not stop the callbacks of a listener: see dxfg_v4_NativeListener_deactivate() for that.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]handlerThe handle of the object to watch.
[in]finalizeThe function to call.
[in]user_dataThe user data to pass to the function; the SDK does not free it.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_Object_hashCode()

int32_t dxfg_v4_Object_hashCode ( graal_isolatethread_t * thread,
dxfg_v4_java_object_handler * object,
DXFG_OUT int32_t * hashCode )

Returns the hash code of the Java object: the result of its Java hashCode method, or 0 for a NULL handle.

Java: Objects.hashCode(Object).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]objectThe handle of the object.
[out]hashCodeThe pointer to the variable that receives the hash code; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_Object_new()

int32_t dxfg_v4_Object_new ( graal_isolatethread_t * thread,
DXFG_OUT dxfg_v4_java_object_handler ** object )

Creates a new Java Object.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[out]objectThe pointer to which the pointer to the handle of the new object is written; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown. Use dxfg_v4_JavaObjectHandler_release() to free the object handle.

Java: Object().

◆ dxfg_v4_Object_toString()

int32_t dxfg_v4_Object_toString ( graal_isolatethread_t * thread,
dxfg_v4_java_object_handler * object,
DXFG_OUT const char ** string )

Returns the string representation of the Java object. It works for the handle of any Java object, including the typed handles (e.g. dxfg_v4_time_zone_t, dxfg_v4_auth_token_t).

Java: Object.toString().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]objectThe handle of the object. A NULL handle is an error.
[out]stringThe pointer to the variable that receives the UTF-8 string, NUL-terminated (release it with dxfg_v4_String_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_string_list_release()

int32_t dxfg_v4_string_list_release ( graal_isolatethread_t * thread,
dxfg_v4_string_list * stringList )

Releases a list of strings that a function returned: frees every string of the list, the array of the strings and the list itself.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]stringListThe list to release. If it is NULL, nothing is done.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_String_release()

int32_t dxfg_v4_String_release ( graal_isolatethread_t * thread,
const char * string )

Frees a string that a function returned (e.g. dxfg_v4_Object_toString()). Do not pass a string that is a field of a structure, such as a string of an event: it is freed with the structure.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]stringThe string to free. If it is NULL, nothing is done.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_throw_exception()

int32_t dxfg_v4_throw_exception ( graal_isolatethread_t * thread,
DXFG_OUT dxfg_v4_java_object_handler ** object )

Always fails: throws a Java exception (a RuntimeException "recursion" with a cause "cause", thrown several calls deep, so that its stack trace has several frames). It is only for testing of dxfg_v4_get_and_clear_thread_exception().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[out]objectNot written: the function always fails; must not be NULL.
Returns
DXFG_EXECUTE_FAIL (-1). Use dxfg_v4_get_and_clear_thread_exception() to get the exception.

◆ dxfg_v4_TimeFormat_asFullIso()

int32_t dxfg_v4_TimeFormat_asFullIso ( graal_isolatethread_t * thread,
dxfg_v4_time_format_t * timeFormat,
DXFG_OUT dxfg_v4_time_format_t ** fullIsoFormat )

Returns the time format that produces the full ISO8601 string of yyyy-MM-dd'T'HH:mm:ss.SSSX.

Java: TimeFormat.asFullIso().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeFormatThe time format.
[out]fullIsoFormatThe pointer to the variable that receives the time format (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeFormat_DEFAULT()

int32_t dxfg_v4_TimeFormat_DEFAULT ( graal_isolatethread_t * thread,
DXFG_OUT dxfg_v4_time_format_t ** timeFormat )

Returns the time format of the default time zone of the Java virtual machine.

Java: TimeFormat.DEFAULT.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[out]timeFormatThe pointer to the variable that receives the time format (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeFormat_format()

int32_t dxfg_v4_TimeFormat_format ( graal_isolatethread_t * thread,
dxfg_v4_time_format_t * timeFormat,
int64_t value,
DXFG_OUT const char ** string )

Converts the time to a string like yyyyMMdd-HHmmss in the time zone of the time format. The time zone (RFC 822, e.g. +0300) and the milliseconds (.sss) are included if the format was obtained with dxfg_v4_TimeFormat_withTimeZone() and dxfg_v4_TimeFormat_withMillis(). The time 0 is formatted as "0". If the year of the time is outside of 0001 to 9999, the result is the decimal number of the milliseconds.

Java: TimeFormat.format(long).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeFormatThe time format.
[in]valueThe time: the number of milliseconds since 1970-01-01T00:00:00Z.
[out]stringThe pointer to the variable that receives the string (release it with dxfg_v4_String_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeFormat_getInstance()

int32_t dxfg_v4_TimeFormat_getInstance ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
DXFG_OUT dxfg_v4_time_format_t ** timeFormat )

Returns the time format of the time zone. The format keeps a copy of the time zone: later changes of the time zone do not affect it.

Java: TimeFormat.getInstance(TimeZone).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone; NULL is an error.
[out]timeFormatThe pointer to the variable that receives the time format (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeFormat_getTimeZone()

int32_t dxfg_v4_TimeFormat_getTimeZone ( graal_isolatethread_t * thread,
dxfg_v4_time_format_t * timeFormat,
DXFG_OUT dxfg_v4_time_zone_t ** timeZone )

Returns the time zone of the time format.

Java: TimeFormat.getTimeZone().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeFormatThe time format.
[out]timeZoneThe pointer to the variable that receives a copy of the time zone (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeFormat_GMT()

int32_t dxfg_v4_TimeFormat_GMT ( graal_isolatethread_t * thread,
DXFG_OUT dxfg_v4_time_format_t ** timeFormat )

Returns the time format of the GMT time zone.

Java: TimeFormat.GMT.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[out]timeFormatThe pointer to the variable that receives the time format (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeFormat_parse()

int32_t dxfg_v4_TimeFormat_parse ( graal_isolatethread_t * thread,
dxfg_v4_time_format_t * timeFormat,
const char * value,
DXFG_OUT int64_t * time )

Parses the date and the time from the string in an ISO 8601 format. The string can be:

  • 0: the zero time;
  • -<time period>: the current time minus the time period (see dxfg_v4_TimePeriod_valueOfString());
  • a number of milliseconds since 1970-01-01T00:00:00Z: at least 9 digits;
  • <date>[(T|t|-| )<time>][<time zone>] or [T|t]<time>[<time zone>]: the date is yyyy-MM-dd or yyyyMMdd, the time is HH:mm:ss[.sss], HHmmss[.sss], HH:mm, HHmm or HH (a missing time is 00:00:00, a missing date is the current date), the time zone is [+-]HH:mm, [+-]HHmm, [+-]HH, Z or a name of a time zone. A string without a time zone is in the time zone of the time format.

Java: TimeFormat.parse(String).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeFormatThe time format.
[in]valueThe string to parse; NULL is an error.
[out]timeThe pointer to the variable that receives the number of milliseconds since 1970-01-01T00:00:00Z; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeFormat_withMillis()

int32_t dxfg_v4_TimeFormat_withMillis ( graal_isolatethread_t * thread,
dxfg_v4_time_format_t * timeFormat,
DXFG_OUT dxfg_v4_time_format_t ** formatWithMillis )

Returns the time format that also includes the milliseconds into the string of dxfg_v4_TimeFormat_format().

Java: TimeFormat.withMillis().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeFormatThe time format.
[out]formatWithMillisThe pointer to the variable that receives the time format (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeFormat_withTimeZone()

int32_t dxfg_v4_TimeFormat_withTimeZone ( graal_isolatethread_t * thread,
dxfg_v4_time_format_t * timeFormat,
DXFG_OUT dxfg_v4_time_format_t ** formatWithTimeZone )

Returns the time format that also includes the time zone into the string of dxfg_v4_TimeFormat_format().

Java: TimeFormat.withTimeZone().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeFormatThe time format.
[out]formatWithTimeZoneThe pointer to the variable that receives the time format (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimePeriod_getNanos()

int32_t dxfg_v4_TimePeriod_getNanos ( graal_isolatethread_t * thread,
dxfg_v4_time_period_t * timePeriod,
DXFG_OUT int64_t * nanos )

Returns the time period in nanoseconds. A period longer than about 292 years, e.g. dxfg_v4_TimePeriod_UNLIMITED(), overflows int64_t and gives a wrong value, which may be negative (-1000000 for the unlimited period); use dxfg_v4_TimePeriod_getTime() for such periods.

Java: TimePeriod.getNanos().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timePeriodThe time period.
[out]nanosThe pointer to the variable that receives the time period in nanoseconds; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimePeriod_getSeconds()

int32_t dxfg_v4_TimePeriod_getSeconds ( graal_isolatethread_t * thread,
dxfg_v4_time_period_t * timePeriod,
DXFG_OUT int32_t * seconds )

Returns the time period in whole seconds (rounded down). A period longer than about 68 years, e.g. dxfg_v4_TimePeriod_UNLIMITED(), does not fit into int32_t: the result is truncated to its lower 32 bits.

Java: TimePeriod.getSeconds().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timePeriodThe time period.
[out]secondsThe pointer to the variable that receives the time period in seconds; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimePeriod_getTime()

int32_t dxfg_v4_TimePeriod_getTime ( graal_isolatethread_t * thread,
dxfg_v4_time_period_t * timePeriod,
DXFG_OUT int64_t * time )

Returns the time period in milliseconds.

Java: TimePeriod.getTime().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timePeriodThe time period.
[out]timeThe pointer to the variable that receives the time period in milliseconds; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimePeriod_UNLIMITED()

int32_t dxfg_v4_TimePeriod_UNLIMITED ( graal_isolatethread_t * thread,
DXFG_OUT dxfg_v4_time_period_t ** timePeriod )

Returns the time period of "infinity": its time is the maximum value of int64_t milliseconds.

Java: TimePeriod.UNLIMITED.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[out]timePeriodThe pointer to the variable that receives the time period (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimePeriod_valueOf()

int32_t dxfg_v4_TimePeriod_valueOf ( graal_isolatethread_t * thread,
int64_t value,
DXFG_OUT dxfg_v4_time_period_t ** timePeriod )

Returns the time period of the given number of milliseconds.

Java: TimePeriod.valueOf(long).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]valueThe value in milliseconds; a negative value is an error.
[out]timePeriodThe pointer to the variable that receives the time period (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimePeriod_valueOfString()

int32_t dxfg_v4_TimePeriod_valueOfString ( graal_isolatethread_t * thread,
const char * value,
DXFG_OUT dxfg_v4_time_period_t ** timePeriod )

Returns the time period that the string represents. The string is an ISO8601 duration with these simplifications: the letters are case insensitive; the letters "P" and "T" can be omitted; the letter "S" can be omitted, then the last number is the seconds; the seconds can be fractional (milliseconds precision); an omitted part is zero; the string "inf" is the unlimited period.

Java: TimePeriod.valueOf(String).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]valueThe string, e.g. "PT1H30M", "1d" or "0.5".
[out]timePeriodThe pointer to the variable that receives the time period (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error (e.g. the string cannot be parsed). Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimePeriod_ZERO()

int32_t dxfg_v4_TimePeriod_ZERO ( graal_isolatethread_t * thread,
DXFG_OUT dxfg_v4_time_period_t ** timePeriod )

Returns the time period of zero.

Java: TimePeriod.ZERO.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[out]timePeriodThe pointer to the variable that receives the time period (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeZone_getDefault()

int32_t dxfg_v4_TimeZone_getDefault ( graal_isolatethread_t * thread,
DXFG_OUT dxfg_v4_time_zone_t ** timeZone )

Returns the default time zone of the Java virtual machine.

Java: TimeZone.getDefault().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[out]timeZoneThe pointer to the variable that receives the time zone (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeZone_getDisplayName()

int32_t dxfg_v4_TimeZone_getDisplayName ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
DXFG_OUT const char ** displayName )

Returns the long name of the time zone (for the standard time) in the default locale of the Java virtual machine.

Java: TimeZone.getDisplayName().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone.
[out]displayNameThe pointer to the variable that receives the name (release it with dxfg_v4_String_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeZone_getDisplayNameWithStyle()

int32_t dxfg_v4_TimeZone_getDisplayNameWithStyle ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
int32_t daylight,
int32_t style,
DXFG_OUT const char ** displayName )

Returns the name of the time zone in the default locale of the Java virtual machine, for the standard or the daylight saving time, in the long or the short style.

Java: TimeZone.getDisplayName(boolean, int).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone.
[in]daylight1 for the name of the daylight saving time, any other value for the name of the standard time.
[in]style0 for the short name (TimeZone.SHORT), 1 for the long name (TimeZone.LONG); any other value is an error.
[out]displayNameThe pointer to the variable that receives the name (release it with dxfg_v4_String_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeZone_getDSTSavings()

int32_t dxfg_v4_TimeZone_getDSTSavings ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
DXFG_OUT int32_t * dstSavings )

Returns the amount of time to be added to the local standard time to get the local wall clock time, in milliseconds. It is 0 if the time zone does not observe the daylight saving time.

Java: TimeZone.getDSTSavings().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone.
[out]dstSavingsThe pointer to the variable that receives the savings in milliseconds; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeZone_getID()

int32_t dxfg_v4_TimeZone_getID ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
DXFG_OUT const char ** id )

Returns the ID of the time zone.

Java: TimeZone.getID().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone.
[out]idThe pointer to the variable that receives the ID (release it with dxfg_v4_String_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeZone_getOffset()

int32_t dxfg_v4_TimeZone_getOffset ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
int64_t date,
DXFG_OUT int32_t * offset )

Returns the offset of the time zone from UTC at the date, in milliseconds. If the daylight saving time is in effect at the date, the offset includes the saving.

Java: TimeZone.getOffset(long).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone.
[in]dateThe date: the number of milliseconds since 1970-01-01T00:00:00Z.
[out]offsetThe pointer to the variable that receives the offset in milliseconds; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeZone_getOffsetByCalendarFields()

int32_t dxfg_v4_TimeZone_getOffsetByCalendarFields ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
int32_t era,
int32_t year,
int32_t month,
int32_t day,
int32_t dayOfWeek,
int32_t milliseconds,
DXFG_OUT int32_t * offset )

Returns the offset of the time zone from UTC at the local date, in milliseconds, adjusted for the daylight saving time.

Java: TimeZone.getOffset(int, int, int, int, int, int).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone.
[in]eraThe era of the date: 1 for AD (GregorianCalendar.AD) or 0 for BC (GregorianCalendar.BC).
[in]yearThe year in the era.
[in]monthThe month of the year, 0-based: 0 for January.
[in]dayThe day of the month.
[in]dayOfWeekThe day of the week: 1 for Sunday (Calendar.SUNDAY) to 7 for Saturday.
[in]millisecondsThe milliseconds in the day, in the standard local time.
[out]offsetThe pointer to the variable that receives the offset in milliseconds; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error (e.g. a parameter is out of range). Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeZone_getRawOffset()

int32_t dxfg_v4_TimeZone_getRawOffset ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
DXFG_OUT int32_t * rawOffset )

Returns the offset of the time zone from UTC, in milliseconds, that does not include the daylight saving time.

Java: TimeZone.getRawOffset().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone.
[out]rawOffsetThe pointer to the variable that receives the raw offset in milliseconds; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeZone_getTimeZone()

int32_t dxfg_v4_TimeZone_getTimeZone ( graal_isolatethread_t * thread,
const char * ID,
DXFG_OUT dxfg_v4_time_zone_t ** timeZone )

Returns the time zone for the ID. If the ID is not known, the result is the GMT zone.

Java: TimeZone.getTimeZone(String).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]IDThe ID of the time zone, e.g. "America/New_York" or "GMT+03:00".
[out]timeZoneThe pointer to the variable that receives the time zone (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeZone_hasSameRules()

int32_t dxfg_v4_TimeZone_hasSameRules ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
dxfg_v4_time_zone_t * other,
DXFG_OUT int32_t * hasSameRules )

Checks whether the time zone has the same rules and offset as the other time zone (they may differ only in the ID).

Java: TimeZone.hasSameRules(TimeZone).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone.
[in]otherThe other time zone.
[out]hasSameRulesThe pointer to the variable that receives 1 if the rules are the same, 0 if they are not (also if other is NULL); must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeZone_inDaylightTime()

int32_t dxfg_v4_TimeZone_inDaylightTime ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
int64_t date,
DXFG_OUT int32_t * inDaylightTime )

Checks whether the date is in the daylight saving time of the time zone.

Java: TimeZone.inDaylightTime(Date).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone.
[in]dateThe date: the number of milliseconds since 1970-01-01T00:00:00Z.
[out]inDaylightTimeThe pointer to the variable that receives 1 if the date is in the daylight saving time, 0 if it is not; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeZone_observesDaylightTime()

int32_t dxfg_v4_TimeZone_observesDaylightTime ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
DXFG_OUT int32_t * observesDaylightTime )

Checks whether the time zone is currently in the daylight saving time, or a transition from the standard time to the daylight saving time occurs at any future time.

Java: TimeZone.observesDaylightTime().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone.
[out]observesDaylightTimeThe pointer to the variable that receives 1 if the time zone observes the daylight saving time, 0 if it does not; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

◆ dxfg_v4_TimeZone_setID()

int32_t dxfg_v4_TimeZone_setID ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
const char * ID )

Sets the ID of the time zone. It changes the Java object, so all the handles of the time zone see the new ID.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone.
[in]IDThe new ID.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

Java: TimeZone.setID(String).

◆ dxfg_v4_TimeZone_setRawOffset()

int32_t dxfg_v4_TimeZone_setRawOffset ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
int32_t offsetMillis )

Sets the offset of the time zone from UTC that does not include the daylight saving time. It changes the Java object, so all the handles of the time zone see the new offset.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone.
[in]offsetMillisThe raw offset in milliseconds.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

Java: TimeZone.setRawOffset(int).

◆ dxfg_v4_TimeZone_useDaylightTime()

int32_t dxfg_v4_TimeZone_useDaylightTime ( graal_isolatethread_t * thread,
dxfg_v4_time_zone_t * timeZone,
DXFG_OUT int32_t * useDaylightTime )

Checks whether the time zone uses the daylight saving time.

Java: TimeZone.useDaylightTime().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]timeZoneThe time zone.
[out]useDaylightTimeThe pointer to the variable that receives 1 if the time zone uses the daylight saving time, 0 if it does not; must not be NULL.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error. Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.