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 anAggregatedQueryOptions
object.byte[]
encode
(AggregatedQueryOptions any, SerializationContext context) Encodes anAggregatedQueryOptions
object 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 anAggregatedQueryOptions
object.- Specified by:
decode
in interfaceBinaryDeserializer<AggregatedQueryOptions>
- Parameters:
serialized
- The byte array containing the serializedAggregatedQueryOptions
.context
- TheDeserializationContext
for the operation.- Returns:
- The deserialized
AggregatedQueryOptions
object. - Throws:
ProtoSerializationException
- If an error occurs during deserialization.
-
encode
public byte[] encode(AggregatedQueryOptions any, SerializationContext context) throws ProtoSerializationException Encodes anAggregatedQueryOptions
object into a byte array.- Specified by:
encode
in interfaceBinarySerializer<AggregatedQueryOptions>
- Parameters:
any
- TheAggregatedQueryOptions
object to encode.context
- TheSerializationContext
for the operation.- Returns:
- A byte array representing the serialized
AggregatedQueryOptions
. - Throws:
ProtoSerializationException
- If an error occurs during serialization.
-