Skip to content
Permalink
Browse files
Merge branch 'cassandra-3.0' into cassandra-3.11
  • Loading branch information
David Capwell committed May 25, 2022
2 parents 0e1d068 + fb8bf30 commit 76648a6534845765e5f79db5d7a9f60ec347c98b
Showing 1 changed file with 13 additions and 5 deletions.
@@ -38,20 +38,28 @@
{
public static IVersionedSerializer<PingMessage> serializer = new PingMessageSerializer();

private final int connectionType;

public PingMessage(int connectionType)
{
this.connectionType = connectionType;
}

public static class PingMessageSerializer implements IVersionedSerializer<PingMessage>
{
public void serialize(PingMessage t, DataOutputPlus out, int version)
@Override
public void serialize(PingMessage t, DataOutputPlus out, int version) throws IOException
{
throw new UnsupportedOperationException();
out.writeByte(t.connectionType);
}

@Override
public PingMessage deserialize(DataInputPlus in, int version) throws IOException
{
// throw away the one byte of the payload
in.readByte();
return new PingMessage();
return new PingMessage(in.readByte());
}

@Override
public long serializedSize(PingMessage t, int version)
{
return 1;

0 comments on commit 76648a6

Please sign in to comment.