dxFeed Graal Native SDK 3.12.0
Loading...
Searching...
No Matches
Schedule (v4)

The v4 functions and type names of the group Schedule. 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_schedule_t dxfg_v4_schedule_t
 A handle of a Java Schedule object; release it with dxfg_JavaObjectHandler_release().
typedef dxfg_session_type_t dxfg_v4_session_type_t
typedef dxfg_session_t dxfg_v4_session_t
 A handle of a Java Session object; release it with dxfg_Session_release().
typedef dxfg_session_list dxfg_v4_session_list
typedef dxfg_day_t dxfg_v4_day_t
 A handle of a Java Day object; release it with dxfg_Day_release().
typedef dxfg_session_filter_function dxfg_v4_session_filter_function
typedef dxfg_session_filter_t dxfg_v4_session_filter_t
 A handle of a Java SessionFilter object; release it with dxfg_JavaObjectHandler_release().
typedef dxfg_session_filter_prepare_t dxfg_v4_session_filter_prepare_t
typedef dxfg_day_filter_function dxfg_v4_day_filter_function
typedef dxfg_day_filter_t dxfg_v4_day_filter_t
 A handle of a Java DayFilter object; release it with dxfg_JavaObjectHandler_release().
typedef dxfg_day_filter_prepare_t dxfg_v4_day_filter_prepare_t

Functions

