class RedisReducedPropagationStorage implements ReducedPropagationStorage {

    @Override
    public Future<JsonObject> getQueueRequest(String queue) {
        Future<JsonObject> future = Future.future();

        if(StringUtils.isEmpty(queue)){
            future.fail("Queue is not allowed to be empty");
            return future;
        }

        redisClient.hget(QUEUE_REQUESTS, queue, reply -> {
            if(reply.failed()){
                String message = "get queue request '"+queue+"' from hash '" + QUEUE_REQUESTS+ "' resulted in cause " + logCause(reply);
                log.error(message);
                future.fail(message);
            } else {
                String resultStr = reply.result();
                if(StringUtils.isNotEmpty(resultStr)) {
                    try {
                        JsonObject queueRequest = new JsonObject(resultStr);
                        future.complete(queueRequest);
                    } catch (DecodeException ex) {
                        future.fail("Failed to decode queue request for queue '" + queue + "'. Got this from storage: " + resultStr);
                    }
                } else {
                    future.complete(null);
                }
            }

        });
        return future;
    }

    public  RedisReducedPropagationStorage(RedisClient redisClient);

}