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, RPromise<R> mainPromise, boolean ignoreRedirect, ConnectionManager connectionManager, RedissonObjectBuilder objectBuilder, RedissonObjectBuilder.ReferenceType referenceType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkAttemptPromise(RPromise<R> attemptFuture, RFuture<RedisConnection> connectionFuture)
protected <T> RedisException
convertException(RFuture<T> future)
void
execute()
protected void
free()
protected void
free(Object[] params)
protected Codec
getCodec(Codec codec)
protected RFuture<RedisConnection>
getConnection()
RedisClient
getRedisClient()
protected void
handleError(RFuture<RedisConnection> connectionFuture, Throwable cause)
protected void
handleResult(RPromise<R> attemptPromise, RFuture<RedisConnection> connectionFuture)
protected void
handleSuccess(RPromise<R> promise, RFuture<RedisConnection> connectionFuture, R res)
protected boolean
isResendAllowed(int attempt, int attempts)
protected void
onException()
protected void
releaseConnection(RPromise<R> attemptPromise, RFuture<RedisConnection> connectionFuture)
protected void
sendCommand(RPromise<R> attemptPromise, RedisConnection connection)
-
-
-
Constructor Detail
-
RedisExecutor
public RedisExecutor(boolean readOnlyMode, NodeSource source, Codec codec, RedisCommand<V> command, Object[] params, RPromise<R> mainPromise, boolean ignoreRedirect, ConnectionManager connectionManager, RedissonObjectBuilder objectBuilder, RedissonObjectBuilder.ReferenceType referenceType)
-
-
Method Detail
-
execute
public void execute()
-
free
protected void free()
-
free
protected void free(Object[] params)
-
isResendAllowed
protected boolean isResendAllowed(int attempt, int attempts)
-
checkAttemptPromise
protected void checkAttemptPromise(RPromise<R> attemptFuture, RFuture<RedisConnection> connectionFuture)
-
handleResult
protected void handleResult(RPromise<R> attemptPromise, RFuture<RedisConnection> connectionFuture) throws ReflectiveOperationException
- Throws:
ReflectiveOperationException
-
onException
protected void onException()
-
handleError
protected void handleError(RFuture<RedisConnection> connectionFuture, Throwable cause)
-
handleSuccess
protected void handleSuccess(RPromise<R> promise, RFuture<RedisConnection> connectionFuture, R res) throws ReflectiveOperationException
- Throws:
ReflectiveOperationException
-
sendCommand
protected void sendCommand(RPromise<R> attemptPromise, RedisConnection connection)
-
releaseConnection
protected void releaseConnection(RPromise<R> attemptPromise, RFuture<RedisConnection> connectionFuture)
-
getRedisClient
public RedisClient getRedisClient()
-
getConnection
protected RFuture<RedisConnection> getConnection()
-
convertException
protected <T> RedisException convertException(RFuture<T> future)
-
-