int32_t dxfg_v4_SessionFilter_new (graal_isolatethread_t *thread, dxfg_v4_session_filter_function filter, DXFG_OUT dxfg_v4_session_filter_t **sessionFilter)
int32_t dxfg_v4_SessionFilter_getInstance (graal_isolatethread_t *thread, dxfg_v4_session_filter_prepare_t filter, DXFG_OUT dxfg_v4_session_filter_t **sessionFilter)
int32_t dxfg_v4_DayFilter_new (graal_isolatethread_t *thread, dxfg_v4_day_filter_function filter, DXFG_OUT dxfg_v4_day_filter_t **dayFilter)
int32_t dxfg_v4_DayFilter_getInstance (graal_isolatethread_t *thread, dxfg_v4_day_filter_prepare_t filter, DXFG_OUT dxfg_v4_day_filter_t **dayFilter)
int32_t dxfg_v4_Schedule_getInstanceByProfileHandle (graal_isolatethread_t *thread, dxfg_v4_instrument_profile_t *instrumentProfile, DXFG_OUT dxfg_v4_schedule_t **schedule)
int32_t dxfg_v4_Schedule_getInstanceByDefinition (graal_isolatethread_t *thread, const char *scheduleDefinition, DXFG_OUT dxfg_v4_schedule_t **schedule)
int32_t dxfg_v4_Schedule_getInstanceByProfileHandleWithVenue (graal_isolatethread_t *thread, dxfg_v4_instrument_profile_t *instrumentProfile, const char *venue, DXFG_OUT dxfg_v4_schedule_t **schedule)
int32_t dxfg_v4_Schedule_getTradingVenuesByProfileHandle (graal_isolatethread_t *thread, dxfg_v4_instrument_profile_t *instrumentProfile, DXFG_OUT dxfg_v4_string_list **venues)
int32_t dxfg_v4_Schedule_downloadDefaults (graal_isolatethread_t *thread, const char *downloadConfig)
int32_t dxfg_v4_Schedule_setDefaults (graal_isolatethread_t *thread, const char *data, int32_t size)
int32_t dxfg_v4_Schedule_getSessionByTime (graal_isolatethread_t *thread, dxfg_v4_schedule_t *schedule, int64_t time, DXFG_OUT dxfg_v4_session_t **session)
int32_t dxfg_v4_Schedule_getDayByTime (graal_isolatethread_t *thread, dxfg_v4_schedule_t *schedule, int64_t time, DXFG_OUT dxfg_v4_day_t **day)
int32_t dxfg_v4_Schedule_getDayById (graal_isolatethread_t *thread, dxfg_v4_schedule_t *schedule, int32_t dayId, DXFG_OUT dxfg_v4_day_t **day)
int32_t dxfg_v4_Schedule_getDayByYearMonthDay (graal_isolatethread_t *thread, dxfg_v4_schedule_t *schedule, int32_t yearMonthDay, DXFG_OUT dxfg_v4_day_t **day)
int32_t dxfg_v4_Schedule_getNearestSessionByTime (graal_isolatethread_t *thread, dxfg_v4_schedule_t *schedule, int64_t time, dxfg_v4_session_filter_t *filter, DXFG_OUT dxfg_v4_session_t **session)
int32_t dxfg_v4_Schedule_findNearestSessionByTime (graal_isolatethread_t *thread, dxfg_v4_schedule_t *schedule, int64_t time, dxfg_v4_session_filter_t *filter, DXFG_OUT dxfg_v4_session_t **session)
int32_t dxfg_v4_Schedule_getName (graal_isolatethread_t *thread, dxfg_v4_schedule_t *schedule, DXFG_OUT const char **name)
int32_t dxfg_v4_Schedule_getTimeZone (graal_isolatethread_t *thread, dxfg_v4_schedule_t *schedule, DXFG_OUT const char **timeZoneDisplayName)
int32_t dxfg_v4_Schedule_getTimeZone_getID (graal_isolatethread_t *thread, dxfg_v4_schedule_t *schedule, DXFG_OUT const char **timeZoneId)
int32_t dxfg_v4_Schedule_getDefinition (graal_isolatethread_t *thread, dxfg_v4_schedule_t *schedule, DXFG_OUT char **definition)
int32_t dxfg_v4_Session_getDay (graal_isolatethread_t *thread, dxfg_v4_session_t *session, DXFG_OUT dxfg_v4_day_t **day)
int32_t dxfg_v4_Session_getType (graal_isolatethread_t *thread, dxfg_v4_session_t *session, DXFG_OUT dxfg_v4_session_type_t *type)
int32_t dxfg_v4_Session_isTrading (graal_isolatethread_t *thread, dxfg_v4_session_t *session, DXFG_OUT int32_t *trading)
int32_t dxfg_v4_Session_isEmpty (graal_isolatethread_t *thread, dxfg_v4_session_t *session, DXFG_OUT int32_t *empty)
int32_t dxfg_v4_Session_getStartTime (graal_isolatethread_t *thread, dxfg_v4_session_t *session, DXFG_OUT int64_t *startTime)
int32_t dxfg_v4_Session_getEndTime (graal_isolatethread_t *thread, dxfg_v4_session_t *session, DXFG_OUT int64_t *endTime)
int32_t dxfg_v4_Session_containsTime (graal_isolatethread_t *thread, dxfg_v4_session_t *session, int64_t time, DXFG_OUT int32_t *contains)
int32_t dxfg_v4_Session_getPrevSession (graal_isolatethread_t *thread, dxfg_v4_session_t *session, dxfg_v4_session_filter_t *filter, DXFG_OUT dxfg_v4_session_t **prevSession)
int32_t dxfg_v4_Session_getNextSession (graal_isolatethread_t *thread, dxfg_v4_session_t *session, dxfg_v4_session_filter_t *filter, DXFG_OUT dxfg_v4_session_t **nextSession)
int32_t dxfg_v4_Session_findPrevSession (graal_isolatethread_t *thread, dxfg_v4_session_t *session, dxfg_v4_session_filter_t *filter, DXFG_OUT dxfg_v4_session_t **prevSession)
int32_t dxfg_v4_Session_findNextSession (graal_isolatethread_t *thread, dxfg_v4_session_t *session, dxfg_v4_session_filter_t *filter, DXFG_OUT dxfg_v4_session_t **nextSession)
int32_t dxfg_v4_Session_hashCode (graal_isolatethread_t *thread, dxfg_v4_session_t *session, DXFG_OUT int32_t *hashCode)
int32_t dxfg_v4_Session_equals (graal_isolatethread_t *thread, dxfg_v4_session_t *session, dxfg_v4_session_t *otherSession, DXFG_OUT int32_t *equal)
int32_t dxfg_v4_Session_toString (graal_isolatethread_t *thread, dxfg_v4_session_t *session, DXFG_OUT const char **string)
int32_t dxfg_v4_Day_getSchedule (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT dxfg_v4_schedule_t **schedule)
int32_t dxfg_v4_Day_getDayId (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT int32_t *dayId)
int32_t dxfg_v4_Day_getYearMonthDay (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT int32_t *yearMonthDay)
int32_t dxfg_v4_Day_getYear (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT int32_t *year)
int32_t dxfg_v4_Day_getMonthOfYear (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT int32_t *monthOfYear)
int32_t dxfg_v4_Day_getDayOfMonth (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT int32_t *dayOfMonth)
int32_t dxfg_v4_Day_getDayOfWeek (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT int32_t *dayOfWeek)
int32_t dxfg_v4_Day_isHoliday (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT int32_t *holiday)
int32_t dxfg_v4_Day_isShortDay (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT int32_t *shortDay)
int32_t dxfg_v4_Day_isTrading (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT int32_t *trading)
int32_t dxfg_v4_Day_getStartTime (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT int64_t *startTime)
int32_t dxfg_v4_Day_getEndTime (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT int64_t *endTime)
int32_t dxfg_v4_Day_containsTime (graal_isolatethread_t *thread, dxfg_v4_day_t *day, int64_t time, DXFG_OUT int32_t *contains)
int32_t dxfg_v4_Day_getResetTime (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT int64_t *resetTime)
int32_t dxfg_v4_Day_getSessions (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT dxfg_v4_session_list **sessions)
int32_t dxfg_v4_Day_getSessionByTime (graal_isolatethread_t *thread, dxfg_v4_day_t *day, int64_t time, DXFG_OUT dxfg_v4_session_t **session)
int32_t dxfg_v4_Day_getFirstSession (graal_isolatethread_t *thread, dxfg_v4_day_t *day, dxfg_v4_session_filter_t *filter, DXFG_OUT dxfg_v4_session_t **session)
int32_t dxfg_v4_Day_getLastSession (graal_isolatethread_t *thread, dxfg_v4_day_t *day, dxfg_v4_session_filter_t *filter, DXFG_OUT dxfg_v4_session_t **session)
int32_t dxfg_v4_Day_findFirstSession (graal_isolatethread_t *thread, dxfg_v4_day_t *day, dxfg_v4_session_filter_t *filter, DXFG_OUT dxfg_v4_session_t **session)
int32_t dxfg_v4_Day_findLastSession (graal_isolatethread_t *thread, dxfg_v4_day_t *day, dxfg_v4_session_filter_t *filter, DXFG_OUT dxfg_v4_session_t **session)
int32_t dxfg_v4_Day_getPrevDay (graal_isolatethread_t *thread, dxfg_v4_day_t *day, dxfg_v4_day_filter_t *filter, DXFG_OUT dxfg_v4_day_t **prevDay)
int32_t dxfg_v4_Day_getNextDay (graal_isolatethread_t *thread, dxfg_v4_day_t *day, dxfg_v4_day_filter_t *filter, DXFG_OUT dxfg_v4_day_t **nextDay)
int32_t dxfg_v4_Day_findPrevDay (graal_isolatethread_t *thread, dxfg_v4_day_t *day, dxfg_v4_day_filter_t *filter, DXFG_OUT dxfg_v4_day_t **prevDay)
int32_t dxfg_v4_Day_findNextDay (graal_isolatethread_t *thread, dxfg_v4_day_t *day, dxfg_v4_day_filter_t *filter, DXFG_OUT dxfg_v4_day_t **nextDay)
int32_t dxfg_v4_Day_hashCode (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT int32_t *hashCode)
int32_t dxfg_v4_Day_equals (graal_isolatethread_t *thread, dxfg_v4_day_t *day, dxfg_v4_day_t *otherDay, DXFG_OUT int32_t *equal)
int32_t dxfg_v4_Day_toString (graal_isolatethread_t *thread, dxfg_v4_day_t *day, DXFG_OUT const char **string)
int32_t dxfg_v4_Day_release (graal_isolatethread_t *thread, dxfg_v4_day_t *day)
int32_t dxfg_v4_Session_release (graal_isolatethread_t *thread, dxfg_v4_session_t *session)
int32_t dxfg_v4_session_list_wrapper_release (graal_isolatethread_t *thread, dxfg_v4_session_list *sessions)
int32_t dxfg_v4_Schedule_getInstance (graal_isolatethread_t *thread, dxfg_v4_instrument_profile_data_t *instrumentProfile, DXFG_OUT dxfg_v4_schedule_t **schedule)
int32_t dxfg_v4_Schedule_getInstanceWithVenue (graal_isolatethread_t *thread, dxfg_v4_instrument_profile_data_t *instrumentProfile, const char *venue, DXFG_OUT dxfg_v4_schedule_t **schedule)
int32_t dxfg_v4_Schedule_getTradingVenues (graal_isolatethread_t *thread, dxfg_v4_instrument_profile_data_t *instrumentProfile, DXFG_OUT dxfg_v4_string_list **venues)
int32_t dxfg_v4_session_list_release (graal_isolatethread_t *thread, dxfg_v4_session_list *sessions)

