From 19fadf5628c69da91ee76bd639065cb72defdb68 Mon Sep 17 00:00:00 2001 From: leventov Date: Mon, 28 Dec 2015 19:01:13 +0300 Subject: [PATCH] Remove stateless clients traces in TcpReplicator --- .../openhft/chronicle/map/AbstractChannelReplicator.java | 5 +++-- .../java/net/openhft/chronicle/map/TcpReplicator.java | 8 -------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/main/java/net/openhft/chronicle/map/AbstractChannelReplicator.java b/src/main/java/net/openhft/chronicle/map/AbstractChannelReplicator.java index 33c6f967d..789217144 100644 --- a/src/main/java/net/openhft/chronicle/map/AbstractChannelReplicator.java +++ b/src/main/java/net/openhft/chronicle/map/AbstractChannelReplicator.java @@ -57,8 +57,9 @@ abstract class AbstractChannelReplicator implements Closeable { private static final Logger LOG = LoggerFactory.getLogger(AbstractChannelReplicator.class); - // currently this is not safe to use as it wont work with the stateless client - static boolean useJavaNIOSelectionKeys = Boolean.valueOf(System.getProperty("useJavaNIOSelectionKeys")); + // this was not safe to use as it wont work with the stateless client + static boolean useJavaNIOSelectionKeys = + Boolean.valueOf(System.getProperty("useJavaNIOSelectionKeys")); final SelectedSelectionKeySet selectedKeys = new SelectedSelectionKeySet(); diff --git a/src/main/java/net/openhft/chronicle/map/TcpReplicator.java b/src/main/java/net/openhft/chronicle/map/TcpReplicator.java index b4bbdeded..bd73518c5 100644 --- a/src/main/java/net/openhft/chronicle/map/TcpReplicator.java +++ b/src/main/java/net/openhft/chronicle/map/TcpReplicator.java @@ -59,8 +59,6 @@ import static net.openhft.chronicle.hash.impl.util.BuildVersion.version; */ final class TcpReplicator extends AbstractChannelReplicator implements Closeable { - public static final long TIMESTAMP_FACTOR = 10000; - private static final int STATELESS_CLIENT = -127; private static final byte HEARTBEAT = 0; private static final byte NOT_SET = 0;//(byte) HEARTBEAT.ordinal(); private static final Logger LOG = LoggerFactory.getLogger(TcpReplicator.class.getName()); @@ -606,12 +604,6 @@ final class TcpReplicator extends AbstractChannelReplicator implements Closeable if (attached.remoteIdentifier == Byte.MIN_VALUE) { final byte remoteIdentifier = reader.identifierFromBuffer(); - if (remoteIdentifier == STATELESS_CLIENT) { - attached.handShakingComplete = true; - attached.hasRemoteHeartbeatInterval = false; - return; - } - if (remoteIdentifier == Byte.MIN_VALUE) return;