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
ConstructorsConstructorDescriptionRedisExecutor(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, int retryAttempts, int retryInterval, int responseTimeout, boolean trackChanges) -
Method Summary
Modifier and TypeMethodDescriptionprotected final Throwablecause(CompletableFuture<?> future) protected voidcheckAttemptPromise(CompletableFuture<R> attemptFuture, CompletableFuture<RedisConnection> connectionFuture) voidexecute()protected voidfree()protected voidprotected final Codecprotected CompletableFuture<RedisConnection> getConnection(CompletableFuture<R> attemptPromise) protected final <T> TgetNow(CompletableFuture<T> future) protected voidhandleError(CompletableFuture<RedisConnection> connectionFuture, Throwable cause) protected voidhandleResult(CompletableFuture<R> attemptPromise, CompletableFuture<RedisConnection> connectionFuture) protected voidhandleSuccess(CompletableFuture<R> promise, CompletableFuture<RedisConnection> connectionFuture, R res) protected voidprotected voidreleaseConnection(CompletableFuture<R> attemptPromise, CompletableFuture<RedisConnection> connectionFuture) protected voidsendCommand(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, int retryAttempts, int retryInterval, int responseTimeout, boolean trackChanges)
-
-
Method Details
-
execute
public void execute() -
free
protected void free() -
free
-
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
-