Class ProtobufSerializer
java.lang.Object
se.sics.kompics.network.netty.serialization.ProtobufSerializer
- All Implemented Interfaces:
Serializer
public class ProtobufSerializer extends Object implements Serializer
- Author:
- Lars Kroll <[email protected]>
-
Constructor Summary
Constructors Constructor Description ProtobufSerializer(com.google.protobuf.MessageLite prototype)
ProtobufSerializer(com.google.protobuf.MessageLite prototype, com.google.protobuf.ExtensionRegistry extensionRegistry)
-
Method Summary
Modifier and Type Method Description Object
fromBinary(io.netty.buffer.ByteBuf msg, Optional<Object> hint)
Deserialize from buf.int
identifier()
void
toBinary(Object msg, io.netty.buffer.ByteBuf buf)
Serialize o into buf.
-
Constructor Details
-
ProtobufSerializer
-
ProtobufSerializer
public ProtobufSerializer(com.google.protobuf.MessageLite prototype, com.google.protobuf.ExtensionRegistry extensionRegistry)
-
-
Method Details
-
identifier
- Specified by:
identifier
in interfaceSerializer
-
toBinary
Description copied from interface:Serializer
Serialize o into buf.- Specified by:
toBinary
in interfaceSerializer
-
fromBinary
Description copied from interface:Serializer
Deserialize from buf. Optionally use hint to decide what to deserialize.- Specified by:
fromBinary
in interfaceSerializer
- Returns:
-