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:
leventov
2014-11-28 00:05:49 +07:00
parent 38a058e3ce
commit 40a3080ac9
28 changed files with 2527 additions and 1877 deletions
@@ -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);
}
};