code: public void finishAppending()
    {
      checkStateTransition(this.state, SegmentState.APPENDING, SegmentState.APPEND_FINISHED);
      this.state = SegmentState.APPEND_FINISHED;
    }
docs: Change the segment state to {@link SegmentState#APPEND_FINISHED}. The current state should be
  {@link SegmentState#APPENDING}.