Package org.redisson.command
Class CommandAsyncService
java.lang.Object
org.redisson.command.CommandAsyncService
- All Implemented Interfaces:
CommandAsyncExecutor
- Direct Known Subclasses:
CommandBatchService
,CommandReactiveService
,CommandRxService
- Author:
- Nikita Koksharov
-
Constructor Summary
ConstructorDescriptionCommandAsyncService
(ConnectionManager connectionManager, RedissonObjectBuilder objectBuilder, RedissonObjectBuilder.ReferenceType referenceType) -
Method Summary
Modifier and TypeMethodDescription<V,
R> RFuture<R> async
(boolean readOnlyMode, NodeSource source, Codec codec, RedisCommand<V> command, Object[] params, boolean ignoreRedirect, boolean noRetry) protected CommandBatchService
createCommandBatchService
(int availableSlaves) protected <R> CompletableFuture<R>
io.netty.buffer.ByteBuf
io.netty.buffer.ByteBuf
encodeMapKey
(Codec codec, Object value) io.netty.buffer.ByteBuf
encodeMapValue
(Codec codec, Object value) <T,
R> RFuture<R> evalReadAsync
(String key, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) <T,
R> RFuture<R> evalReadAsync
(RedisClient client, String name, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) <T,
R> RFuture<R> evalReadAsync
(MasterSlaveEntry entry, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) <T,
R> RFuture<R> evalWriteAsync
(String key, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) <T,
R> RFuture<R> evalWriteAsync
(MasterSlaveEntry entry, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) <T,
R> RFuture<R> evalWriteNoRetryAsync
(String key, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) <R> List<CompletableFuture<R>>
executeAllAsync
(RedisCommand<?> command, Object... params) <R> List<CompletableFuture<R>>
executeAllAsync
(MasterSlaveEntry entry, RedisCommand<?> command, Object... params) <V> V
get
(CompletableFuture<V> future) <V> V
<V> V
getInterrupted
(CompletableFuture<V> future) <V> V
getInterrupted
(RFuture<V> future) <V> V
getNow
(CompletableFuture<V> future) <T> CompletionStage<T>
handleNoSync
(CompletionStage<T> stage, Supplier<CompletionStage<?>> supplier) protected boolean
boolean
<V> RFuture<V>
pollFromAnyAsync
(String name, Codec codec, RedisCommand<?> command, long secondsTimeout, String... queueNames) <R> List<CompletableFuture<R>>
readAllAsync
(Codec codec, RedisCommand<?> command, Object... params) <R> List<CompletableFuture<R>>
readAllAsync
(RedisCommand<?> command, Object... params) <T,
R> RFuture<R> readAsync
(byte[] key, Codec codec, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> readAsync
(String key, Codec codec, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> readAsync
(String key, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> readAsync
(RedisClient client, byte[] key, Codec codec, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> readAsync
(RedisClient client, String name, Codec codec, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> readAsync
(RedisClient client, Codec codec, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> readAsync
(RedisClient client, MasterSlaveEntry entry, Codec codec, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> readAsync
(MasterSlaveEntry entry, Codec codec, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> readBatchedAsync
(Codec codec, RedisCommand<T> command, SlotCallback<T, R> callback, String... keys) <T,
R> RFuture<R> readRandomAsync
(Codec codec, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> readRandomAsync
(MasterSlaveEntry entry, Codec codec, RedisCommand<T> command, Object... params) void
setEvalShaROSupported
(boolean value) <T> RFuture<T>
syncedEval
(String key, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) <T> RFuture<T>
syncedEvalWithRetry
(String key, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) <V> void
transfer
(CompletionStage<V> future1, CompletableFuture<V> future2) <R> List<CompletableFuture<R>>
writeAllAsync
(RedisCommand<?> command, Object... params) writeAllVoidAsync
(RedisCommand<T> command, Object... params) <T,
R> RFuture<R> writeAsync
(byte[] key, Codec codec, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> writeAsync
(String key, Codec codec, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> writeAsync
(String key, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> writeAsync
(RedisClient client, Codec codec, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> writeAsync
(MasterSlaveEntry entry, Codec codec, RedisCommand<T> command, Object... params) <T,
R> RFuture<R> writeBatchedAsync
(Codec codec, RedisCommand<T> command, SlotCallback<T, R> callback, String... keys)
-
Constructor Details
-
CommandAsyncService
public CommandAsyncService(ConnectionManager connectionManager, RedissonObjectBuilder objectBuilder, RedissonObjectBuilder.ReferenceType referenceType)
-
-
Method Details
-
getConnectionManager
- Specified by:
getConnectionManager
in interfaceCommandAsyncExecutor
-
getNow
- Specified by:
getNow
in interfaceCommandAsyncExecutor
-
transfer
- Specified by:
transfer
in interfaceCommandAsyncExecutor
-
get
- Specified by:
get
in interfaceCommandAsyncExecutor
-
get
- Specified by:
get
in interfaceCommandAsyncExecutor
-
getInterrupted
- Specified by:
getInterrupted
in interfaceCommandAsyncExecutor
- Throws:
InterruptedException
-
getInterrupted
- Specified by:
getInterrupted
in interfaceCommandAsyncExecutor
- Throws:
InterruptedException
-
createPromise
-
readAsync
public <T,R> RFuture<R> readAsync(RedisClient client, MasterSlaveEntry entry, Codec codec, RedisCommand<T> command, Object... params) - Specified by:
readAsync
in interfaceCommandAsyncExecutor
-
readAsync
public <T,R> RFuture<R> readAsync(RedisClient client, String name, Codec codec, RedisCommand<T> command, Object... params) - Specified by:
readAsync
in interfaceCommandAsyncExecutor
-
readAsync
public <T,R> RFuture<R> readAsync(RedisClient client, byte[] key, Codec codec, RedisCommand<T> command, Object... params) - Specified by:
readAsync
in interfaceCommandAsyncExecutor
-
readAsync
public <T,R> RFuture<R> readAsync(RedisClient client, Codec codec, RedisCommand<T> command, Object... params) - Specified by:
readAsync
in interfaceCommandAsyncExecutor
-
readRandomAsync
- Specified by:
readRandomAsync
in interfaceCommandAsyncExecutor
-
readRandomAsync
public <T,R> RFuture<R> readRandomAsync(MasterSlaveEntry entry, Codec codec, RedisCommand<T> command, Object... params) - Specified by:
readRandomAsync
in interfaceCommandAsyncExecutor
-
writeAllVoidAsync
- Specified by:
writeAllVoidAsync
in interfaceCommandAsyncExecutor
-
writeAllAsync
- Specified by:
writeAllAsync
in interfaceCommandAsyncExecutor
-
readAllAsync
public <R> List<CompletableFuture<R>> readAllAsync(Codec codec, RedisCommand<?> command, Object... params) - Specified by:
readAllAsync
in interfaceCommandAsyncExecutor
-
readAllAsync
- Specified by:
readAllAsync
in interfaceCommandAsyncExecutor
-
executeAllAsync
public <R> List<CompletableFuture<R>> executeAllAsync(MasterSlaveEntry entry, RedisCommand<?> command, Object... params) - Specified by:
executeAllAsync
in interfaceCommandAsyncExecutor
-
executeAllAsync
- Specified by:
executeAllAsync
in interfaceCommandAsyncExecutor
-
convertException
- Specified by:
convertException
in interfaceCommandAsyncExecutor
-
readAsync
public <T,R> RFuture<R> readAsync(String key, Codec codec, RedisCommand<T> command, Object... params) - Specified by:
readAsync
in interfaceCommandAsyncExecutor
-
readAsync
public <T,R> RFuture<R> readAsync(byte[] key, Codec codec, RedisCommand<T> command, Object... params) - Specified by:
readAsync
in interfaceCommandAsyncExecutor
-
readAsync
public <T,R> RFuture<R> readAsync(MasterSlaveEntry entry, Codec codec, RedisCommand<T> command, Object... params) - Specified by:
readAsync
in interfaceCommandAsyncExecutor
-
writeAsync
public <T,R> RFuture<R> writeAsync(RedisClient client, Codec codec, RedisCommand<T> command, Object... params) - Specified by:
writeAsync
in interfaceCommandAsyncExecutor
-
writeAsync
public <T,R> RFuture<R> writeAsync(MasterSlaveEntry entry, Codec codec, RedisCommand<T> command, Object... params) - Specified by:
writeAsync
in interfaceCommandAsyncExecutor
-
readAsync
- Specified by:
readAsync
in interfaceCommandAsyncExecutor
-
evalReadAsync
public <T,R> RFuture<R> evalReadAsync(String key, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) - Specified by:
evalReadAsync
in interfaceCommandAsyncExecutor
-
evalReadAsync
public <T,R> RFuture<R> evalReadAsync(MasterSlaveEntry entry, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) - Specified by:
evalReadAsync
in interfaceCommandAsyncExecutor
-
evalReadAsync
public <T,R> RFuture<R> evalReadAsync(RedisClient client, String name, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) - Specified by:
evalReadAsync
in interfaceCommandAsyncExecutor
-
evalWriteAsync
public <T,R> RFuture<R> evalWriteAsync(String key, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) - Specified by:
evalWriteAsync
in interfaceCommandAsyncExecutor
-
evalWriteNoRetryAsync
public <T,R> RFuture<R> evalWriteNoRetryAsync(String key, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) - Specified by:
evalWriteNoRetryAsync
in interfaceCommandAsyncExecutor
-
evalWriteAsync
public <T,R> RFuture<R> evalWriteAsync(MasterSlaveEntry entry, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) - Specified by:
evalWriteAsync
in interfaceCommandAsyncExecutor
-
isEvalCacheActive
protected boolean isEvalCacheActive() -
isEvalShaROSupported
public boolean isEvalShaROSupported()- Specified by:
isEvalShaROSupported
in interfaceCommandAsyncExecutor
-
setEvalShaROSupported
public void setEvalShaROSupported(boolean value) - Specified by:
setEvalShaROSupported
in interfaceCommandAsyncExecutor
-
writeAsync
- Specified by:
writeAsync
in interfaceCommandAsyncExecutor
-
writeAsync
public <T,R> RFuture<R> writeAsync(String key, Codec codec, RedisCommand<T> command, Object... params) - Specified by:
writeAsync
in interfaceCommandAsyncExecutor
-
writeAsync
public <T,R> RFuture<R> writeAsync(byte[] key, Codec codec, RedisCommand<T> command, Object... params) - Specified by:
writeAsync
in interfaceCommandAsyncExecutor
-
async
public <V,R> RFuture<R> async(boolean readOnlyMode, NodeSource source, Codec codec, RedisCommand<V> command, Object[] params, boolean ignoreRedirect, boolean noRetry) - Specified by:
async
in interfaceCommandAsyncExecutor
-
readBatchedAsync
public <T,R> RFuture<R> readBatchedAsync(Codec codec, RedisCommand<T> command, SlotCallback<T, R> callback, String... keys) - Specified by:
readBatchedAsync
in interfaceCommandAsyncExecutor
-
writeBatchedAsync
public <T,R> RFuture<R> writeBatchedAsync(Codec codec, RedisCommand<T> command, SlotCallback<T, R> callback, String... keys) - Specified by:
writeBatchedAsync
in interfaceCommandAsyncExecutor
-
getObjectBuilder
- Specified by:
getObjectBuilder
in interfaceCommandAsyncExecutor
-
getServiceManager
- Specified by:
getServiceManager
in interfaceCommandAsyncExecutor
-
encode
- Specified by:
encode
in interfaceCommandAsyncExecutor
-
encodeMapKey
- Specified by:
encodeMapKey
in interfaceCommandAsyncExecutor
-
encodeMapValue
- Specified by:
encodeMapValue
in interfaceCommandAsyncExecutor
-
pollFromAnyAsync
public <V> RFuture<V> pollFromAnyAsync(String name, Codec codec, RedisCommand<?> command, long secondsTimeout, String... queueNames) - Specified by:
pollFromAnyAsync
in interfaceCommandAsyncExecutor
-
handleNoSync
public <T> CompletionStage<T> handleNoSync(CompletionStage<T> stage, Supplier<CompletionStage<?>> supplier) - Specified by:
handleNoSync
in interfaceCommandAsyncExecutor
-
syncedEvalWithRetry
public <T> RFuture<T> syncedEvalWithRetry(String key, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) - Specified by:
syncedEvalWithRetry
in interfaceCommandAsyncExecutor
-
syncedEval
public <T> RFuture<T> syncedEval(String key, Codec codec, RedisCommand<T> evalCommandType, String script, List<Object> keys, Object... params) - Specified by:
syncedEval
in interfaceCommandAsyncExecutor
-
createCommandBatchService
-