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