HeartbeatHandler should only be a SubHandler
package net.openhft.chronicle.network.cluster.handlers;
-import net.openhft.chronicle.bytes.Bytes;
import net.openhft.chronicle.core.Jvm;
import net.openhft.chronicle.core.annotation.UsedViaReflection;
import net.openhft.chronicle.core.io.Closeable;
@@ -8,7 +7,6 @@ import net.openhft.chronicle.core.threads.InvalidEventHandlerException;
import net.openhft.chronicle.core.threads.Timer;
import net.openhft.chronicle.core.threads.VanillaEventHandler;
import net.openhft.chronicle.network.ConnectionListener;
-import net.openhft.chronicle.network.api.TcpHandler;
import net.openhft.chronicle.network.cluster.AbstractSubHandler;
import net.openhft.chronicle.network.cluster.ClusterContext;
import net.openhft.chronicle.network.cluster.ClusteredNetworkContext;
@@ -26,7 +24,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Function;
public final class HeartbeatHandler<T extends ClusteredNetworkContext> extends AbstractSubHandler<T> implements
- Demarshallable, WriteMarshallable, HeartbeatEventHandler, TcpHandler<T> {
+ Demarshallable, WriteMarshallable, HeartbeatEventHandler {
private final long heartbeatIntervalMs;
private final long heartbeatTimeoutMs;
@@ -124,13 +122,6 @@ public final class HeartbeatHandler<T extends ClusteredNetworkContext> extends A
inWire.read(() -> "heartbeat").text();
}
- @Override
- public void process(@NotNull Bytes in, @NotNull Bytes out, T nc) {
- if (in.readRemaining() == 0)
- return;
- throw new UnsupportedOperationException("Unexpected call to process()");
- }
-
@Override
public void close() {
if (connectionMonitor != null)
