private void completeCommits(long previousCommitIndex,long commitIndex){
  for (long i=previousCommitIndex + 1; i <= commitIndex; i++) {
    CompletableFuture<Long> future=appendFutures.remove(i);
    if (future != null) {
      future.complete(i);
    }
  }
}

private void completeCommits ( long previousCommitIndex , long commitIndex ) { for ( long i = previousCommitIndex + 1 ; i <= commitIndex ; i ++ ) { CompletableFuture < Long > future = appendFutures . remove ( i ) ; if ( future != null ) { future . complete ( i ) ; } } }
completes append entries attempts up to the given index .
