docs: @Override
      public void run() {
  
          if (this.state != null && this.state.cancel) {
              // we were already cancelled, don't run, but still post completion
              this.state.documentCounter = 0;
              this.state.batchCounter = 0;
              runComplete(null);
              return;
          }
          // reset internal state
          this.state = new State();
  
          Throwable errorInfo = null;
  
          try {
              this.useBulkGet = sourceDb.isBulkSupported();
              replicate();
  
          } catch (ExecutionException ex) {
              logger.log(Level.SEVERE, String.format("Batch %s ended with error:", this.state
                      .batchCounter), ex);
              errorInfo = ex.getCause();
          } catch (Throwable e) {
              logger.log(Level.SEVERE, String.format("Batch %s ended with error:", this.state
                      .batchCounter), e);
              errorInfo = e;
          }
  
          runComplete(errorInfo);
      }