refactoring

pull/4162/head
Nikita Koksharov 3 years ago
parent 658cc3e140
commit 6d4cc4dd2f

@ -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.

@ -32,13 +32,13 @@ import io.reactivex.rxjava3.core.Single;
public interface RExpirableRx extends RObjectRx {
/**
* 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
Single<Boolean> expire(long timeToLive, TimeUnit timeUnit);
/**
@ -112,6 +112,15 @@ public interface RExpirableRx extends RObjectRx {
*/
Single<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
*/
Single<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.

Loading…
Cancel
Save