/** * Set the expiration for given {@code key} as a {@literal UNIX} timestamp. * * @param key must not be {@literal null}. * @param expireAt must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/pexpireat">Redis Documentation: PEXPIREAT</a> */ default Mono<Boolean> pExpireAt(ByteBuffer key, Instant expireAt) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(expireAt, "Expire at must not be null!"); return pExpireAt(Mono.just(new ExpireAtCommand(key, expireAt))).next().map(BooleanResponse::getOutput); }
@Override public Mono<Boolean> expireAt(K key, Instant expireAt) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(expireAt, "Expire at must not be null!"); if (expireAt.getNano() == 0) { return createMono(connection -> connection.keyCommands() // .expireAt(rawKey(key), expireAt)); } return createMono(connection -> connection.keyCommands().pExpireAt(rawKey(key), expireAt)); }
/** * Set the expiration for given {@code key} as a {@literal UNIX} timestamp. * * @param key must not be {@literal null}. * @param expireAt must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/pexpireat">Redis Documentation: PEXPIREAT</a> */ default Mono<Boolean> pExpireAt(ByteBuffer key, Instant expireAt) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(expireAt, "Expire at must not be null!"); return pExpireAt(Mono.just(new ExpireAtCommand(key, expireAt))).next().map(BooleanResponse::getOutput); }
/** * Set the expiration for given {@code key} as a {@literal UNIX} timestamp. * * @param key must not be {@literal null}. * @param expireAt must not be {@literal null}. * @return * @see <a href="http://redis.io/commands/pexpireat">Redis Documentation: PEXPIREAT</a> */ default Mono<Boolean> pExpireAt(ByteBuffer key, Instant expireAt) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(expireAt, "Expire at must not be null!"); return pExpireAt(Mono.just(new ExpireAtCommand(key, expireAt))).next().map(BooleanResponse::getOutput); }
@Override public Mono<Boolean> expireAt(K key, Instant expireAt) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(expireAt, "Expire at must not be null!"); if (expireAt.getNano() == 0) { return createMono(connection -> connection.keyCommands() // .expireAt(rawKey(key), expireAt)); } return createMono(connection -> connection.keyCommands().pExpireAt(rawKey(key), expireAt)); }
@Override public Mono<Boolean> expireAt(K key, Instant expireAt) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(expireAt, "Expire at must not be null!"); if (expireAt.getNano() == 0) { return createMono(connection -> connection.keyCommands() // .expireAt(rawKey(key), expireAt)); } return createMono(connection -> connection.keyCommands().pExpireAt(rawKey(key), expireAt)); }