public KryoSerialization (Kryo kryo) { this.kryo = kryo; kryo.register(RegisterTCP.class); kryo.register(RegisterUDP.class); kryo.register(KeepAlive.class); kryo.register(DiscoverHost.class); kryo.register(Ping.class); input = new Input(byteBufferInputStream, 512); output = new Output(byteBufferOutputStream, 512); }
public JsonSerialization () { json.addClassTag("RegisterTCP", RegisterTCP.class); json.addClassTag("RegisterUDP", RegisterUDP.class); json.addClassTag("KeepAlive", KeepAlive.class); json.addClassTag("DiscoverHost", DiscoverHost.class); json.addClassTag("Ping", Ping.class); json.setWriter(writer); }
public void received(Connection connection, Object obj) { if(connection==KryoSocketLink.this.conn && !(obj instanceof KeepAlive)){ assert(obj instanceof byte[]); Object obj2=bytesSer.fromBytes((byte[])obj); //System.out.format("*** %s received %s (%d bytes) from %s\n", getMyMeta().getId(), obj2.getClass().getSimpleName(), ((byte[])obj).length, getTargetMeta().getId()); if(obj2 instanceof SubmitEplResponse){ System.out.print(""); } notifyReceived(obj2); } }
public KryoSerialization (Kryo kryo) { this.kryo = kryo; kryo.register(RegisterTCP.class); kryo.register(RegisterUDP.class); kryo.register(KeepAlive.class); kryo.register(DiscoverHost.class); kryo.register(Ping.class); input = new ByteBufferInput(); output = new ByteBufferOutput(); }
public MyKryoSerialization(Kryo kryo, int objectSize) { this.kryo = kryo; kryo.register(RegisterTCP.class); kryo.register(RegisterUDP.class); kryo.register(KeepAlive.class); kryo.register(DiscoverHost.class); kryo.register(Ping.class); input = new Input(byteBufferInputStream, objectSize); output = new Output(byteBufferOutputStream, objectSize); }
public KryoSerialization(Kryo kryo) { this.kryo = kryo; kryo.register(RegisterTCP.class); kryo.register(RegisterUDP.class); kryo.register(KeepAlive.class); kryo.register(DiscoverHost.class); kryo.register(Ping.class); input = new ByteBufferInput(); output = new ByteBufferOutput(); }
public JsonSerialization() { json.addClassTag("RegisterTCP", RegisterTCP.class); json.addClassTag("RegisterUDP", RegisterUDP.class); json.addClassTag("KeepAlive", KeepAlive.class); json.addClassTag("DiscoverHost", DiscoverHost.class); json.addClassTag("Ping", Ping.class); json.setWriter(writer); }
public JsonSerialization () { json.addClassTag("RegisterTCP", RegisterTCP.class); json.addClassTag("RegisterUDP", RegisterUDP.class); json.addClassTag("KeepAlive", KeepAlive.class); json.addClassTag("DiscoverHost", DiscoverHost.class); json.addClassTag("Ping", Ping.class); }
void handle(Connection connection, KeepAlive object) { statistics.ping = connection.getReturnTripTime(); Log.info("Ping: " + GetConnectionStatistics().ping); }