code: @SuppressWarnings("unchecked")
    private void commit() {
      long index = this.currentIndex;
      for (RaftSession session : sessions.getSessions(primitiveId)) {
        session.commit(index);
      }
    }
docs: Commits the application of a command to the state machine.