Package org.redisson.command
Class RedisQueuedBatchExecutor<V,R>
java.lang.Object
org.redisson.command.RedisExecutor<V,R>
org.redisson.command.BaseRedisBatchExecutor<V,R>
org.redisson.command.RedisQueuedBatchExecutor<V,R>
- Type Parameters:
V
- type of valueR
- type of returned value
- Author:
- Nikita Koksharov
-
Constructor Summary
ConstructorDescriptionRedisQueuedBatchExecutor
(boolean readOnlyMode, NodeSource source, Codec codec, RedisCommand<V> command, Object[] params, CompletableFuture<R> mainPromise, boolean ignoreRedirect, ConnectionManager connectionManager, RedissonObjectBuilder objectBuilder, ConcurrentMap<NodeSource, CommandBatchService.Entry> commands, ConcurrentMap<MasterSlaveEntry, CommandBatchService.ConnectionEntry> connections, BatchOptions options, AtomicInteger index, AtomicBoolean executed, RedissonObjectBuilder.ReferenceType referenceType, boolean noRetry, Map<MasterSlaveEntry, CommandBatchService.Entry> aggregatedCommands) -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
protected CompletableFuture
<RedisConnection> getConnection
(CompletableFuture<R> attemptPromise) protected void
handleError
(CompletableFuture<RedisConnection> connectionFuture, Throwable cause) protected void
handleSuccess
(CompletableFuture<R> promise, CompletableFuture<RedisConnection> connectionFuture, R res) protected void
releaseConnection
(CompletableFuture<R> attemptPromise, CompletableFuture<RedisConnection> connectionFuture) protected void
sendCommand
(CompletableFuture<R> attemptPromise, RedisConnection connection) Methods inherited from class org.redisson.command.BaseRedisBatchExecutor
addBatchCommandData
Methods inherited from class org.redisson.command.RedisExecutor
cause, checkAttemptPromise, free, free, getCodec, getNow, getRedisClient, handleResult, onException
-
Constructor Details
-
RedisQueuedBatchExecutor
public RedisQueuedBatchExecutor(boolean readOnlyMode, NodeSource source, Codec codec, RedisCommand<V> command, Object[] params, CompletableFuture<R> mainPromise, boolean ignoreRedirect, ConnectionManager connectionManager, RedissonObjectBuilder objectBuilder, ConcurrentMap<NodeSource, CommandBatchService.Entry> commands, ConcurrentMap<MasterSlaveEntry, CommandBatchService.ConnectionEntry> connections, BatchOptions options, AtomicInteger index, AtomicBoolean executed, RedissonObjectBuilder.ReferenceType referenceType, boolean noRetry, Map<MasterSlaveEntry, CommandBatchService.Entry> aggregatedCommands)
-
-
Method Details
-
execute
public void execute()- Overrides:
execute
in classRedisExecutor<V,
R>
-
releaseConnection
protected void releaseConnection(CompletableFuture<R> attemptPromise, CompletableFuture<RedisConnection> connectionFuture) - Overrides:
releaseConnection
in classRedisExecutor<V,
R>
-
handleSuccess
protected void handleSuccess(CompletableFuture<R> promise, CompletableFuture<RedisConnection> connectionFuture, R res) throws ReflectiveOperationException - Overrides:
handleSuccess
in classRedisExecutor<V,
R> - Throws:
ReflectiveOperationException
-
handleError
- Overrides:
handleError
in classRedisExecutor<V,
R>
-
sendCommand
- Overrides:
sendCommand
in classRedisExecutor<V,
R>
-
getConnection
- Overrides:
getConnection
in classRedisExecutor<V,
R>
-