Detailed Description

The v4 functions and type names of the group Schedule. 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_day_filter_function

A custom day filter function: tests whether a day is an acceptable result of a search.

The function is called by the search function that uses the filter (for example dxfg_Day_findNextDay()), on the thread that called that search function, possibly several times during the call.

The day handle is created for this call and the SDK does not release it afterwards: release it with dxfg_Day_release() unless it is needed later.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day to test.
Returns
1 if the day is accepted; any other value rejects it.

◆ dxfg_v4_day_filter_prepare_t

The predefined day filters, see dxfg_DayFilter_getInstance().

The days of the week are numbered from 1 (Monday) to 7 (Sunday).

Javadoc

◆ dxfg_v4_day_filter_t

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

A filter for days used by the search functions.

Javadoc

◆ dxfg_v4_day_t

A handle of a Java Day object; release it with dxfg_Day_release().

A day is a continuous period of time about 24 hours long, aligned to the business hours of the schedule, so days start and end at various local times. Days do not overlap: they form a chain of adjacent periods, and the point on the border belongs to the day that starts there. A day consists of sessions and is a trading day if at least one of them is a trading session.

Javadoc

◆ dxfg_v4_schedule_t

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

A schedule describes the trading schedule of some class of instruments, for example NYSE stocks or CME corn futures. It splits the whole time scale into consecutive days.

Javadoc

◆ dxfg_v4_session_filter_function

A custom session filter function: tests whether a session is an acceptable result of a search.

The function is called by the search function that uses the filter (for example dxfg_Day_findFirstSession()), on the thread that called that search function, possibly several times during the call.

The session handle is created for this call and the SDK does not release it afterwards: release it with dxfg_Session_release() unless it is needed later.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session to test.
Returns
1 if the session is accepted; any other value rejects it.

◆ dxfg_v4_session_filter_prepare_t

◆ dxfg_v4_session_filter_t

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

A filter for sessions used by the search functions.

Javadoc

◆ dxfg_v4_session_list

A list of session handles, returned by dxfg_v4_Day_getSessions().

Release the list together with its sessions with dxfg_v4_session_list_release(). To keep the sessions, release the list itself with dxfg_v4_session_list_wrapper_release() and then each session with dxfg_v4_Session_release().

◆ dxfg_v4_session_t

A handle of a Java Session object; release it with dxfg_Session_release().

A session is a continuous period of time with the same rules for trading activity. It is either trading or non-trading and lies inside one day. Sessions do not overlap: they form a chain of adjacent periods, and the point on the border belongs to the session that starts there. A session may have zero duration (an empty session).

Javadoc

◆ dxfg_v4_session_type_t

The type of a trading session: what kind of trading activity is allowed in it, if any.

Javadoc

Function Documentation

◆ dxfg_v4_Day_containsTime()

int32_t dxfg_v4_Day_containsTime ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
int64_t time,
DXFG_OUT int32_t * contains )

Checks whether a time belongs to a day.

Java: Day.containsTime(long).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]timeThe time to check, in UTC milliseconds.
[out]containsThe pointer to the variable that receives 1 if the time belongs to the day, 0 if 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_Day_equals()

int32_t dxfg_v4_Day_equals ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
dxfg_v4_day_t * otherDay,
DXFG_OUT int32_t * equal )

Checks whether two days are equal.

Days are equal if they belong to equal schedules and have the same day identifier.

Java: Day.equals(Object).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]otherDayThe day to compare with.
[out]equalThe pointer to the variable that receives 1 if the days are equal, 0 if 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_Day_findFirstSession()

int32_t dxfg_v4_Day_findFirstSession ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
dxfg_v4_session_filter_t * filter,
DXFG_OUT dxfg_v4_session_t ** session )

Returns the first session of a day that is accepted by a filter, or NULL if there is none.

The search does not cross the day boundary. NULL is written and the function succeeds if no such session is found within the day.

Java: Day.findFirstSession(SessionFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]filterThe filter that tests the sessions.
[out]sessionThe pointer to the variable that receives the session (release it with dxfg_v4_Session_release()), or NULL if no session is found; 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_Day_findLastSession()

int32_t dxfg_v4_Day_findLastSession ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
dxfg_v4_session_filter_t * filter,
DXFG_OUT dxfg_v4_session_t ** session )

Returns the last session of a day that is accepted by a filter, or NULL if there is none.

The search does not cross the day boundary. NULL is written and the function succeeds if no such session is found within the day.

Java: Day.findLastSession(SessionFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]filterThe filter that tests the sessions.
[out]sessionThe pointer to the variable that receives the session (release it with dxfg_v4_Session_release()), or NULL if no session is found; 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_Day_findNextDay()

int32_t dxfg_v4_Day_findNextDay ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
dxfg_v4_day_filter_t * filter,
DXFG_OUT dxfg_v4_day_t ** nextDay )

Returns the following day accepted by a filter, or NULL if there is none.

The search looks up to a year ahead. NULL is written and the function succeeds if no such day is found.

