Java#

Basic API#

init

The openYuanrong initialization interface is used to configure parameters.

Finalize

Terminate the system and release the relevant resources.

Config

Configuration parameters required by the init() interface.

Stateful & Stateless Function API#

invoke

Create openYuanrong function instance or call method.

function

Constructs a FunctionHandler for a given function.

FunctionHandler

Create an operation class for creating a stateless Java function instance.

function options

Set the options for the current invocation, including resources, etc.

Instance

Create an InstanceCreator for constructing an instance of a class.

InstanceCreator

Create an operation class for creating a Java stateful function instance.

InstanceHandler

Handle to an instance of a stateful function.

InstanceHandler function

Constructs a InstanceFunctionHandler for a given stateful function instance member method.

InstanceFunctionHandler

Handle to a stateful function instance member method.

InstanceHandler exportHandler

Export handler information for stateful function instance.

InstanceHandler importHandler

Import handler information for stateful function instance.

InstanceHandler terminate

Terminate a stateful function instance.

saveState

Saves the instance state.

loadState

Loads the saved instance state.

yrShutdown

Users can use this interface to perform data cleanup or data persistence operations.

yrRecover

Users can use this interface to perform data recovery operations.

InvokeOptions

Use to set the invoke options.

Data Object API#

put

Save data to the backend.

get

Retrieve the value of an object from the backend storage based on its key.

wait

Waits for the values of a set of objects in the data system to be ready based on their keys.

ObjectRef

Initialize the ObjectRef.

Stream API#

Stream

Passing ordered unbounded data between openYuanrong functions.

Function Interoperation API#

setUrn

Set the functionUrn for the function.

CppFunction

Java function calls C++ function.

CppFunctionHandler

Class for creating instances of stateless functions in C++.

CppInstanceClass

Helper class to new C++ instance class.

CppInstanceMethod

Helper class to invoke member function.

CppInstanceCreator

Create an operation class for creating a C++ stateful function instance.

CppInstanceHandler

Handle to an instance of a C++ stateful function.

CppInstanceHandler function

Constructs a InstanceFunctionHandler for a given C++ stateful function instance member method.

CppInstanceFunctionHandler

Handle to a C++ stateful function instance member method.

CppInstanceHandler exportHandler

Obtain instance handle information.

CppInstanceHandler importHandler

Import handler information for C++ stateful function instance.

CppInstanceHandler terminate

Terminate a C++ function instance.

JavaFunction

Java function calls Java function.

JavaFunctionHandler

Create an operation class for creating a stateless Java function instance.

JavaInstanceClass

Helper class to new java instance class.

JavaInstanceMethod

Helper class to invoke member function.

JavaInstanceCreator

Create an operation class for creating a Java stateful function instance.

JavaInstanceHandler

Handle to an instance of a Java stateful function.

JavaInstanceHandler function

Constructs a InstanceFunctionHandler for a given Java stateful function instance member method.

JavaInstanceFunctionHandler

Handle to a Java stateful function instance member method.

JavaInstanceHandler exportHandler

Obtain instance handle information.

JavaInstanceHandler importHandler

Import handler information for Java stateful function instance.

JavaInstanceHandler terminate

Terminate a Java function instance.

VoidFunctionHandler

Operation class that calls a void function with no return value.

VoidInstanceFunctionHandler

Operation class that calls a Java class instance member function without a return value.

KV Cache API#

YR.kv().set()

Sets the value of a key.

YR.kv().mSetTx()

A transactional interface for setting multiple binary data entries in a batch.

YR.kv().Write()

Writes the value of a key.

YR.kv().mWriteTx()

Sets multiple key-value pairs.

YR.kv().get()

Retrieves a value associated with a specified key, similar to Redis’s GET command.

YR.kv().getWithParam()

Retrieves multiple values associated with specified keys with additional parameters, supporting offset-based reading.

YR.kv().read()

Retrieve the value of the specified type associated with the specified key.

YR.kv().del

Deletes a key and its associated data, similar to Redis’s DEL command.

Function Group API#

Group

A class for managing the lifecycle of grouped instances.

Affinity Scheduling#

Affinity

Affinity Scheduling Configuration Parameters.