Package org.redisson.api
Interface RFunctionReactive
-
public interface RFunctionReactive
Interface for Redis Function feature- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <R> reactor.core.publisher.Mono<R>
call(String key, FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values)
Executes function<R> reactor.core.publisher.Mono<R>
call(FunctionMode mode, String name, FunctionResult returnType)
Executes function<R> reactor.core.publisher.Mono<R>
call(FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values)
Executes functionreactor.core.publisher.Mono<Void>
delete(String libraryName)
Deletes library.reactor.core.publisher.Mono<byte[]>
dump()
Returns serialized state of all libraries.reactor.core.publisher.Mono<Void>
flush()
Deletes all libraries.reactor.core.publisher.Mono<Void>
kill()
Kills currently executed functions.reactor.core.publisher.Mono<List<FunctionLibrary>>
list()
Returns information about libraries and functions per each.reactor.core.publisher.Mono<List<FunctionLibrary>>
list(String namePattern)
Returns information about libraries and functions per each by name pattern.reactor.core.publisher.Mono<Void>
load(String libraryName, String code)
Loads a library.reactor.core.publisher.Mono<Void>
loadAndReplace(String libraryName, String code)
Loads a library and overwrites existing library.reactor.core.publisher.Mono<Void>
restore(byte[] payload)
Restores libraries using their state returned bydump()
method.reactor.core.publisher.Mono<Void>
restoreAfterFlush(byte[] payload)
Restores libraries using their state returned bydump()
method.reactor.core.publisher.Mono<Void>
restoreAndReplace(byte[] payload)
Restores libraries using their state returned bydump()
method.reactor.core.publisher.Mono<FunctionStats>
stats()
Returns information about currently running Redis function and available execution engines.
-
-
-
Method Detail
-
delete
reactor.core.publisher.Mono<Void> delete(String libraryName)
Deletes library. Error is thrown if library doesn't exist.- Parameters:
libraryName
- library name
-
dump
reactor.core.publisher.Mono<byte[]> dump()
Returns serialized state of all libraries.- Returns:
- serialized state
-
flush
reactor.core.publisher.Mono<Void> flush()
Deletes all libraries.
-
kill
reactor.core.publisher.Mono<Void> kill()
Kills currently executed functions. Applied only to functions which don't modify data.
-
list
reactor.core.publisher.Mono<List<FunctionLibrary>> list()
Returns information about libraries and functions per each.- Returns:
- list of libraries
-
list
reactor.core.publisher.Mono<List<FunctionLibrary>> list(String namePattern)
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
reactor.core.publisher.Mono<Void> load(String libraryName, String code)
Loads a library. Error is thrown if library already exists.- Parameters:
libraryName
- library namecode
- function code
-
loadAndReplace
reactor.core.publisher.Mono<Void> loadAndReplace(String libraryName, String code)
Loads a library and overwrites existing library.- Parameters:
libraryName
- library namecode
- function code
-
restore
reactor.core.publisher.Mono<Void> 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
reactor.core.publisher.Mono<Void> restoreAndReplace(byte[] payload)
Restores libraries using their state returned bydump()
method. Restored libraries are appended to the existing libraries.- Parameters:
payload
- serialized state
-
restoreAfterFlush
reactor.core.publisher.Mono<Void> restoreAfterFlush(byte[] payload)
Restores libraries using their state returned bydump()
method. Deletes all existing libraries before restoring.- Parameters:
payload
- serialized state
-
stats
reactor.core.publisher.Mono<FunctionStats> stats()
Returns information about currently running Redis function and available execution engines.- Returns:
- function information
-
call
<R> reactor.core.publisher.Mono<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> reactor.core.publisher.Mono<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> reactor.core.publisher.Mono<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
-
-