Java: Day.findNextDay(DayFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day to start from.
[in]filterThe filter that tests the days.
[out]nextDayThe pointer to the variable that receives the nearest following day accepted by the filter (release it with dxfg_v4_Day_release()), or NULL if no day is found; 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_Day_findPrevDay()

int32_t dxfg_v4_Day_findPrevDay ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
dxfg_v4_day_filter_t * filter,
DXFG_OUT dxfg_v4_day_t ** prevDay )

Returns the previous day accepted by a filter, or NULL if there is none.

The search looks up to a year back in time. NULL is written and the function succeeds if no such day is found.

Java: Day.findPrevDay(DayFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day to start from.
[in]filterThe filter that tests the days.
[out]prevDayThe pointer to the variable that receives the nearest previous day accepted by the filter (release it with dxfg_v4_Day_release()), or NULL if no day is found; 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_Day_getDayId()

int32_t dxfg_v4_Day_getDayId ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT int32_t * dayId )

Returns the identifier of a day: the number of the day since 1970-01-01, which has the identifier 0. The previous days have negative identifiers.

Java: Day.getDayId().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]dayIdThe pointer to the variable that receives the day identifier. -1 is also a valid identifier (1969-12-31); 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_Day_getDayOfMonth()

int32_t dxfg_v4_Day_getDayOfMonth ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT int32_t * dayOfMonth )

Returns the ordinal number of a day in its month, starting with 1 for the first day of the month.

Java: Day.getDayOfMonth().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]dayOfMonthThe pointer to the variable that receives the day of the month; 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_Day_getDayOfWeek()

int32_t dxfg_v4_Day_getDayOfWeek ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT int32_t * dayOfWeek )

Returns the ordinal number of a day in its week, from 1 (Monday) to 7 (Sunday).

Java: Day.getDayOfWeek().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]dayOfWeekThe pointer to the variable that receives the day of the week; 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_Day_getEndTime()

int32_t dxfg_v4_Day_getEndTime ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT int64_t * endTime )

Returns the end time of a day (exclusive).

Java: Day.getEndTime().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]endTimeThe pointer to the variable that receives the end time in UTC milliseconds. -1 is also a valid time (1969-12-31T23:59:59.999Z); 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_Day_getFirstSession()

int32_t dxfg_v4_Day_getFirstSession ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
dxfg_v4_session_filter_t * filter,
DXFG_OUT dxfg_v4_session_t ** session )

Returns the first session of a day that is accepted by a filter.

The search does not cross the day boundary. The function fails if no such session is found within the day; it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no session is found, use dxfg_v4_Day_findFirstSession().

Java: Day.getFirstSession(SessionFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]filterThe filter that tests the sessions.
[out]sessionThe pointer to the variable that receives the session (release it with dxfg_v4_Session_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_Day_getLastSession()

int32_t dxfg_v4_Day_getLastSession ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
dxfg_v4_session_filter_t * filter,
DXFG_OUT dxfg_v4_session_t ** session )

Returns the last session of a day that is accepted by a filter.

The search does not cross the day boundary. The function fails if no such session is found within the day; it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no session is found, use dxfg_v4_Day_findLastSession().

Java: Day.getLastSession(SessionFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]filterThe filter that tests the sessions.
[out]sessionThe pointer to the variable that receives the session (release it with dxfg_v4_Session_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_Day_getMonthOfYear()

int32_t dxfg_v4_Day_getMonthOfYear ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT int32_t * monthOfYear )

Returns the calendar month number of a day, from 1 (January) to 12 (December).

Java: Day.getMonthOfYear().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]monthOfYearThe pointer to the variable that receives the month number; 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_Day_getNextDay()

int32_t dxfg_v4_Day_getNextDay ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
dxfg_v4_day_filter_t * filter,
DXFG_OUT dxfg_v4_day_t ** nextDay )

Returns the following day accepted by a filter.

The search looks up to a year ahead. The function fails if no such day is found; it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no day is found, use dxfg_v4_Day_findNextDay().

Java: Day.getNextDay(DayFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day to start from.
[in]filterThe filter that tests the days.
[out]nextDayThe pointer to the variable that receives the nearest following day accepted by the filter (release it with dxfg_v4_Day_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_Day_getPrevDay()

int32_t dxfg_v4_Day_getPrevDay ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
dxfg_v4_day_filter_t * filter,
DXFG_OUT dxfg_v4_day_t ** prevDay )

Returns the previous day accepted by a filter.

The search looks up to a year back in time. The function fails if no such day is found; it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no day is found, use dxfg_v4_Day_findPrevDay().

Java: Day.getPrevDay(DayFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day to start from.
[in]filterThe filter that tests the days.
[out]prevDayThe pointer to the variable that receives the nearest previous day accepted by the filter (release it with dxfg_v4_Day_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_Day_getResetTime()

int32_t dxfg_v4_Day_getResetTime ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT int64_t * resetTime )

Returns the reset time of a day.

The daily data is reset on trading days only; the result has no meaning for non-trading days.

Java: Day.getResetTime().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]resetTimeThe pointer to the variable that receives the reset time in UTC milliseconds. -1 is also a valid time (1969-12-31T23:59:59.999Z); 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_Day_getSchedule()

int32_t dxfg_v4_Day_getSchedule ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT dxfg_v4_schedule_t ** schedule )

Returns the schedule to which a day belongs.

Java: Day.getSchedule().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]scheduleThe pointer to the variable that receives the schedule (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_Day_getSessionByTime()

int32_t dxfg_v4_Day_getSessionByTime ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
int64_t time,
DXFG_OUT dxfg_v4_session_t ** session )

Returns the session of a day that contains a time.

The function fails if no such session is found within the day; it returns DXFG_EXECUTE_FAIL.

Java: Day.getSessionByTime(long).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[in]timeThe time to search for, in UTC milliseconds.
[out]sessionThe pointer to the variable that receives the session (release it with dxfg_v4_Session_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_Day_getSessions()

int32_t dxfg_v4_Day_getSessions ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT dxfg_v4_session_list ** sessions )

Returns the sessions that constitute a day, in the order in which they follow one another.

