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
public class RedisExecutor<V,R> extends Object
- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description 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 Summary
-
-
-
Constructor Detail
-
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 Detail
-
execute
public void execute()
-
free
protected void free()
-
free
protected void free(Object[] params)
-
isResendAllowed
protected boolean isResendAllowed(int attempt, int attempts)
-
cause
protected Throwable cause(CompletableFuture<?> future)
-
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
protected void handleError(CompletableFuture<RedisConnection> connectionFuture, Throwable cause)
-
handleSuccess
protected void handleSuccess(CompletableFuture<R> promise, CompletableFuture<RedisConnection> connectionFuture, R res) throws ReflectiveOperationException
- Throws:
ReflectiveOperationException
-
sendCommand
protected void sendCommand(CompletableFuture<R> attemptPromise, RedisConnection connection)
-
releaseConnection
protected void releaseConnection(CompletableFuture<R> attemptPromise, CompletableFuture<RedisConnection> connectionFuture)
-
getRedisClient
public RedisClient getRedisClient()
-
getConnection
protected CompletableFuture<RedisConnection> getConnection()
-
getNow
protected <T> T getNow(CompletableFuture<T> future)
-
convertException
protected <T> RedisException convertException(CompletableFuture<T> future)
-
-