mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-343 HCOLL-227 Remove old entries from ReplicatedChronicleMap
This commit is contained in:
@@ -76,8 +76,6 @@ interface AbstractChronicleMap<K, V> extends ChronicleMap<K, V>, Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
int actualSegments();
|
||||
|
||||
@Override
|
||||
default boolean containsValue(Object value) {
|
||||
return !forEachEntryWhile(c -> !c.value().equals(c.context().wrapValueAsData((V) value)));
|
||||
@@ -257,7 +255,7 @@ interface AbstractChronicleMap<K, V> extends ChronicleMap<K, V>, Serializable {
|
||||
@Override
|
||||
default boolean forEachEntryWhile(final Predicate<? super MapEntry<K, V>> action) {
|
||||
boolean interrupt = false;
|
||||
for (int i = actualSegments() - 1; i >= 0; i--) {
|
||||
for (int i = segments() - 1; i >= 0; i--) {
|
||||
try (MapSegmentContext<K, V, ?> c = segmentContext(i)) {
|
||||
if (!c.forEachSegmentEntryWhile(action)) {
|
||||
interrupt = true;
|
||||
|
||||
Reference in New Issue
Block a user