Package org.redisson.command
Class RedisExecutor<V,R>
java.lang.Object
org.redisson.command.RedisExecutor<V,R>
- Type Parameters:
V
- type of valueR
- type of returned value
- Direct Known Subclasses:
BaseRedisBatchExecutor
,RedisCommonBatchExecutor
- Author:
- Nikita Koksharov
-
Constructor Summary
ConstructorDescriptionRedisExecutor
(boolean readOnlyMode, NodeSource source, Codec codec, RedisCommand<V> command, Object[] params, CompletableFuture<R> mainPromise, boolean ignoreRedirect, ConnectionManager connectionManager, RedissonObjectBuilder objectBuilder, RedissonObjectBuilder.ReferenceType referenceType, boolean noRetry) -
Method Summary
Modifier and TypeMethodDescriptionprotected Throwable
cause
(CompletableFuture<?> future) protected void
checkAttemptPromise
(CompletableFuture<R> attemptFuture, CompletableFuture<RedisConnection> connectionFuture) protected <T> RedisException
convertException
(CompletableFuture<T> future) void
execute()
protected void
free()
protected void
protected Codec
protected CompletableFuture<RedisConnection>
protected <T> T
getNow
(CompletableFuture<T> future) protected void
handleError
(CompletableFuture<RedisConnection> connectionFuture, Throwable cause) protected void
handleResult
(CompletableFuture<R> attemptPromise, CompletableFuture<RedisConnection> connectionFuture) protected void
handleSuccess
(CompletableFuture<R> promise, CompletableFuture<RedisConnection> connectionFuture, R res) protected boolean
isResendAllowed
(int attempt, int attempts) protected void
protected void
releaseConnection
(CompletableFuture<R> attemptPromise, CompletableFuture<RedisConnection> connectionFuture) protected void
sendCommand
(CompletableFuture<R> attemptPromise, RedisConnection connection)
-
Constructor Details
-
RedisExecutor
public RedisExecutor(boolean readOnlyMode, NodeSource source, Codec codec, RedisCommand<V> command, Object[] params, CompletableFuture<R> mainPromise, boolean ignoreRedirect, ConnectionManager connectionManager, RedissonObjectBuilder objectBuilder, RedissonObjectBuilder.ReferenceType referenceType, boolean noRetry)
-
-
Method Details
-
execute
public void execute() -
free
protected void free() -
free
-
isResendAllowed
protected boolean isResendAllowed(int attempt, int attempts) -
cause
-
checkAttemptPromise
protected void checkAttemptPromise(CompletableFuture<R> attemptFuture, CompletableFuture<RedisConnection> connectionFuture) -
handleResult
protected void handleResult(CompletableFuture<R> attemptPromise, CompletableFuture<RedisConnection> connectionFuture) throws ReflectiveOperationException - Throws:
ReflectiveOperationException
-
onException
protected void onException() -
handleError
-
handleSuccess
protected void handleSuccess(CompletableFuture<R> promise, CompletableFuture<RedisConnection> connectionFuture, R res) throws ReflectiveOperationException - Throws:
ReflectiveOperationException
-
sendCommand
-
releaseConnection
protected void releaseConnection(CompletableFuture<R> attemptPromise, CompletableFuture<RedisConnection> connectionFuture) -
getRedisClient
-
getConnection
-
getCodec
-
getNow
-
convertException
-