class RedisBasedLock implements Lock {

    @Override
    public Future<Boolean> acquireLock(String lock, String token, long lockExpiryMs) {
        Future<Boolean> future = Future.future();
        redisClient.setWithOptions(buildLockKey(lock), token, new SetOptions().setNX(true).setPX(lockExpiryMs), event -> {
            if(event.succeeded()){
                future.complete("OK".equalsIgnoreCase(event.result()));
            } else {
                future.fail(event.cause().getMessage());
            }
        });
        return future;
    }

    public  RedisBasedLock(RedisClient redisClient);

}