Java: Day.getSessions().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]sessionsThe pointer to the variable that receives the list of the sessions (release it with dxfg_v4_session_list_release(), or release each session with dxfg_v4_Session_release() and then the list with dxfg_v4_session_list_wrapper_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_Day_getStartTime()

int32_t dxfg_v4_Day_getStartTime ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT int64_t * startTime )

Returns the start time of a day (inclusive).

Java: Day.getStartTime().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]startTimeThe pointer to the variable that receives the start time in UTC milliseconds. -1 is also a valid time (1969-12-31T23:59:59.999Z); 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_Day_getYear()

int32_t dxfg_v4_Day_getYear ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT int32_t * year )

Returns the calendar year of a day, for example 1977.

Java: Day.getYear().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]yearThe pointer to the variable that receives the year; 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_Day_getYearMonthDay()

int32_t dxfg_v4_Day_getYearMonthDay ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT int32_t * yearMonthDay )

Returns the year, month and day numbers of a day packed as year * 10000 + month * 100 + day.

For example, September 28, 1977 has the value 19770928.

Java: Day.getYearMonthDay().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]yearMonthDayThe pointer to the variable that receives the packed year, month and day numbers; 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_Day_hashCode()

int32_t dxfg_v4_Day_hashCode ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT int32_t * hashCode )

Returns the hash code of a day.

Java: Day.hashCode().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]hashCodeThe pointer to the variable that receives the hash code. -1 can also be a valid 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_Day_isHoliday()

int32_t dxfg_v4_Day_isHoliday ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT int32_t * holiday )

Checks whether a day is an exchange holiday.

Usually no trading takes place on a holiday.

Java: Day.isHoliday().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]holidayThe pointer to the variable that receives 1 if the day is a holiday, 0 if 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_Day_isShortDay()

int32_t dxfg_v4_Day_isShortDay ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT int32_t * shortDay )

Checks whether a day is a short day.

Usually trading stops earlier on a short day.

Java: Day.isShortDay().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]shortDayThe pointer to the variable that receives 1 if the day is a short day, 0 if 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_Day_isTrading()

int32_t dxfg_v4_Day_isTrading ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT int32_t * trading )

Checks whether trading activity is allowed within a day.

A trading day has at least one trading session.

Java: Day.isTrading().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]tradingThe pointer to the variable that receives 1 if trading activity is allowed within the day, 0 if 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_Day_release()

int32_t dxfg_v4_Day_release ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day )

Releases a day handle.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day handle to release. Do not use it afterwards.
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_Day_toString()

int32_t dxfg_v4_Day_toString ( graal_isolatethread_t * thread,
dxfg_v4_day_t * day,
DXFG_OUT const char ** string )

Returns the string representation of a day.

Java: Day.toString().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dayThe day.
[out]stringThe pointer to the variable that receives the string representation, a null-terminated UTF-8 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_DayFilter_getInstance()

int32_t dxfg_v4_DayFilter_getInstance ( graal_isolatethread_t * thread,
dxfg_v4_day_filter_prepare_t filter,
DXFG_OUT dxfg_v4_day_filter_t ** dayFilter )

Returns a predefined day filter.

Java: DayFilter.ANY, DayFilter.TRADING, DayFilter.NON_TRADING, DayFilter.HOLIDAY, DayFilter.SHORT_DAY, DayFilter.MONDAY ... DayFilter.SUNDAY, DayFilter.WEEK_DAY, DayFilter.WEEK_END.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]filterThe predefined filter to return.
[out]dayFilterThe pointer to the variable that receives the day filter (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_DayFilter_new()

int32_t dxfg_v4_DayFilter_new ( graal_isolatethread_t * thread,
dxfg_v4_day_filter_function filter,
DXFG_OUT dxfg_v4_day_filter_t ** dayFilter )

Creates a day filter that calls a custom function to test days.

The function pointer must stay valid as long as the filter may be used by search functions.

Java: new DayFilter(int, Boolean, Boolean, Boolean) with DayFilter.accept(Day) overridden to call filter.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]filterThe function that tests a day: it returns 1 to accept the day.
[out]dayFilterThe pointer to the variable that receives the new day filter (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_Schedule_downloadDefaults()

int32_t dxfg_v4_Schedule_downloadDefaults ( graal_isolatethread_t * thread,
const char * downloadConfig )

Downloads the default schedule data and optionally starts the periodic download.

The first download is done before the function returns. A failure of the download itself is logged and does not make the function fail.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]downloadConfigThe download config, a null-terminated UTF-8 string, one of: an empty string or NULL (stop the periodic download); a URL (download once from the URL and stop the periodic download); URL,period (start the periodic download from the URL); auto (start the periodic download from the default location).
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: Schedule.downloadDefaults(String).

◆ dxfg_v4_Schedule_findNearestSessionByTime()

int32_t dxfg_v4_Schedule_findNearestSessionByTime ( graal_isolatethread_t * thread,
dxfg_v4_schedule_t * schedule,
int64_t time,
dxfg_v4_session_filter_t * filter,
DXFG_OUT dxfg_v4_session_t ** session )

Returns the session of a schedule that is nearest to a time and is accepted by a filter, or NULL if there is none.

NULL is written and the function succeeds if no session accepted by the filter is found within one year. The function fails (DXFG_EXECUTE_FAIL) if the time is outside the supported date range.

