api/java/src/main/java/com/navercorp/redis/cluster/gateway/GatewayClient.java
public <T> T execute(RedisClusterCallback<T> action) {
        GatewayException exception = null;
        for (int i = 0; i <= this.maxRetry; i++) {
            try {
                return executeCallback(action, i);
            } catch (GatewayException e) {
                if (!e.isRetryable()) {
                    throw e;
                } else {
                    exception = e;
                    if (i < this.maxRetry) {
                        log.warn(
                                "[GatewayClient] Failed to action. auto retrying ... " + (i + 1) + "/" + this.maxRetry, e);
                    }
                }
            }
        }

        throw exception;
    }
public <T> T execute(RedisClusterCallback<T> action) {
        GatewayException exception = null;
        for (int i = 0; i <= this.maxRetry; i++) {
            try {
                return executeCallback(action, i);
            } catch (GatewayException e) {
                if (!e.isRetryable()) {
                    throw e;
                } else {
                    exception = e;
                    if (i < this.maxRetry) {
                        log.warn(
                                "[GatewayClient] Failed to action. auto retrying ... " + (i + 1) + "/" + this.maxRetry, e);
                    }
                }
            }
        }

        throw exception;
    }
public < T > T execute ( RedisClusterCallback < T > action ) { GatewayException exception = null ; for ( int i = 0 ; i <= this . maxRetry ; i ++ ) { try { return executeCallback ( action , i ) ; } catch ( GatewayException e ) { if ( ! e . isRetryable ( ) ) { throw e ; } else { exception = e ; if ( i < this . maxRetry ) { log . warn ( "[GatewayClient] Failed to action. auto retrying ... " + ( i + 1 ) + "/" + this . maxRetry , e ) ; } } } } throw exception ; }
execute to action(redis in command)

@param <T>    the generic type
@param action {@link RedisClusterCallback}
@return object returned by the action
execute to action ( redis in command )