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 anAggregatedQueryKeyobject.byte[]encode(AggregatedQueryKey any, SerializationContext context) Encodes anAggregatedQueryKeyobject into a byte array.static AggregatedQueryKeyAdapterRetrieves 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 anAggregatedQueryKeyobject.- Specified by:
decodein interfaceBinaryDeserializer<AggregatedQueryKey>- Parameters:
serialized- The byte array containing the serializedAggregatedQueryKey.context- TheDeserializationContextfor the operation.- Returns:
- The deserialized
AggregatedQueryKeyobject. - Throws:
ProtoSerializationException- If an error occurs during deserialization.
-
encode
public byte[] encode(AggregatedQueryKey any, SerializationContext context) throws ProtoSerializationException Encodes anAggregatedQueryKeyobject into a byte array.- Specified by:
encodein interfaceBinarySerializer<AggregatedQueryKey>- Parameters:
any- TheAggregatedQueryKeyobject to encode.context- TheSerializationContextfor the operation.- Returns:
- A byte array representing the serialized
AggregatedQueryKey. - Throws:
ProtoSerializationException- If an error occurs during serialization.
-