/** * Applies the {@literal expireAt}. Constructs a new command instance with all previously configured properties. * * @param expireAt must not be {@literal null}. * @return a new {@link ExpireAtCommand} with {@literal expireAt} applied. */ public ExpireAtCommand timeout(Instant expireAt) { Assert.notNull(expireAt, "Expire at must not be null!"); return new ExpireAtCommand(getKey(), expireAt); }
@Override public Flux<BooleanResponse<ExpireAtCommand>> pExpireAt(Publisher<ExpireAtCommand> commands) { return connection.execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notNull(command.getKey(), "Key must not be null!"); Assert.notNull(command.getExpireAt(), "Expire at must not be null!"); return cmd.expireat(command.getKey(), command.getExpireAt().toEpochMilli()) .map(value -> new BooleanResponse<>(command, value)); })); }
@Override public Flux<BooleanResponse<ExpireAtCommand>> expireAt(Publisher<ExpireAtCommand> commands) { return connection.execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notNull(command.getKey(), "Key must not be null!"); Assert.notNull(command.getExpireAt(), "Expire at must not be null!"); return cmd.expireat(command.getKey(), command.getExpireAt().getEpochSecond()) .map(value -> new BooleanResponse<>(command, value)); })); }
/** * Applies the {@literal expireAt}. Constructs a new command instance with all previously configured properties. * * @param expireAt must not be {@literal null}. * @return a new {@link ExpireAtCommand} with {@literal expireAt} applied. */ public ExpireAtCommand timeout(Instant expireAt) { Assert.notNull(expireAt, "Expire at must not be null!"); return new ExpireAtCommand(getKey(), expireAt); }
@Override public Flux<BooleanResponse<ExpireAtCommand>> pExpireAt(Publisher<ExpireAtCommand> commands) { return connection.execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notNull(command.getKey(), "Key must not be null!"); Assert.notNull(command.getExpireAt(), "Expire at must not be null!"); return cmd.expireat(command.getKey(), command.getExpireAt().toEpochMilli()) .map(value -> new BooleanResponse<>(command, value)); })); }
@Override public Flux<BooleanResponse<ExpireAtCommand>> expireAt(Publisher<ExpireAtCommand> commands) { return connection.execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notNull(command.getKey(), "Key must not be null!"); Assert.notNull(command.getExpireAt(), "Expire at must not be null!"); return cmd.expireat(command.getKey(), command.getExpireAt().getEpochSecond()) .map(value -> new BooleanResponse<>(command, value)); })); }
@Override public Flux<BooleanResponse<ExpireAtCommand>> pExpireAt(Publisher<ExpireAtCommand> commands) { return connection.execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notNull(command.getKey(), "Key must not be null!"); Assert.notNull(command.getExpireAt(), "Expire at must not be null!"); return cmd.expireat(command.getKey(), command.getExpireAt().toEpochMilli()) .map(value -> new BooleanResponse<>(command, value)); })); }
@Override public Flux<BooleanResponse<ExpireAtCommand>> expireAt(Publisher<ExpireAtCommand> commands) { return connection.execute(cmd -> Flux.from(commands).concatMap(command -> { Assert.notNull(command.getKey(), "Key must not be null!"); Assert.notNull(command.getExpireAt(), "Expire at must not be null!"); return cmd.expireat(command.getKey(), command.getExpireAt().getEpochSecond()) .map(value -> new BooleanResponse<>(command, value)); })); }
/** * Applies the {@literal expireAt}. Constructs a new command instance with all previously configured properties. * * @param expireAt must not be {@literal null}. * @return a new {@link ExpireAtCommand} with {@literal expireAt} applied. */ public ExpireAtCommand timeout(Instant expireAt) { Assert.notNull(expireAt, "Expire at must not be null!"); return new ExpireAtCommand(getKey(), expireAt); }