|
|
|
@ -170,11 +170,7 @@ public class RedissonMap<K, V> extends RedissonExpirable implements RMap<K, V> {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
|
|
|
|
|
if (commandExecutor instanceof CommandBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandReactiveBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandRxBatchService) {
|
|
|
|
|
throw new IllegalStateException("This method doesn't work in batch mode.");
|
|
|
|
|
}
|
|
|
|
|
checkNotBatch();
|
|
|
|
|
|
|
|
|
|
checkKey(key);
|
|
|
|
|
checkValue(value);
|
|
|
|
@ -202,11 +198,7 @@ public class RedissonMap<K, V> extends RedissonExpirable implements RMap<K, V> {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public RFuture<V> mergeAsync(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) {
|
|
|
|
|
if (commandExecutor instanceof CommandBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandReactiveBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandRxBatchService) {
|
|
|
|
|
throw new IllegalStateException("This method doesn't work in batch mode.");
|
|
|
|
|
}
|
|
|
|
|
checkNotBatch();
|
|
|
|
|
|
|
|
|
|
checkKey(key);
|
|
|
|
|
checkValue(value);
|
|
|
|
@ -241,12 +233,7 @@ public class RedissonMap<K, V> extends RedissonExpirable implements RMap<K, V> {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public RFuture<V> computeAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
|
|
|
|
|
if (commandExecutor instanceof CommandBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandReactiveBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandRxBatchService) {
|
|
|
|
|
throw new IllegalStateException("This method doesn't work in batch mode.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
checkNotBatch();
|
|
|
|
|
checkKey(key);
|
|
|
|
|
Objects.requireNonNull(remappingFunction);
|
|
|
|
|
|
|
|
|
@ -278,11 +265,7 @@ public class RedissonMap<K, V> extends RedissonExpirable implements RMap<K, V> {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
|
|
|
|
|
if (commandExecutor instanceof CommandBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandReactiveBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandRxBatchService) {
|
|
|
|
|
throw new IllegalStateException("This method doesn't work in batch mode.");
|
|
|
|
|
}
|
|
|
|
|
checkNotBatch();
|
|
|
|
|
|
|
|
|
|
checkKey(key);
|
|
|
|
|
Objects.requireNonNull(remappingFunction);
|
|
|
|
@ -308,11 +291,7 @@ public class RedissonMap<K, V> extends RedissonExpirable implements RMap<K, V> {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public RFuture<V> computeIfAbsentAsync(K key, Function<? super K, ? extends V> mappingFunction) {
|
|
|
|
|
if (commandExecutor instanceof CommandBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandReactiveBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandRxBatchService) {
|
|
|
|
|
throw new IllegalStateException("This method doesn't work in batch mode.");
|
|
|
|
|
}
|
|
|
|
|
checkNotBatch();
|
|
|
|
|
|
|
|
|
|
checkKey(key);
|
|
|
|
|
Objects.requireNonNull(mappingFunction);
|
|
|
|
@ -344,11 +323,7 @@ public class RedissonMap<K, V> extends RedissonExpirable implements RMap<K, V> {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) {
|
|
|
|
|
if (commandExecutor instanceof CommandBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandReactiveBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandRxBatchService) {
|
|
|
|
|
throw new IllegalStateException("This method doesn't work in batch mode.");
|
|
|
|
|
}
|
|
|
|
|
checkNotBatch();
|
|
|
|
|
|
|
|
|
|
checkKey(key);
|
|
|
|
|
Objects.requireNonNull(mappingFunction);
|
|
|
|
@ -373,11 +348,7 @@ public class RedissonMap<K, V> extends RedissonExpirable implements RMap<K, V> {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public RFuture<V> computeIfPresentAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
|
|
|
|
|
if (commandExecutor instanceof CommandBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandReactiveBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandRxBatchService) {
|
|
|
|
|
throw new IllegalStateException("This method doesn't work in batch mode.");
|
|
|
|
|
}
|
|
|
|
|
checkNotBatch();
|
|
|
|
|
|
|
|
|
|
checkKey(key);
|
|
|
|
|
Objects.requireNonNull(remappingFunction);
|
|
|
|
@ -409,11 +380,7 @@ public class RedissonMap<K, V> extends RedissonExpirable implements RMap<K, V> {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
|
|
|
|
|
if (commandExecutor instanceof CommandBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandReactiveBatchService
|
|
|
|
|
|| commandExecutor instanceof CommandRxBatchService) {
|
|
|
|
|
throw new IllegalStateException("This method doesn't work in batch mode.");
|
|
|
|
|
}
|
|
|
|
|
checkNotBatch();
|
|
|
|
|
|
|
|
|
|
checkKey(key);
|
|
|
|
|
Objects.requireNonNull(remappingFunction);
|
|
|
|
|