Class AggregatedQueryKeyAdapter
java.lang.Object
com.inductiveautomation.historian.common.rpc.adapters.query.AggregatedQueryKeyAdapter
- All Implemented Interfaces:
BinaryAdapter<AggregatedQueryKey>
,BinaryDeserializer<AggregatedQueryKey>
,BinarySerializer<AggregatedQueryKey>
A binary adapter for serializing and deserializing
AggregatedQueryKey
objects.
This class provides methods to encode an AggregatedQueryKey
into a byte array
and decode a byte array back into an AggregatedQueryKey
. It uses Protocol Buffers
for serialization and deserialization.
-
Method Summary
Modifier and TypeMethodDescriptiondecode
(byte[] serialized, DeserializationContext context) Decodes a byte array into anAggregatedQueryKey
object.byte[]
encode
(AggregatedQueryKey any, SerializationContext context) Encodes anAggregatedQueryKey
object into a byte array.static AggregatedQueryKeyAdapter
Retrieves the singleton instance of theAggregatedQueryKeyAdapter
.
-
Method Details
-
getInstance
Retrieves the singleton instance of theAggregatedQueryKeyAdapter
.- Returns:
- The singleton instance of
AggregatedQueryKeyAdapter
.
-
decode
public AggregatedQueryKey decode(byte[] serialized, DeserializationContext context) throws ProtoSerializationException Decodes a byte array into anAggregatedQueryKey
object.- Specified by:
decode
in interfaceBinaryDeserializer<AggregatedQueryKey>
- Parameters:
serialized
- The byte array containing the serializedAggregatedQueryKey
.context
- TheDeserializationContext
for the operation.- Returns:
- The deserialized
AggregatedQueryKey
object. - Throws:
ProtoSerializationException
- If an error occurs during deserialization.
-
encode
public byte[] encode(AggregatedQueryKey any, SerializationContext context) throws ProtoSerializationException Encodes anAggregatedQueryKey
object into a byte array.- Specified by:
encode
in interfaceBinarySerializer<AggregatedQueryKey>
- Parameters:
any
- TheAggregatedQueryKey
object to encode.context
- TheSerializationContext
for the operation.- Returns:
- A byte array representing the serialized
AggregatedQueryKey
. - Throws:
ProtoSerializationException
- If an error occurs during serialization.
-