public void translate()

in webindex/modules/data/src/main/java/webindex/data/fluo/IndexUpdateTranslator.java [50:67]


  public void translate(SequencedExport<String, IndexUpdate> export, Consumer<Mutation> consumer) {
    if (export.getValue() instanceof DomainUpdate) {
      domainsExported.mark();
      IndexClient.genDomainMutations((DomainUpdate) export.getValue(), export.getSequence(),
          consumer);
    } else if (export.getValue() instanceof PageUpdate) {
      pagesExported.mark();
      IndexClient.genPageMutations((PageUpdate) export.getValue(), export.getSequence(), consumer);
    } else if (export.getValue() instanceof UriUpdate) {
      linksExported.mark();
      IndexClient.genUriMutations((UriUpdate) export.getValue(), export.getSequence(), consumer);
    } else {
      String msg = "An object with an IndexUpdate class (" + export.getValue().getClass().toString()
          + ") was placed on the export queue";
      log.error(msg);
      throw new IllegalStateException(msg);
    }
  }