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 Details

    • serialize

      public byte[] serialize(String path, org.apache.bookkeeper.discover.BookieServiceInfo bookieServiceInfo) throws IOException
      Description copied from interface: MetadataSerde
      Serialize the object into a byte array.
      Specified by:
      serialize in interface MetadataSerde<org.apache.bookkeeper.discover.BookieServiceInfo>
      Parameters:
      path - the path of the object on the metadata store
      bookieServiceInfo - 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: MetadataSerde
      Serialize the object from a byte array.
      Specified by:
      deserialize in interface MetadataSerde<org.apache.bookkeeper.discover.BookieServiceInfo>
      Parameters:
      path - the path of the object on the metadata store
      bookieServiceInfo - the content as stored on metadata store
      stat - the Stat metadata for the object
      Returns:
      the deserialized object
      Throws:
      IOException - if the deserialization fails