class FullTraversalConnector implements IndexingConnector, IncrementalChangeHandler {

  @Override
  public void traverse() throws IOException, InterruptedException {
    String queueName = queueCheckpoint.getCurrentQueueName();
    if (useQueues) {
      String operationName = queueCheckpoint.getCurrentOperation();
      if (!Strings.isNullOrEmpty(operationName)) {
        try {
          Operation operation = indexingService.getOperation(operationName);
          if (!Boolean.TRUE.equals(operation.getDone())) {
            logger.log(Level.FINE, "Postponing full traversal; deleteQueueItems not finished "
                + "for {0}", operationName);
            return;
          }
          logger.log(Level.FINE, "deleteQueueItems result for {0}: {1}",
              new Object[] { operationName, getOperationResult(operation) });
        } catch (IOException e) {
          logger.log(Level.WARNING, "Error checking on status of deleteQueueItems "
              + operationName, e);
        }
        queueName = queueCheckpoint.getNextQueueName(queueName);
        queueCheckpoint.saveCheckpoint(queueName, "");
      }
    }

    if (!doTraverse("full traversal", CHECKPOINT_FULL, queueName, repository::getAllDocs)) {
      throw new NullPointerException("getAllDocs returned null");
    }

    if (useQueues) {
      String nextQueueName = queueCheckpoint.getNextQueueName(queueName);
      try {
        Operation operation = indexingService.deleteQueueItems(nextQueueName).get();
        if (Boolean.TRUE.equals(operation.getDone())) {
          logger.log(Level.FINE, "deleteQueueItems result for {0}: {1}",
              new Object[] { nextQueueName, getOperationResult(operation) });
          queueCheckpoint.saveCheckpoint(nextQueueName, "");
        } else {
          logger.log(Level.FINE, "deleteQueueItems running for {0}", operation.getName());
          queueCheckpoint.saveCheckpoint(queueName, operation.getName());
        }
      } catch (IOException | ExecutionException e) {
        logger.log(Level.WARNING, "Error calling deleteQueueItems", e);
      }
    }
  }

  public  FullTraversalConnector(Repository repository);
  public  FullTraversalConnector(Repository repository, CheckpointHandler checkpointHandler);

}