mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Fix several bugs
This commit is contained in:
@@ -19,6 +19,7 @@ package net.openhft.chronicle.map.impl;
|
||||
import net.openhft.chronicle.hash.impl.stage.data.bytes.EntryKeyBytesData;
|
||||
import net.openhft.chronicle.hash.impl.stage.entry.*;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.KeyBytesInterop;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.LogHolder;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.OwnerThreadHolder;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.ThreadLocalCopiesHolder;
|
||||
import net.openhft.chronicle.hash.impl.stage.iter.IterationKeyHashCode;
|
||||
@@ -43,6 +44,8 @@ import net.openhft.sg.Staged;
|
||||
ThreadLocalCopiesHolder.class,
|
||||
VanillaChronicleMapHolderImpl.class,
|
||||
|
||||
LogHolder.class,
|
||||
|
||||
MapSegmentIteration.class,
|
||||
|
||||
KeyBytesInterop.class,
|
||||
|
||||
@@ -21,6 +21,7 @@ import net.openhft.chronicle.hash.impl.stage.data.bytes.InputKeyBytesData;
|
||||
import net.openhft.chronicle.hash.impl.stage.data.instance.InputKeyInstanceData;
|
||||
import net.openhft.chronicle.hash.impl.stage.entry.*;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.KeyBytesInterop;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.LogHolder;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.OwnerThreadHolder;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.ThreadLocalCopiesHolder;
|
||||
import net.openhft.chronicle.hash.impl.stage.input.HashInputBytes;
|
||||
@@ -44,6 +45,8 @@ import net.openhft.sg.Staged;
|
||||
OwnerThreadHolder.class,
|
||||
ThreadLocalCopiesHolder.class,
|
||||
|
||||
LogHolder.class,
|
||||
|
||||
VanillaChronicleMapHolderImpl.class,
|
||||
|
||||
KeyBytesInterop.class,
|
||||
|
||||
@@ -19,6 +19,7 @@ package net.openhft.chronicle.map.impl;
|
||||
import net.openhft.chronicle.hash.impl.stage.data.bytes.EntryKeyBytesData;
|
||||
import net.openhft.chronicle.hash.impl.stage.entry.*;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.KeyBytesInterop;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.LogHolder;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.OwnerThreadHolder;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.ThreadLocalCopiesHolder;
|
||||
import net.openhft.chronicle.hash.impl.stage.iter.IterationKeyHashCode;
|
||||
@@ -44,6 +45,8 @@ import net.openhft.sg.Staged;
|
||||
ThreadLocalCopiesHolder.class,
|
||||
ReplicatedChronicleMapHolderImpl.class,
|
||||
|
||||
LogHolder.class,
|
||||
|
||||
ReplicatedMapSegmentIteration.class,
|
||||
|
||||
KeyBytesInterop.class,
|
||||
|
||||
+4
-7
@@ -17,6 +17,7 @@
|
||||
package net.openhft.chronicle.map.impl.stage.map;
|
||||
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.Chaining;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.ChainingInterface;
|
||||
import net.openhft.chronicle.hash.serialization.internal.MetaBytesInterop;
|
||||
import net.openhft.chronicle.map.ChronicleMap;
|
||||
import net.openhft.chronicle.map.ReplicatedChronicleMap;
|
||||
@@ -38,14 +39,10 @@ public class ReplicatedChronicleMapHolderImpl<
|
||||
this.m = m;
|
||||
}
|
||||
|
||||
public ReplicatedChronicleMapHolderImpl(ReplicatedChronicleMapHolderImpl c) {
|
||||
public ReplicatedChronicleMapHolderImpl(
|
||||
ChainingInterface c, ReplicatedChronicleMap<K, KI, MKI, V, VI, MVI, R> m) {
|
||||
super(c);
|
||||
this.m = (ReplicatedChronicleMap<K, KI, MKI, V, VI, MVI, R>) c.m;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Chaining createChaining() {
|
||||
return new ReplicatedChronicleMapHolderImpl(this);
|
||||
this.m = m;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-7
@@ -17,6 +17,7 @@
|
||||
package net.openhft.chronicle.map.impl.stage.map;
|
||||
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.Chaining;
|
||||
import net.openhft.chronicle.hash.impl.stage.hash.ChainingInterface;
|
||||
import net.openhft.chronicle.hash.serialization.internal.MetaBytesInterop;
|
||||
import net.openhft.chronicle.map.ChronicleMap;
|
||||
import net.openhft.chronicle.map.VanillaChronicleMap;
|
||||
@@ -38,14 +39,10 @@ public class VanillaChronicleMapHolderImpl<
|
||||
this.m = m;
|
||||
}
|
||||
|
||||
public VanillaChronicleMapHolderImpl(VanillaChronicleMapHolderImpl c) {
|
||||
public VanillaChronicleMapHolderImpl(
|
||||
ChainingInterface c, VanillaChronicleMap<K, KI, MKI, V, VI, MVI, R> m) {
|
||||
super(c);
|
||||
this.m = (VanillaChronicleMap<K, KI, MKI, V, VI, MVI, R>) c.m;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Chaining createChaining() {
|
||||
return new VanillaChronicleMapHolderImpl(this);
|
||||
this.m = m;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-3
@@ -51,9 +51,10 @@ public abstract class ReplicatedQuerySegmentStages extends QuerySegmentStages {
|
||||
return ret;
|
||||
} else {
|
||||
ReplicatedChronicleMap<?, ?, ?, ?, ?, ?, ?> map = mh.m();
|
||||
MapSegmentContext<?, ?, ?> sc = map.segmentContext(segmentIndex);
|
||||
((ReplicatedHashSegmentContext<?, ?>) sc)
|
||||
.forEachSegmentReplicableEntry(cleanupAction);
|
||||
try (MapSegmentContext<?, ?, ?> sc = map.segmentContext(segmentIndex)) {
|
||||
((ReplicatedHashSegmentContext<?, ?>) sc)
|
||||
.forEachSegmentReplicableEntry(cleanupAction);
|
||||
}
|
||||
ret = allocReturnCode(chunks);
|
||||
if (ret >= 0) {
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user