Java: Schedule.findNearestSessionByTime(long, SessionFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[in]timeThe time to search for, in UTC milliseconds.
[in]filterThe filter that tests the sessions.
[out]sessionThe pointer to the variable that receives the session (release it with dxfg_v4_Session_release()), or NULL if no session is found; 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_Schedule_getDayById()

int32_t dxfg_v4_Schedule_getDayById ( graal_isolatethread_t * thread,
dxfg_v4_schedule_t * schedule,
int32_t dayId,
DXFG_OUT dxfg_v4_day_t ** day )

Returns the day of a schedule with a day identifier.

The function fails if the day identifier is outside the supported date range.

Java: Schedule.getDayById(int).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[in]dayIdThe day identifier: the number of the day since 1970-01-01, which has the identifier 0; the previous days have negative identifiers. See dxfg_v4_Day_getDayId().
[out]dayThe pointer to the variable that receives the day (release it with dxfg_v4_Day_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_Schedule_getDayByTime()

int32_t dxfg_v4_Schedule_getDayByTime ( graal_isolatethread_t * thread,
dxfg_v4_schedule_t * schedule,
int64_t time,
DXFG_OUT dxfg_v4_day_t ** day )

Returns the day of a schedule that contains a time.

The function fails if the time is outside the supported date range.

Java: Schedule.getDayByTime(long).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[in]timeThe time to search for, in UTC milliseconds.
[out]dayThe pointer to the variable that receives the day (release it with dxfg_v4_Day_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_Schedule_getDayByYearMonthDay()

int32_t dxfg_v4_Schedule_getDayByYearMonthDay ( graal_isolatethread_t * thread,
dxfg_v4_schedule_t * schedule,
int32_t yearMonthDay,
DXFG_OUT dxfg_v4_day_t ** day )

Returns the day of a schedule with year, month and day numbers.

If the day does not exist, the day with the lowest valid yearMonthDay that is greater than the specified one is returned. The function fails if the value is outside the supported date range.

Java: Schedule.getDayByYearMonthDay(int).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[in]yearMonthDayThe year, month and day numbers packed as year * 10000 + month * 100 + day; for example, 19770928 is September 28, 1977. See dxfg_v4_Day_getYearMonthDay().
[out]dayThe pointer to the variable that receives the day (release it with dxfg_v4_Day_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_Schedule_getDefinition()

int32_t dxfg_v4_Schedule_getDefinition ( graal_isolatethread_t * thread,
dxfg_v4_schedule_t * schedule,
DXFG_OUT char ** definition )

Returns the definition of a schedule: its name and its properties in parentheses, e.g. NYSE(...). It is the part of the string given to dxfg_v4_Schedule_getInstanceByDefinition(), or of the trading hours of the instrument profile, that defines this schedule.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[out]definitionThe definition, a null-terminated UTF-8 string (release it with dxfg_v4_String_release()). It is written on success only.
Returns
DXFG_EXECUTE_SUCCESSFULLY (0) on successful function execution or DXFG_EXECUTE_FAIL (-1) on error (also when definition is NULL). Use dxfg_v4_get_and_clear_thread_exception() to determine if an exception was thrown.

Java: Schedule.getDefinition().

◆ dxfg_v4_Schedule_getInstance()

int32_t dxfg_v4_Schedule_getInstance ( graal_isolatethread_t * thread,
dxfg_v4_instrument_profile_data_t * instrumentProfile,
DXFG_OUT dxfg_v4_schedule_t ** schedule )

Creates a schedule instance based on a instrument profile.

The schedule is defined by the trading hours of the profile. The function fails if the trading hours contain no parenthesized schedule definition.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]instrumentProfileThe instrument profile.
[out]scheduleThe new schedule instance.
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: Schedule.getInstance(InstrumentProfile).

◆ dxfg_v4_Schedule_getInstanceByDefinition()

int32_t dxfg_v4_Schedule_getInstanceByDefinition ( graal_isolatethread_t * thread,
const char * scheduleDefinition,
DXFG_OUT dxfg_v4_schedule_t ** schedule )

Returns the default schedule for a schedule definition.

The definition has the form of the trading hours of an instrument profile. The first parenthesized part of it is used. The function fails if the definition contains no parenthesized part.

Java: Schedule.getInstance(String).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleDefinitionThe schedule definition, a null-terminated UTF-8 string.
[out]scheduleThe pointer to the variable that receives the schedule (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_Schedule_getInstanceByProfileHandle()

int32_t dxfg_v4_Schedule_getInstanceByProfileHandle ( graal_isolatethread_t * thread,
dxfg_v4_instrument_profile_t * instrumentProfile,
DXFG_OUT dxfg_v4_schedule_t ** schedule )

Returns the default schedule for an instrument profile.

The schedule is defined by the trading hours of the profile. The function fails if the trading hours contain no parenthesized schedule definition.

Java: Schedule.getInstance(InstrumentProfile).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]instrumentProfileThe instrument profile whose schedule is requested.
[out]scheduleThe pointer to the variable that receives the schedule (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_Schedule_getInstanceByProfileHandleWithVenue()

int32_t dxfg_v4_Schedule_getInstanceByProfileHandleWithVenue ( graal_isolatethread_t * thread,
dxfg_v4_instrument_profile_t * instrumentProfile,
const char * venue,
DXFG_OUT dxfg_v4_schedule_t ** schedule )

Returns the schedule for an instrument profile and a trading venue.

The venue is the name that precedes the schedule definition in parentheses in the trading hours of the profile. The function fails if the trading hours contain no schedule for the venue.

Java: Schedule.getInstance(InstrumentProfile, String).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]instrumentProfileThe instrument profile whose schedule is requested.
[in]venueThe trading venue, a null-terminated UTF-8 string.
[out]scheduleThe pointer to the variable that receives the schedule (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_Schedule_getInstanceWithVenue()

int32_t dxfg_v4_Schedule_getInstanceWithVenue ( graal_isolatethread_t * thread,
dxfg_v4_instrument_profile_data_t * instrumentProfile,
const char * venue,
DXFG_OUT dxfg_v4_schedule_t ** schedule )

Creates a schedule instance based on a instrument profile and a venue.

The venue is the name that precedes the schedule definition in parentheses in the trading hours of the profile. The function fails if the trading hours contain no schedule for the venue.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]instrumentProfileThe instrument profile.
[in]venueThe venue, a null-terminated UTF-8 string.
[out]scheduleThe new schedule instance.
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: Schedule.getInstance(InstrumentProfile, String).

◆ dxfg_v4_Schedule_getName()

int32_t dxfg_v4_Schedule_getName ( graal_isolatethread_t * thread,
dxfg_v4_schedule_t * schedule,
DXFG_OUT const char ** name )

Returns the name of a schedule.

Java: Schedule.getName().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[out]nameThe pointer to the variable that receives the name, a null-terminated UTF-8 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_Schedule_getNearestSessionByTime()

int32_t dxfg_v4_Schedule_getNearestSessionByTime ( graal_isolatethread_t * thread,
dxfg_v4_schedule_t * schedule,
int64_t time,
dxfg_v4_session_filter_t * filter,
DXFG_OUT dxfg_v4_session_t ** session )

Returns the session of a schedule that is nearest to a time and is accepted by a filter.

The function fails if the time is outside the supported date range or if no session accepted by the filter is found within one year; in both cases it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no session is found, use dxfg_v4_Schedule_findNearestSessionByTime().

Java: Schedule.getNearestSessionByTime(long, SessionFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[in]timeThe time to search for, in UTC milliseconds.
[in]filterThe filter that tests the sessions.
[out]sessionThe pointer to the variable that receives the session (release it with dxfg_v4_Session_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_Schedule_getSessionByTime()

int32_t dxfg_v4_Schedule_getSessionByTime ( graal_isolatethread_t * thread,
dxfg_v4_schedule_t * schedule,
int64_t time,
DXFG_OUT dxfg_v4_session_t ** session )

Returns the session of a schedule that contains a time.

The function fails if the time is outside the supported date range.

Java: Schedule.getSessionByTime(long).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[in]timeThe time to search for, in UTC milliseconds.
[out]sessionThe pointer to the variable that receives the session (release it with dxfg_v4_Session_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_Schedule_getTimeZone()

int32_t dxfg_v4_Schedule_getTimeZone ( graal_isolatethread_t * thread,
dxfg_v4_schedule_t * schedule,
DXFG_OUT const char ** timeZoneDisplayName )

Returns the display name of the time zone in which a schedule is defined.

To get the identifier of the time zone, use dxfg_v4_Schedule_getTimeZone_getID().

Java: Schedule.getTimeZone(), TimeZone.getDisplayName().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[out]timeZoneDisplayNameThe pointer to the variable that receives the display name, a null-terminated UTF-8 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_Schedule_getTimeZone_getID()

int32_t dxfg_v4_Schedule_getTimeZone_getID ( graal_isolatethread_t * thread,
dxfg_v4_schedule_t * schedule,
DXFG_OUT const char ** timeZoneId )

Returns the identifier of the time zone in which a schedule is defined.

Java: Schedule.getTimeZone(), TimeZone.getID().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]scheduleThe schedule.
[out]timeZoneIdThe pointer to the variable that receives the time zone identifier, a null-terminated UTF-8 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_Schedule_getTradingVenues()

int32_t dxfg_v4_Schedule_getTradingVenues ( graal_isolatethread_t * thread,
dxfg_v4_instrument_profile_data_t * instrumentProfile,
DXFG_OUT dxfg_v4_string_list ** venues )

Returns trading venues by an instrument profile.

The list is empty (size 0, elements NULL) if the trading hours of the profile contain no venues.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]instrumentProfileThe instrument profile.
[out]venuesReturned list of venues.
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_string_list_release() to free the result.

Java: Schedule.getTradingVenues(InstrumentProfile).

◆ dxfg_v4_Schedule_getTradingVenuesByProfileHandle()

int32_t dxfg_v4_Schedule_getTradingVenuesByProfileHandle ( graal_isolatethread_t * thread,
dxfg_v4_instrument_profile_t * instrumentProfile,
DXFG_OUT dxfg_v4_string_list ** venues )

Returns the trading venues of an instrument profile.

The list is empty (size 0, elements NULL) if the trading hours of the profile contain no venues.

Java: Schedule.getTradingVenues(InstrumentProfile).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]instrumentProfileThe instrument profile whose venues are requested.
[out]venuesThe pointer to the variable that receives the list of the venue names (release it with dxfg_v4_string_list_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_Schedule_setDefaults()

int32_t dxfg_v4_Schedule_setDefaults ( graal_isolatethread_t * thread,
const char * data,
int32_t size )

Sets the shared defaults that are used by the schedule instances.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]dataThe content of the default data. Compressed data is detected by its header.
[in]sizeThe size of data in bytes.
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: Schedule.setDefaults(byte[]).

◆ dxfg_v4_Session_containsTime()

int32_t dxfg_v4_Session_containsTime ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
int64_t time,
DXFG_OUT int32_t * contains )

Checks whether a time belongs to a session.

Java: Session.containsTime(long).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
[in]timeThe time to check, in UTC milliseconds.
[out]containsThe pointer to the variable that receives 1 if the time belongs to the session, 0 if 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_Session_equals()

int32_t dxfg_v4_Session_equals ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
dxfg_v4_session_t * otherSession,
DXFG_OUT int32_t * equal )

Checks whether two sessions are equal.

Sessions are equal if they belong to equal days and have the same type, start time and end time.

Java: Session.equals(Object).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
[in]otherSessionThe session to compare with.
[out]equalThe pointer to the variable that receives 1 if the sessions are equal, 0 if 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_Session_findNextSession()

int32_t dxfg_v4_Session_findNextSession ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
dxfg_v4_session_filter_t * filter,
DXFG_OUT dxfg_v4_session_t ** nextSession )

