/** * Get the time to live for {@code key} in seconds. * * @param key must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/ttl">Redis Documentation: TTL</a> */ default Mono<Long> ttl(ByteBuffer key) { Assert.notNull(key, "Key must not be null!"); return ttl(Mono.just(new KeyCommand(key))).next().map(NumericResponse::getOutput); }
/** * Get the time to live for {@code key} in seconds. * * @param key must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/ttl">Redis Documentation: TTL</a> */ default Mono<Long> ttl(ByteBuffer key) { Assert.notNull(key, "Key must not be null!"); return ttl(Mono.just(new KeyCommand(key))).next().map(NumericResponse::getOutput); }
/** * Get the time to live for {@code key} in seconds. * * @param key must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/ttl">Redis Documentation: TTL</a> */ default Mono<Long> ttl(ByteBuffer key) { Assert.notNull(key, "Key must not be null!"); return ttl(Mono.just(new KeyCommand(key))).next().map(NumericResponse::getOutput); }