Package org.redisson.api
Interface RFunctionRx
public interface RFunctionRx
Interface for Redis Function feature
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescription<R> io.reactivex.rxjava3.core.Maybe<R> call(String key, FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values) Executes function<R> io.reactivex.rxjava3.core.Maybe<R> call(FunctionMode mode, String name, FunctionResult returnType) Executes function<R> io.reactivex.rxjava3.core.Maybe<R> call(FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values) Executes functionio.reactivex.rxjava3.core.CompletableDeletes library.io.reactivex.rxjava3.core.Single<byte[]> dump()Returns serialized state of all libraries.io.reactivex.rxjava3.core.Completableflush()Deletes all libraries.io.reactivex.rxjava3.core.Completablekill()Kills currently executed functions.io.reactivex.rxjava3.core.Single<List<FunctionLibrary>> list()Returns information about libraries and functions per each.io.reactivex.rxjava3.core.Single<List<FunctionLibrary>> Returns information about libraries and functions per each by name pattern.io.reactivex.rxjava3.core.CompletableLoads a library.io.reactivex.rxjava3.core.CompletableloadAndReplace(String libraryName, String code) Loads a library and overwrites existing library.io.reactivex.rxjava3.core.Completablerestore(byte[] payload) Restores libraries using their state returned bydump()method.io.reactivex.rxjava3.core.CompletablerestoreAfterFlush(byte[] payload) Restores libraries using their state returned bydump()method.io.reactivex.rxjava3.core.CompletablerestoreAndReplace(byte[] payload) Restores libraries using their state returned bydump()method.io.reactivex.rxjava3.core.Single<FunctionStats> stats()Returns information about currently running Redis function and available execution engines.
-
Method Details
-
delete
Deletes library. Error is thrown if library doesn't exist.- Parameters:
libraryName- library name
-
dump
io.reactivex.rxjava3.core.Single<byte[]> dump()Returns serialized state of all libraries.- Returns:
- serialized state
-
flush
io.reactivex.rxjava3.core.Completable flush()Deletes all libraries. -
kill
io.reactivex.rxjava3.core.Completable kill()Kills currently executed functions. Applied only to functions which don't modify data. -
list
io.reactivex.rxjava3.core.Single<List<FunctionLibrary>> list()Returns information about libraries and functions per each.- Returns:
- list of libraries
-
list
Returns information about libraries and functions per each by name pattern.Supported glob-style patterns: h?llo matches hello, hallo and hxllo h*llo matches hllo and heeeello h[ae]llo matches hello and hallo, but not hillo
- Parameters:
namePattern- name pattern- Returns:
- list of libraries
-
load
Loads a library. Error is thrown if library already exists.- Parameters:
libraryName- library namecode- function code
-
loadAndReplace
Loads a library and overwrites existing library.- Parameters:
libraryName- library namecode- function code
-
restore
io.reactivex.rxjava3.core.Completable restore(byte[] payload) Restores libraries using their state returned bydump()method. Restored libraries are appended to the existing libraries and throws error in case of collision.- Parameters:
payload- serialized state
-
restoreAndReplace
io.reactivex.rxjava3.core.Completable restoreAndReplace(byte[] payload) Restores libraries using their state returned bydump()method. Restored libraries are appended to the existing libraries.- Parameters:
payload- serialized state
-
restoreAfterFlush
io.reactivex.rxjava3.core.Completable restoreAfterFlush(byte[] payload) Restores libraries using their state returned bydump()method. Deletes all existing libraries before restoring.- Parameters:
payload- serialized state
-
stats
io.reactivex.rxjava3.core.Single<FunctionStats> stats()Returns information about currently running Redis function and available execution engines.- Returns:
- function information
-
call
<R> io.reactivex.rxjava3.core.Maybe<R> call(String key, FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values) Executes function- Type Parameters:
R- - type of result- Parameters:
key- - used to locate Redis node in Clustermode- - execution modename- - function namereturnType- - return typekeys- - keys available through KEYS param in scriptvalues- - values available through VALUES param in script- Returns:
- result object
-
call
<R> io.reactivex.rxjava3.core.Maybe<R> call(FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values) Executes function- Type Parameters:
R- - type of result- Parameters:
mode- - execution modename- - function namereturnType- - return typekeys- - keys available through KEYS param in scriptvalues- - values available through VALUES param in script- Returns:
- result object
-
call
<R> io.reactivex.rxjava3.core.Maybe<R> call(FunctionMode mode, String name, FunctionResult returnType) Executes function- Type Parameters:
R- - type of result- Parameters:
mode- - execution modename- - function namereturnType- - return type- Returns:
- result object
-