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