Package org.openstreetmap.osmosis.plugin.elasticsearch.utils

Examples of org.openstreetmap.osmosis.plugin.elasticsearch.utils.EntityBuffer$EntityBufferFactory


    factoryMap.put("sc", changeSorterFactory06);
    factoryMap.put("write-null", new NullWriterFactory());
    factoryMap.put("wn", new NullWriterFactory());
    factoryMap.put("write-null-change", new NullChangeWriterFactory());
    factoryMap.put("wnc", new NullChangeWriterFactory());
    factoryMap.put("buffer", new EntityBufferFactory());
    factoryMap.put("b", new EntityBufferFactory());
    factoryMap.put("buffer-change", new ChangeBufferFactory());
    factoryMap.put("bc", new ChangeBufferFactory());
    factoryMap.put("report-entity", new EntityReporterFactory());
    factoryMap.put("re", new EntityReporterFactory());
    factoryMap.put("report-integrity", new IntegrityReporterFactory());
    factoryMap.put("ri", new IntegrityReporterFactory());
    factoryMap.put("log-progress", new EntityProgressLoggerFactory());
    factoryMap.put("lp", new EntityProgressLoggerFactory());
    factoryMap.put("log-progress-change", new ChangeProgressLoggerFactory());
    factoryMap.put("lpc", new ChangeProgressLoggerFactory());
    factoryMap.put("tee", new EntityTeeFactory());
    factoryMap.put("t", new EntityTeeFactory());
    factoryMap.put("tee-change", new ChangeTeeFactory());
    factoryMap.put("tc", new ChangeTeeFactory());
    factoryMap.put("read-empty", new EmptyReaderFactory());
    factoryMap.put("rem", new EmptyReaderFactory());
    factoryMap.put("read-empty-change", new EmptyChangeReaderFactory());
    factoryMap.put("remc", new EmptyChangeReaderFactory());

    factoryMap.put("compute-bounding-box", new BoundComputerFactory());
    factoryMap.put("cbb", new BoundComputerFactory());
    factoryMap.put("set-bounding-box", new BoundSetterFactory());
    factoryMap.put("sbb", new BoundSetterFactory());

    factoryMap.put("sort-0.6", entitySorterFactory06);
    factoryMap.put("sort-change-0.6", changeSorterFactory06);
    factoryMap.put("write-null-0.6", new NullWriterFactory());
    factoryMap.put("write-null-change-0.6", new NullChangeWriterFactory());
    factoryMap.put("buffer-0.6", new EntityBufferFactory());
    factoryMap.put("buffer-change-0.6", new ChangeBufferFactory());
    factoryMap.put("report-entity-0.6", new EntityReporterFactory());
    factoryMap.put("report-integrity-0.6", new IntegrityReporterFactory());
    factoryMap.put("log-progress-0.6", new EntityProgressLoggerFactory());
    factoryMap.put("log-progress-change-0.6", new ChangeProgressLoggerFactory());
View Full Code Here


  }

  @Override
  public void run() {
    Entity entity = null;
    EntityBuffer entityBuffer = null;
    NewTypeNotification notification = null;
    while (running || !taskQueue.isEmpty()) {
      try {
        // Check if a NewTypeNotification was triggered
        if ((notification = newTypeNotification.getAndSet(null)) != null) {
          LOG.fine("NewTypeNotification detected, flushing...");
          if (entityBuffer != null) entityBuffer.flush();
          entityBuffer = bufferFactory.buildForType(notification.getType());
          notification.getLatch().countDown();
        }
        // Poll the queue
        if ((entity = taskQueue.poll(WorkerPool.POLL_INTERVAL, TimeUnit.MILLISECONDS)) != null) {
          entityBuffer.add(entity);
        }
      } catch (InterruptedException e) {
        LOG.fine("InterruptedException triggered, leaving...");
      }
    }
    if (entityBuffer != null) entityBuffer.flush();
    LOG.fine(String.format("%s shutdown", getName()));
  }
View Full Code Here

TOP

Related Classes of org.openstreetmap.osmosis.plugin.elasticsearch.utils.EntityBuffer$EntityBufferFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.