mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-185 refactored VanillaChronicleMap and ReplicatedChronicleMap; split BytesMapEventListener from MapEventListener; many bug fixes and optimizations; Stateless client queries without serialization/deserialization not working yet
This commit is contained in:
@@ -26,6 +26,7 @@ import net.openhft.lang.collection.DirectBitSet;
|
||||
import net.openhft.lang.collection.SingleThreadedDirectBitSet;
|
||||
import net.openhft.lang.io.ByteBufferBytes;
|
||||
import net.openhft.lang.io.Bytes;
|
||||
import net.openhft.lang.threadlocal.ThreadLocalCopies;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -108,7 +109,9 @@ final class ChannelProvider implements Closeable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readExternalEntry(@NotNull Bytes source) {
|
||||
public void readExternalEntry(
|
||||
@NotNull ThreadLocalCopies copies,
|
||||
@NotNull VanillaChronicleMap.SegmentState segmentState, @NotNull Bytes source) {
|
||||
channelDataLock.readLock().lock();
|
||||
try {
|
||||
final int chronicleId = (int) source.readStopBit();
|
||||
@@ -116,7 +119,8 @@ final class ChannelProvider implements Closeable {
|
||||
|
||||
// this channel is has not currently been created so it updates will be ignored
|
||||
if (channelEntryExternalizables[chronicleId] != null)
|
||||
channelEntryExternalizables[chronicleId].readExternalEntry(source);
|
||||
channelEntryExternalizables[chronicleId]
|
||||
.readExternalEntry(copies, segmentState, source);
|
||||
} else
|
||||
LOG.info("skipped entry with chronicleId=" + chronicleId + ", ");
|
||||
} finally {
|
||||
@@ -484,7 +488,9 @@ final class ChannelProvider implements Closeable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readExternalEntry(@NotNull Bytes source) {
|
||||
public void readExternalEntry(
|
||||
@NotNull ThreadLocalCopies copies,
|
||||
@NotNull VanillaChronicleMap.SegmentState segmentState, @NotNull Bytes source) {
|
||||
messageHandler.onMessage(source);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user