|
|
|
@ -615,7 +615,24 @@ public class BaseTransactionalMap<K, V> extends BaseTransactionalObject {
|
|
|
|
|
});
|
|
|
|
|
return new CompletableFutureWrapper<>(f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected Set<K> keySet(String pattern, int count) {
|
|
|
|
|
Set<K> keys = map.keySet(pattern, count);
|
|
|
|
|
return keys.stream()
|
|
|
|
|
.map(k -> Collections.singletonMap(k, toKeyHash(k)))
|
|
|
|
|
.filter(k -> {
|
|
|
|
|
HashValue hash = k.values().iterator().next();
|
|
|
|
|
if (state.get(hash) == null
|
|
|
|
|
|| state.get(hash) != BaseTransactionalMap.MapEntry.NULL) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
})
|
|
|
|
|
.map(m -> m.keySet().iterator().next())
|
|
|
|
|
.collect(Collectors.toSet());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected RFuture<V> removeOperationAsync(K key) {
|
|
|
|
|
long threadId = Thread.currentThread().getId();
|
|
|
|
|
return executeLocked(key, () -> {
|
|
|
|
|