refactoring

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

@ -64,7 +64,7 @@ abstract class RedissonExpirable extends RedissonObject implements RExpirable {
}
@Override
public boolean expireAt(Instant instant) {
public boolean expire(Instant instant) {
return get(expireAtAsync(instant));
}

@ -39,7 +39,7 @@ public interface RExpirable extends RObject, RExpirableAsync {
boolean expire(long timeToLive, TimeUnit timeUnit);
/**
* Use {@link #expireAt(Instant)} instead
* Use {@link #expire(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
@ -48,7 +48,7 @@ public interface RExpirable extends RObject, RExpirableAsync {
boolean expireAt(long timestamp);
/**
* Use {@link #expireAt(Instant)} instead
* Use {@link #expire(Instant)} instead
*
* @param timestamp - expire date
* @return <code>true</code> if the timeout was set and <code>false</code> if not
@ -63,7 +63,7 @@ public interface RExpirable extends RObject, RExpirableAsync {
* @param instant - expire date
* @return <code>true</code> if the timeout was set and <code>false</code> if not
*/
boolean expireAt(Instant instant);
boolean expire(Instant instant);
/**
* Clear an expire timeout or expire date for object.

@ -33,15 +33,15 @@ public class BaseTransactionalObject {
}
public RFuture<Boolean> expireAtAsync(Date timestamp) {
throw new UnsupportedOperationException("expireAt method is not supported in transaction");
throw new UnsupportedOperationException("expire method is not supported in transaction");
}
public RFuture<Boolean> expireAtAsync(Instant timestamp) {
throw new UnsupportedOperationException("expireAt method is not supported in transaction");
throw new UnsupportedOperationException("expire method is not supported in transaction");
}
public RFuture<Boolean> expireAtAsync(long timestamp) {
throw new UnsupportedOperationException("expireAt method is not supported in transaction");
throw new UnsupportedOperationException("expire method is not supported in transaction");
}
public RFuture<Boolean> clearExpireAsync() {

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

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

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

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

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

Loading…
Cancel
Save