Response response = null;
try {
response = JRedisPipeline.this.queueRequest(cmd, args).get(timeout, unit);
}
catch (InterruptedException e) {
throw new ClientRuntimeException("Interrupted!", e);
}
catch (TimeoutException e) {
throw new ClientRuntimeException("timedout waiting for response");
}
catch (ExecutionException e) {
Throwable cause = e.getCause();
if(cause instanceof RedisException)
throw (RedisException) cause;
else if(cause instanceof ProviderException)
throw (ProviderException) cause;
else if(cause instanceof ClientRuntimeException)
throw (ClientRuntimeException)cause;
else throw new ClientRuntimeException("Exception in pipeline exec of requested command", cause);
}
return response;
}
};
}