Class TimeWindowAdapter
java.lang.Object
com.inductiveautomation.historian.common.rpc.adapters.query.TimeWindowAdapter
- All Implemented Interfaces:
BinaryAdapter<TimeWindow>, BinaryDeserializer<TimeWindow>, BinarySerializer<TimeWindow>
Protobuf binary adapter for
TimeWindow.-
Method Summary
Modifier and TypeMethodDescriptiondecode(byte[] serialized, DeserializationContext context) DecodesTimeWindowfrom its serialized form.byte[]encode(TimeWindow any, SerializationContext context) EncodesTimeWindowto bytes.static TimeWindowAdapterReturns the singleton instance.
-
Method Details
-
getInstance
Returns the singleton instance. -
decode
public TimeWindow decode(byte[] serialized, DeserializationContext context) throws ProtoSerializationException DecodesTimeWindowfrom its serialized form.- Specified by:
decodein interfaceBinaryDeserializer<TimeWindow>- Parameters:
serialized- the serialized valuecontext- the deserialization context- Returns:
- the decoded value
- Throws:
ProtoSerializationException- if decoding fails
-
encode
public byte[] encode(TimeWindow any, SerializationContext context) throws ProtoSerializationException EncodesTimeWindowto bytes.- Specified by:
encodein interfaceBinarySerializer<TimeWindow>- Parameters:
any- the value to encodecontext- the serialization context- Returns:
- the serialized value
- Throws:
ProtoSerializationException- if encoding fails
-