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