Class AggregatedQueryOptionsAdapter
java.lang.Object
com.inductiveautomation.historian.common.rpc.adapters.query.AggregatedQueryOptionsAdapter
- All Implemented Interfaces:
BinaryAdapter<AggregatedQueryOptions>,BinaryDeserializer<AggregatedQueryOptions>,BinarySerializer<AggregatedQueryOptions>
public class AggregatedQueryOptionsAdapter
extends Object
implements BinaryAdapter<AggregatedQueryOptions>
A binary adapter for serializing and deserializing
AggregatedQueryOptions objects.
This class provides methods to encode an AggregatedQueryOptions into a byte array
and decode a byte array back into an AggregatedQueryOptions. It uses Protocol Buffers
for serialization and deserialization.
-
Method Summary
Modifier and TypeMethodDescriptiondecode(byte[] serialized, DeserializationContext context) Decodes a byte array into anAggregatedQueryOptionsobject.byte[]encode(AggregatedQueryOptions any, SerializationContext context) Encodes anAggregatedQueryOptionsobject into a byte array.Retrieves the singleton instance of theAggregatedQueryOptionsAdapter.
-
Method Details
-
getInstance
Retrieves the singleton instance of theAggregatedQueryOptionsAdapter.- Returns:
- The singleton instance of
AggregatedQueryOptionsAdapter.
-
decode
public AggregatedQueryOptions decode(byte[] serialized, DeserializationContext context) throws ProtoSerializationException Decodes a byte array into anAggregatedQueryOptionsobject.- Specified by:
decodein interfaceBinaryDeserializer<AggregatedQueryOptions>- Parameters:
serialized- The byte array containing the serializedAggregatedQueryOptions.context- TheDeserializationContextfor the operation.- Returns:
- The deserialized
AggregatedQueryOptionsobject. - Throws:
ProtoSerializationException- If an error occurs during deserialization.
-
encode
public byte[] encode(AggregatedQueryOptions any, SerializationContext context) throws ProtoSerializationException Encodes anAggregatedQueryOptionsobject into a byte array.- Specified by:
encodein interfaceBinarySerializer<AggregatedQueryOptions>- Parameters:
any- TheAggregatedQueryOptionsobject to encode.context- TheSerializationContextfor the operation.- Returns:
- A byte array representing the serialized
AggregatedQueryOptions. - Throws:
ProtoSerializationException- If an error occurs during serialization.
-