Returns the following session accepted by a filter, or NULL if there is none.

The search may cross the day boundary and look up to a year ahead. NULL is written and the function succeeds if no such session is found.

Java: Session.findNextSession(SessionFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session to start from.
[in]filterThe filter that tests the sessions.
[out]nextSessionThe pointer to the variable that receives the nearest following session accepted by the filter (release it with dxfg_v4_Session_release()), or NULL if no session is found; 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_Session_findPrevSession()

int32_t dxfg_v4_Session_findPrevSession ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
dxfg_v4_session_filter_t * filter,
DXFG_OUT dxfg_v4_session_t ** prevSession )

Returns the previous session accepted by a filter, or NULL if there is none.

The search may cross the day boundary and look up to a year back in time. NULL is written and the function succeeds if no such session is found.

Java: Session.findPrevSession(SessionFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session to start from.
[in]filterThe filter that tests the sessions.
[out]prevSessionThe pointer to the variable that receives the nearest previous session accepted by the filter (release it with dxfg_v4_Session_release()), or NULL if no session is found; 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_Session_getDay()

int32_t dxfg_v4_Session_getDay ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
DXFG_OUT dxfg_v4_day_t ** day )

Returns the day to which a session belongs.

Java: Session.getDay().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
[out]dayThe pointer to the variable that receives the day (release it with dxfg_v4_Day_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_Session_getEndTime()

int32_t dxfg_v4_Session_getEndTime ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
DXFG_OUT int64_t * endTime )

