Class BookieServiceInfoSerde
java.lang.Object
org.apache.pulsar.metadata.bookkeeper.BookieServiceInfoSerde
- All Implemented Interfaces:
MetadataSerde<org.apache.bookkeeper.discover.BookieServiceInfo>
public class BookieServiceInfoSerde
extends Object
implements MetadataSerde<org.apache.bookkeeper.discover.BookieServiceInfo>
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.bookkeeper.discover.BookieServiceInfodeserialize(String path, byte[] bookieServiceInfo, Stat stat) Serialize the object from a byte array.byte[]Serialize the object into a byte array.
-
Method Details
-
serialize
public byte[] serialize(String path, org.apache.bookkeeper.discover.BookieServiceInfo bookieServiceInfo) throws IOException Description copied from interface:MetadataSerdeSerialize the object into a byte array.- Specified by:
serializein interfaceMetadataSerde<org.apache.bookkeeper.discover.BookieServiceInfo>- Parameters:
path- the path of the object on the metadata storebookieServiceInfo- the object instance- Returns:
- a byte array of the serialized version
- Throws:
IOException- if the serialization fails
-
deserialize
public org.apache.bookkeeper.discover.BookieServiceInfo deserialize(String path, byte[] bookieServiceInfo, Stat stat) throws IOException Description copied from interface:MetadataSerdeSerialize the object from a byte array.- Specified by:
deserializein interfaceMetadataSerde<org.apache.bookkeeper.discover.BookieServiceInfo>- Parameters:
path- the path of the object on the metadata storebookieServiceInfo- the content as stored on metadata storestat- theStatmetadata for the object- Returns:
- the deserialized object
- Throws:
IOException- if the deserialization fails
-