Class BookieServiceInfoSerde

  • All Implemented Interfaces:
    MetadataSerde<org.apache.bookkeeper.discover.BookieServiceInfo>

    public class BookieServiceInfoSerde
    extends java.lang.Object
    implements MetadataSerde<org.apache.bookkeeper.discover.BookieServiceInfo>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.bookkeeper.discover.BookieServiceInfo deserialize​(java.lang.String path, byte[] bookieServiceInfo, Stat stat)
      Serialize the object from a byte array.
      byte[] serialize​(java.lang.String path, org.apache.bookkeeper.discover.BookieServiceInfo bookieServiceInfo)
      Serialize the object into a byte array.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • serialize

        public byte[] serialize​(java.lang.String path,
                                org.apache.bookkeeper.discover.BookieServiceInfo bookieServiceInfo)
                         throws java.io.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:
        java.io.IOException - if the serialization fails
      • deserialize

        public org.apache.bookkeeper.discover.BookieServiceInfo deserialize​(java.lang.String path,
                                                                            byte[] bookieServiceInfo,
                                                                            Stat stat)
                                                                     throws java.io.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:
        java.io.IOException - if the deserialization fails