Returns the end time of a session (exclusive).

For an empty session the end time equals the start time.

Java: Session.getEndTime().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
[out]endTimeThe pointer to the variable that receives the end time in UTC milliseconds. -1 is also a valid time (1969-12-31T23:59:59.999Z); 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_Session_getNextSession()

int32_t dxfg_v4_Session_getNextSession ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
dxfg_v4_session_filter_t * filter,
DXFG_OUT dxfg_v4_session_t ** nextSession )

Returns the following session accepted by a filter.

The search may cross the day boundary and look up to a year ahead. The function fails if no such session is found; it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no session is found, use dxfg_v4_Session_findNextSession().

Java: Session.getNextSession(SessionFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session to start from.
[in]filterThe filter that tests the sessions.
[out]nextSessionThe pointer to the variable that receives the nearest following session accepted by the filter (release it with dxfg_v4_Session_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_Session_getPrevSession()

int32_t dxfg_v4_Session_getPrevSession ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
dxfg_v4_session_filter_t * filter,
DXFG_OUT dxfg_v4_session_t ** prevSession )

Returns the previous session accepted by a filter.

The search may cross the day boundary and look up to a year back in time. The function fails if no such session is found; it returns DXFG_EXECUTE_FAIL. To get NULL instead of a failure when no session is found, use dxfg_v4_Session_findPrevSession().

Java: Session.getPrevSession(SessionFilter).

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session to start from.
[in]filterThe filter that tests the sessions.
[out]prevSessionThe pointer to the variable that receives the nearest previous session accepted by the filter (release it with dxfg_v4_Session_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_Session_getStartTime()

int32_t dxfg_v4_Session_getStartTime ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
DXFG_OUT int64_t * startTime )

Returns the start time of a session (inclusive).

For an empty session the start time equals the end time.

Java: Session.getStartTime().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
[out]startTimeThe pointer to the variable that receives the start time in UTC milliseconds. -1 is also a valid time (1969-12-31T23:59:59.999Z); 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_Session_getType()

int32_t dxfg_v4_Session_getType ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
DXFG_OUT dxfg_v4_session_type_t * type )

Returns the type of a session.

Java: Session.getType().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
[out]typeThe pointer to the variable that receives the type of the session, a dxfg_v4_session_type_t value; 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_Session_hashCode()

int32_t dxfg_v4_Session_hashCode ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
DXFG_OUT int32_t * hashCode )

Returns the hash code of a session.

Java: Session.hashCode().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
[out]hashCodeThe pointer to the variable that receives the hash code. -1 can also be a valid 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_Session_isEmpty()

int32_t dxfg_v4_Session_isEmpty ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
DXFG_OUT int32_t * empty )

Checks whether a session has zero duration.

Empty sessions are used for example for indices that post a value once a day. They can be of any type.

Java: Session.isEmpty().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
[out]emptyThe pointer to the variable that receives 1 if the session has zero duration, 0 if 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_Session_isTrading()

int32_t dxfg_v4_Session_isTrading ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
DXFG_OUT int32_t * trading )

Checks whether trading activity is allowed within a session.

Java: Session.isTrading().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
[out]tradingThe pointer to the variable that receives 1 if trading activity is allowed within the session, 0 if 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_session_list_release()

int32_t dxfg_v4_session_list_release ( graal_isolatethread_t * thread,
dxfg_v4_session_list * sessions )

Releases a list of sessions that a function returned (dxfg_v4_Day_getSessions()): releases every session handle, frees the array of the handles and the list itself. To keep the sessions, release the list with dxfg_v4_session_list_wrapper_release() instead.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionsThe 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_session_list_wrapper_release()

int32_t dxfg_v4_session_list_wrapper_release ( graal_isolatethread_t * thread,
dxfg_v4_session_list * sessions )

Releases the dxfg_v4_session_list structure and its array of elements and keeps the sessions themselves.

Release the sessions with dxfg_v4_Session_release() separately; the list must not be used afterwards.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionsThe list to 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_Session_release()

int32_t dxfg_v4_Session_release ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session )

Releases a session handle.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session handle to release. Do not use it afterwards.
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_Session_toString()

int32_t dxfg_v4_Session_toString ( graal_isolatethread_t * thread,
dxfg_v4_session_t * session,
DXFG_OUT const char ** string )

Returns the string representation of a session.

Java: Session.toString().

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]sessionThe session.
[out]stringThe pointer to the variable that receives the string representation, a null-terminated UTF-8 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_SessionFilter_getInstance()

int32_t dxfg_v4_SessionFilter_getInstance ( graal_isolatethread_t * thread,
dxfg_v4_session_filter_prepare_t filter,
DXFG_OUT dxfg_v4_session_filter_t ** sessionFilter )

Returns a predefined session filter.

Java: SessionFilter.ANY, SessionFilter.TRADING, SessionFilter.NON_TRADING, SessionFilter.NO_TRADING, SessionFilter.PRE_MARKET, SessionFilter.REGULAR, SessionFilter.AFTER_MARKET.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]filterThe predefined filter to return.
[out]sessionFilterThe pointer to the variable that receives the session filter (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_SessionFilter_new()

int32_t dxfg_v4_SessionFilter_new ( graal_isolatethread_t * thread,
dxfg_v4_session_filter_function filter,
DXFG_OUT dxfg_v4_session_filter_t ** sessionFilter )

Creates a session filter that calls a custom function to test sessions.

The function pointer must stay valid as long as the filter may be used by search functions.

Java: new SessionFilter(SessionType, Boolean) with SessionFilter.accept(Session) overridden to call filter.

Parameters
[in]threadThe current GraalVM Isolate's thread.
[in]filterThe function that tests a session: it returns 1 to accept the session.
[out]sessionFilterThe pointer to the variable that receives the new session filter (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.