code: private Completable initWithCallback(Action1<PartitionAndSeqno> callback) {
      sessionState().setToBeginningWithNoEnd(numPartitions());
  
      return getSeqnos()
          .doOnNext(callback)
          .reduce(new ArrayList<>(), new Func2<List<Short>, PartitionAndSeqno, List<Short>>() {
            @Override
            public List<Short> call(List<Short> partitions, PartitionAndSeqno partitionAndSeqno) {
              partitions.add(partitionAndSeqno.partition());
              return partitions;
            }
          })
          .flatMap(new Func1<List<Short>, Observable<ByteBuf>>() {
            @Override
            public Observable<ByteBuf> call(List<Short> partitions) {
              return failoverLogs(partitions.toArray(new Short[]{}));
            }
          })
          .map(new Func1<ByteBuf, Short>() {
            @Override
            public Short call(ByteBuf buf) {
              short partition = DcpFailoverLogResponse.vbucket(buf);
              handleFailoverLogResponse(buf);
              buf.release();
              return partition;
            }
          }).last().toCompletable();
    }
docs: Helper method to initialize all kinds of states.
  <p>
  This method grabs the sequence numbers and then calls a callback for customization. Once that is done it
  grabs the failover logs and populates the session state with the failover log information.