Package com.arpnetworking.tsdcore.model
Class AggregationMessage
java.lang.Object
com.arpnetworking.tsdcore.model.AggregationMessage
Class for building messages from the raw, on-the-wire bytes in the TCP stream.
- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot com)
-
Method Summary
Modifier and TypeMethodDescriptionstatic AggregationMessage
create
(com.google.protobuf.GeneratedMessageV3 message) Static factory.static Optional<AggregationMessage>
deserialize
(org.apache.pekko.util.ByteString data) Deserialize message fromByteString
.int
com.google.protobuf.GeneratedMessageV3
org.apache.pekko.util.ByteString
Serialize the message into aByteString
.
-
Method Details
-
create
Static factory.- Parameters:
message
- The message.- Returns:
- New
AggregationMessage
instance.
-
deserialize
Deserialize message fromByteString
. TODO(vkoskela): The header and message need to be versioned [MAI-133].- Parameters:
data
- TheByteString
containing the serialized message.- Returns:
- The deserialized
AggregationMessage
or absent if theByteString
could not be deserialized.
-
serialize
public org.apache.pekko.util.ByteString serialize()Serialize the message into aByteString
.- Returns:
ByteString
containing serialized message.
-
getMessage
public com.google.protobuf.GeneratedMessageV3 getMessage() -
getLength
public int getLength()
-