|
|
|
@ -32,13 +32,13 @@ import reactor.core.publisher.Mono;
|
|
|
|
|
public interface RExpirableReactive extends RObjectReactive {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set a timeout for object in mode. After the timeout has expired,
|
|
|
|
|
* the key will automatically be deleted.
|
|
|
|
|
* Use {@link #expire(Duration)} instead
|
|
|
|
|
*
|
|
|
|
|
* @param timeToLive - timeout before object will be deleted
|
|
|
|
|
* @param timeUnit - timeout time unit
|
|
|
|
|
* @return <code>true</code> if the timeout was set and <code>false</code> if not
|
|
|
|
|
*/
|
|
|
|
|
@Deprecated
|
|
|
|
|
Mono<Boolean> expire(long timeToLive, TimeUnit timeUnit);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -112,6 +112,15 @@ public interface RExpirableReactive extends RObjectReactive {
|
|
|
|
|
*/
|
|
|
|
|
Mono<Boolean> expireIfLess(Instant time);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets a timeout for this object. After the timeout has expired,
|
|
|
|
|
* the key will automatically be deleted.
|
|
|
|
|
*
|
|
|
|
|
* @param duration timeout before object will be deleted
|
|
|
|
|
* @return <code>true</code> if the timeout was set and <code>false</code> if not
|
|
|
|
|
*/
|
|
|
|
|
Mono<Boolean> expire(Duration duration);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets a timeout for this object only if it has been already set.
|
|
|
|
|
* After the timeout has expired, the key will automatically be deleted.
|
|
|
|
|