refactoring

pull/3417/head
Nikita Koksharov 4 years ago
parent d0069e7add
commit e6b8ceb8b3

@ -60,16 +60,16 @@ abstract class RedissonExpirable extends RedissonObject implements RExpirable {
@Override
public RFuture<Boolean> expireAtAsync(long timestamp) {
return expireAtAsync(Instant.ofEpochMilli(timestamp));
return expireAsync(Instant.ofEpochMilli(timestamp));
}
@Override
public boolean expire(Instant instant) {
return get(expireAtAsync(instant));
return get(expireAsync(instant));
}
@Override
public RFuture<Boolean> expireAtAsync(Instant instant) {
public RFuture<Boolean> expireAsync(Instant instant) {
return commandExecutor.writeAsync(getName(), StringCodec.INSTANCE, RedisCommands.PEXPIREAT, getName(), instant.toEpochMilli());
}

@ -39,7 +39,7 @@ public interface RExpirableAsync extends RObjectAsync {
RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit);
/**
* Use {@link #expireAtAsync(Instant)} instead
* Use {@link #expireAsync(Instant)} instead
*
* @param timestamp - expire date
* @return <code>true</code> if the timeout was set and <code>false</code> if not
@ -48,7 +48,7 @@ public interface RExpirableAsync extends RObjectAsync {
RFuture<Boolean> expireAtAsync(Date timestamp);
/**
* Use {@link #expireAtAsync(Instant)} instead
* Use {@link #expireAsync(Instant)} instead
*
* @param timestamp - expire date in milliseconds (Unix timestamp)
* @return <code>true</code> if the timeout was set and <code>false</code> if not
@ -63,7 +63,7 @@ public interface RExpirableAsync extends RObjectAsync {
* @param instant - expire date
* @return <code>true</code> if the timeout was set and <code>false</code> if not
*/
RFuture<Boolean> expireAtAsync(Instant instant);
RFuture<Boolean> expireAsync(Instant instant);
/**
* Clear an expire timeout or expire date for object in async mode.

@ -83,7 +83,7 @@ public class RedissonTransactionalBucket<V> extends RedissonBucket<V> {
}
@Override
public RFuture<Boolean> expireAtAsync(Instant timestamp) {
public RFuture<Boolean> expireAsync(Instant timestamp) {
throw new UnsupportedOperationException("expire method is not supported in transaction");
}

@ -90,7 +90,7 @@ public class RedissonTransactionalMap<K, V> extends RedissonMap<K, V> {
}
@Override
public RFuture<Boolean> expireAtAsync(Instant timestamp) {
public RFuture<Boolean> expireAsync(Instant timestamp) {
throw new UnsupportedOperationException("expire method is not supported in transaction");
}

@ -82,7 +82,7 @@ public class RedissonTransactionalMapCache<K, V> extends RedissonMapCache<K, V>
}
@Override
public RFuture<Boolean> expireAtAsync(Instant timestamp) {
public RFuture<Boolean> expireAsync(Instant timestamp) {
throw new UnsupportedOperationException("expire method is not supported in transaction");
}

@ -81,7 +81,7 @@ public class RedissonTransactionalSet<V> extends RedissonSet<V> {
}
@Override
public RFuture<Boolean> expireAtAsync(Instant timestamp) {
public RFuture<Boolean> expireAsync(Instant timestamp) {
throw new UnsupportedOperationException("expire method is not supported in transaction");
}

@ -71,7 +71,7 @@ public class RedissonTransactionalSetCache<V> extends RedissonSetCache<V> {
}
@Override
public RFuture<Boolean> expireAtAsync(Instant timestamp) {
public RFuture<Boolean> expireAsync(Instant timestamp) {
throw new UnsupportedOperationException("expire method is not supported in transaction");
}

Loading…
Cancel
Save