Package org.redisson.command
Class CommandAsyncService
- java.lang.Object
-
- org.redisson.command.CommandAsyncService
-
- All Implemented Interfaces:
CommandAsyncExecutor
- Direct Known Subclasses:
CommandBatchService
,CommandReactiveService
,CommandRxService
,CommandSyncService
public class CommandAsyncService extends Object implements CommandAsyncExecutor
- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description CommandAsyncService(ConnectionManager connectionManager, RedissonObjectBuilder objectBuilder, RedissonObjectBuilder.ReferenceType referenceType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V,R>
voidasync(boolean readOnlyMode, NodeSource source, Codec codec, RedisCommand<V> command, Object[] params, RPromise<R> mainPromise, boolean ignoreRedirect, boolean noRetry)
<V> RedisException
convertException(RFuture<V> future)
protected <R> RPromise<R>
createPromise()
io.netty.buffer.ByteBuf
encode(Codec codec, Object value)
io.netty.buffer.ByteBuf
encodeMapKey(Codec codec, Object value)
io.netty.buffer.ByteBuf
encodeMapValue(Codec codec, Object value)
<T,R>
RFuture<R>evalAllAsync(boolean readOnlyMode, RedisCommand<T> command, SlotCallback<T,R> callback, String script, List<Object> keys, Object... params)
<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>evalWriteAllAsync(RedisCommand<T> command, SlotCallback<T,R> callback, 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)
<V> V
get(RFuture<V> future)
ConnectionManager
getConnectionManager()
<V> V
getInterrupted(RFuture<V> future)
RedissonObjectBuilder
getObjectBuilder()
protected boolean
isEvalCacheActive()
<V> RFuture<V>
pollFromAnyAsync(String name, Codec codec, RedisCommand<Object> command, long secondsTimeout, String... queueNames)
<T,R>
RFuture<Collection<R>>readAllAsync(Collection<R> results, Codec codec, RedisCommand<T> command, Object... params)
<T,R>
RFuture<Collection<R>>readAllAsync(Codec codec, RedisCommand<T> command, Object... params)
<T,R>
RFuture<Collection<R>>readAllAsync(RedisCommand<T> command, Object... params)
<R,T>
RFuture<R>readAllAsync(RedisCommand<T> command, SlotCallback<T,R> callback, 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
syncSubscription(RFuture<?> future)
void
syncSubscriptionInterrupted(RFuture<?> future)
<R,T>
RFuture<R>writeAllAsync(Codec codec, RedisCommand<T> command, SlotCallback<T,R> callback, Object... params)
<T> RFuture<Void>
writeAllAsync(RedisCommand<T> command, Object... params)
<R,T>
RFuture<R>writeAllAsync(RedisCommand<T> command, SlotCallback<T,R> callback, 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 Detail
-
CommandAsyncService
public CommandAsyncService(ConnectionManager connectionManager, RedissonObjectBuilder objectBuilder, RedissonObjectBuilder.ReferenceType referenceType)
-
-
Method Detail
-
getConnectionManager
public ConnectionManager getConnectionManager()
- Specified by:
getConnectionManager
in interfaceCommandAsyncExecutor
-
syncSubscription
public void syncSubscription(RFuture<?> future)
- Specified by:
syncSubscription
in interfaceCommandAsyncExecutor
-
syncSubscriptionInterrupted
public void syncSubscriptionInterrupted(RFuture<?> future) throws InterruptedException
- Specified by:
syncSubscriptionInterrupted
in interfaceCommandAsyncExecutor
- Throws:
InterruptedException
-
get
public <V> V get(RFuture<V> future)
- Specified by:
get
in interfaceCommandAsyncExecutor
-
getInterrupted
public <V> V getInterrupted(RFuture<V> future) throws InterruptedException
- Specified by:
getInterrupted
in interfaceCommandAsyncExecutor
- Throws:
InterruptedException
-
createPromise
protected <R> RPromise<R> 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
-
readAllAsync
public <T,R> RFuture<Collection<R>> readAllAsync(Codec codec, RedisCommand<T> command, Object... params)
- Specified by:
readAllAsync
in interfaceCommandAsyncExecutor
-
readAllAsync
public <T,R> RFuture<Collection<R>> readAllAsync(RedisCommand<T> command, Object... params)
- Specified by:
readAllAsync
in interfaceCommandAsyncExecutor
-
readAllAsync
public <T,R> RFuture<Collection<R>> readAllAsync(Collection<R> results, Codec codec, RedisCommand<T> command, Object... params)
- Specified by:
readAllAsync
in interfaceCommandAsyncExecutor
-
readRandomAsync
public <T,R> RFuture<R> readRandomAsync(Codec codec, RedisCommand<T> command, Object... params)
- 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
-
writeAllAsync
public <T> RFuture<Void> writeAllAsync(RedisCommand<T> command, Object... params)
- Specified by:
writeAllAsync
in interfaceCommandAsyncExecutor
-
writeAllAsync
public <R,T> RFuture<R> writeAllAsync(RedisCommand<T> command, SlotCallback<T,R> callback, Object... params)
- Specified by:
writeAllAsync
in interfaceCommandAsyncExecutor
-
writeAllAsync
public <R,T> RFuture<R> writeAllAsync(Codec codec, RedisCommand<T> command, SlotCallback<T,R> callback, Object... params)
- Specified by:
writeAllAsync
in interfaceCommandAsyncExecutor
-
readAllAsync
public <R,T> RFuture<R> readAllAsync(RedisCommand<T> command, SlotCallback<T,R> callback, Object... params)
- Specified by:
readAllAsync
in interfaceCommandAsyncExecutor
-
convertException
public <V> RedisException convertException(RFuture<V> future)
- 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
public <T,R> RFuture<R> readAsync(String key, RedisCommand<T> command, Object... params)
- 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
-
evalWriteAllAsync
public <T,R> RFuture<R> evalWriteAllAsync(RedisCommand<T> command, SlotCallback<T,R> callback, String script, List<Object> keys, Object... params)
- Specified by:
evalWriteAllAsync
in interfaceCommandAsyncExecutor
-
evalAllAsync
public <T,R> RFuture<R> evalAllAsync(boolean readOnlyMode, RedisCommand<T> command, SlotCallback<T,R> callback, String script, List<Object> keys, Object... params)
-
isEvalCacheActive
protected boolean isEvalCacheActive()
-
writeAsync
public <T,R> RFuture<R> writeAsync(String key, RedisCommand<T> command, Object... params)
- 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> void async(boolean readOnlyMode, NodeSource source, Codec codec, RedisCommand<V> command, Object[] params, RPromise<R> mainPromise, boolean ignoreRedirect, boolean noRetry)
-
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
public RedissonObjectBuilder getObjectBuilder()
- Specified by:
getObjectBuilder
in interfaceCommandAsyncExecutor
-
encode
public io.netty.buffer.ByteBuf encode(Codec codec, Object value)
- Specified by:
encode
in interfaceCommandAsyncExecutor
-
encodeMapKey
public io.netty.buffer.ByteBuf encodeMapKey(Codec codec, Object value)
- Specified by:
encodeMapKey
in interfaceCommandAsyncExecutor
-
encodeMapValue
public io.netty.buffer.ByteBuf encodeMapValue(Codec codec, Object value)
- Specified by:
encodeMapValue
in interfaceCommandAsyncExecutor
-
pollFromAnyAsync
public <V> RFuture<V> pollFromAnyAsync(String name, Codec codec, RedisCommand<Object> command, long secondsTimeout, String... queueNames)
- Specified by:
pollFromAnyAsync
in interfaceCommandAsyncExecutor
-
-