RObjectReactive.isExists added. #316

pull/337/head
Nikita 9 years ago
parent 52a0c62477
commit 0287372ce0

@ -35,6 +35,4 @@ public interface RBucketReactive<V> extends RExpirableReactive {
Publisher<Void> set(V value, long timeToLive, TimeUnit timeUnit);
Publisher<Boolean> exists();
}

@ -71,4 +71,11 @@ public interface RObjectReactive {
*/
Publisher<Boolean> renamenx(String newName);
/**
* Check object existence
*
* @return <code>true</code> if object exists and <code>false</code> otherwise
*/
Publisher<Boolean> isExists();
}

@ -48,9 +48,4 @@ public class RedissonBucketReactive<V> extends RedissonExpirableReactive impleme
return commandExecutor.writeReactive(getName(), codec, RedisCommands.SETEX, getName(), timeUnit.toSeconds(timeToLive), value);
}
@Override
public Publisher<Boolean> exists() {
return commandExecutor.readReactive(getName(), codec, RedisCommands.EXISTS, getName());
}
}

@ -92,4 +92,9 @@ abstract class RedissonObjectReactive implements RObjectReactive {
return commandExecutor.writeReactive(getName(), RedisCommands.DEL_SINGLE, getName());
}
@Override
public Publisher<Boolean> isExists() {
return commandExecutor.readReactive(getName(), codec, RedisCommands.EXISTS, getName());
}
}

Loading…
Cancel
Save