Interface Partition<T,​K>

    • Method Detail

      • write

        void write​(java.lang.Object element)
            throws java.io.IOException
        Writes an element to non-committed partition.
        Parameters:
        element - element to write.
        Throws:
        java.io.IOException - if the partition is already committed.
      • commit

        void commit()
             throws java.io.IOException
        Commits a partition to prevent further data write.
        Throws:
        java.io.IOException - if fail to commit partition.
      • getKey

        K getKey()
        Returns:
        the key value.
      • isSerialized

        boolean isSerialized()
        Returns:
        whether the data in this Partition is serialized or not.
      • getData

        T getData()
           throws java.io.IOException
        Returns:
        the data in this Partition.
        Throws:
        java.io.IOException - if the partition is not committed yet.