Package org.apache.pulsar.metadata.api
Interface MetadataSerde<T>
- Type Parameters:
T-
- All Known Implementing Classes:
BookieServiceInfoSerde,JSONMetadataSerdeSimpleType,JSONMetadataSerdeTypeRef
public interface MetadataSerde<T>
Interface that define a serializer/deserializer implementation.
-
Method Summary
-
Method Details
-
serialize
Serialize the object into a byte array.- Parameters:
path- the path of the object on the metadata storevalue- the object instance- Returns:
- a byte array of the serialized version
- Throws:
IOException- if the serialization fails
-
deserialize
Serialize the object from a byte array.- Parameters:
path- the path of the object on the metadata storecontent- the content as stored on metadata storestat- theStatmetadata for the object- Returns:
- the deserialized object
- Throws:
IOException- if the deserialization fails
-