Package org.redisson
Class RedissonFuction
java.lang.Object
org.redisson.RedissonFuction
- All Implemented Interfaces:
RFunction,RFunctionAsync
- Author:
- Nikita Koksharov
-
Constructor Summary
ConstructorsConstructorDescriptionRedissonFuction(CommandAsyncExecutor commandExecutor) RedissonFuction(CommandAsyncExecutor commandExecutor, Codec codec) -
Method Summary
Modifier and TypeMethodDescription<R> Rcall(String key, FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values) Executes function<R> Rcall(FunctionMode mode, String name, FunctionResult returnType) Executes function<R> Rcall(FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values) Executes function<R> RFuture<R>callAsync(String key, FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values) Executes function<R> RFuture<R>callAsync(FunctionMode mode, String name, FunctionResult returnType) Executes function<R> RFuture<R>callAsync(FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values) Executes functionvoidDeletes library.deleteAsync(String libraryName) Deletes library.byte[]dump()Returns serialized state of all libraries.RFuture<byte[]>Returns serialized state of all libraries.voidflush()Deletes all libraries.Deletes all libraries.voidkill()Kills currently executed functions.Kills currently executed functions.list()Returns information about libraries and functions per each.Returns information about libraries and functions per each by name pattern.Returns information about libraries and functions per each.Returns information about libraries and functions per each by name pattern.voidLoads a library.voidloadAndReplace(String libraryName, String code) Loads a library and overwrites existing library.loadAndReplaceAsync(String libraryName, String code) Loads a library and overwrites existing library.Loads a library.voidrestore(byte[] payload) Restores libraries using their state returned byRFunction.dump()method.voidrestoreAfterFlush(byte[] payload) Restores libraries using their state returned byRFunction.dump()method.restoreAfterFlushAsync(byte[] payload) Restores libraries using their state returned byRFunctionAsync.dumpAsync()method.voidrestoreAndReplace(byte[] payload) Restores libraries using their state returned byRFunction.dump()method.restoreAndReplaceAsync(byte[] payload) Restores libraries using their state returned byRFunctionAsync.dumpAsync()method.restoreAsync(byte[] payload) Restores libraries using their state returned byRFunctionAsync.dumpAsync()method.stats()Returns information about currently running Redis function and available execution engines.Returns information about currently running Redis function and available execution engines.
-
Constructor Details
-
RedissonFuction
-
RedissonFuction
-
-
Method Details
-
delete
Description copied from interface:RFunctionDeletes library. Error is thrown if library doesn't exist. -
deleteAsync
Description copied from interface:RFunctionAsyncDeletes library. Error is thrown if library doesn't exist.- Specified by:
deleteAsyncin interfaceRFunctionAsync- Parameters:
libraryName- library name
-
dump
public byte[] dump()Description copied from interface:RFunctionReturns serialized state of all libraries. -
dumpAsync
Description copied from interface:RFunctionAsyncReturns serialized state of all libraries.- Specified by:
dumpAsyncin interfaceRFunctionAsync- Returns:
- serialized state
-
flush
public void flush()Description copied from interface:RFunctionDeletes all libraries. -
flushAsync
Description copied from interface:RFunctionAsyncDeletes all libraries.- Specified by:
flushAsyncin interfaceRFunctionAsync
-
kill
public void kill()Description copied from interface:RFunctionKills currently executed functions. Applied only to functions which don't modify data. -
killAsync
Description copied from interface:RFunctionAsyncKills currently executed functions. Applied only to functions which don't modify data.- Specified by:
killAsyncin interfaceRFunctionAsync
-
list
Description copied from interface:RFunctionReturns information about libraries and functions per each. -
listAsync
Description copied from interface:RFunctionAsyncReturns information about libraries and functions per each.- Specified by:
listAsyncin interfaceRFunctionAsync- Returns:
- list of libraries
-
list
Description copied from interface:RFunctionReturns 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
-
listAsync
Description copied from interface:RFunctionAsyncReturns 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
- Specified by:
listAsyncin interfaceRFunctionAsync- Parameters:
namePattern- name pattern- Returns:
- list of libraries
-
load
Description copied from interface:RFunctionLoads a library. Error is thrown if library already exists. -
loadAsync
Description copied from interface:RFunctionAsyncLoads a library. Error is thrown if library already exists.- Specified by:
loadAsyncin interfaceRFunctionAsync- Parameters:
libraryName- library namecode- function code
-
loadAndReplace
Description copied from interface:RFunctionLoads a library and overwrites existing library.- Specified by:
loadAndReplacein interfaceRFunction- Parameters:
libraryName- library namecode- function code
-
loadAndReplaceAsync
Description copied from interface:RFunctionAsyncLoads a library and overwrites existing library.- Specified by:
loadAndReplaceAsyncin interfaceRFunctionAsync- Parameters:
libraryName- library namecode- function code
-
restore
public void restore(byte[] payload) Description copied from interface:RFunctionRestores libraries using their state returned byRFunction.dump()method. Restored libraries are appended to the existing libraries and throws error in case of collision. -
restoreAsync
Description copied from interface:RFunctionAsyncRestores libraries using their state returned byRFunctionAsync.dumpAsync()method. Restored libraries are appended to the existing libraries and throws error in case of collision.- Specified by:
restoreAsyncin interfaceRFunctionAsync- Parameters:
payload- serialized state
-
restoreAndReplace
public void restoreAndReplace(byte[] payload) Description copied from interface:RFunctionRestores libraries using their state returned byRFunction.dump()method. Restored libraries are appended to the existing libraries.- Specified by:
restoreAndReplacein interfaceRFunction- Parameters:
payload- serialized state
-
restoreAndReplaceAsync
Description copied from interface:RFunctionAsyncRestores libraries using their state returned byRFunctionAsync.dumpAsync()method. Restored libraries are appended to the existing libraries.- Specified by:
restoreAndReplaceAsyncin interfaceRFunctionAsync- Parameters:
payload- serialized state
-
restoreAfterFlush
public void restoreAfterFlush(byte[] payload) Description copied from interface:RFunctionRestores libraries using their state returned byRFunction.dump()method. Deletes all existing libraries before restoring.- Specified by:
restoreAfterFlushin interfaceRFunction- Parameters:
payload- serialized state
-
restoreAfterFlushAsync
Description copied from interface:RFunctionAsyncRestores libraries using their state returned byRFunctionAsync.dumpAsync()method. Deletes all existing libraries before restoring.- Specified by:
restoreAfterFlushAsyncin interfaceRFunctionAsync- Parameters:
payload- serialized state
-
call
public <R> R call(String key, FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values) Description copied from interface:RFunctionExecutes function- Specified by:
callin interfaceRFunction- 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
public <R> R call(FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values) Description copied from interface:RFunctionExecutes function- Specified by:
callin interfaceRFunction- 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
Description copied from interface:RFunctionExecutes function -
stats
Description copied from interface:RFunctionReturns information about currently running Redis function and available execution engines. -
statsAsync
Description copied from interface:RFunctionAsyncReturns information about currently running Redis function and available execution engines.- Specified by:
statsAsyncin interfaceRFunctionAsync- Returns:
- function information
-
callAsync
public <R> RFuture<R> callAsync(String key, FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values) Description copied from interface:RFunctionAsyncExecutes function- Specified by:
callAsyncin interfaceRFunctionAsync- Type Parameters:
R- - type of result- Parameters:
key- - used to locate Redis node in Cluster which stores cached Lua scriptmode- - execution modename- - function namereturnType- - return typekeys- - keys available through KEYS param in scriptvalues- - values available through VALUES param in script- Returns:
- result object
-
callAsync
public <R> RFuture<R> callAsync(FunctionMode mode, String name, FunctionResult returnType, List<Object> keys, Object... values) Description copied from interface:RFunctionAsyncExecutes function- Specified by:
callAsyncin interfaceRFunctionAsync- 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
-
callAsync
Description copied from interface:RFunctionAsyncExecutes function- Specified by:
callAsyncin interfaceRFunctionAsync- Type Parameters:
R- - type of result- Parameters:
mode- - execution modename- - function namereturnType- - return type- Returns:
- result object
-