Java Collections.emptyListIterator Examples

Java Collections.emptyListIterator - 2 examples found. These are the top rated real world Java examples of java.util.Collections.emptyListIterator extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
  @Override
  public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
    initialized = false;
    // Spout internals
    this.collector = collector;
    this.topologyContext = context;
    maxRetries = kafkaSpoutConfig.getMaxTupleRetries();
    numUncommittedOffsets = 0;

    // Offset management
    firstPollOffsetStrategy = kafkaSpoutConfig.getFirstPollOffsetStrategy();
    consumerAutoCommitMode = kafkaSpoutConfig.isConsumerAutoCommitMode();

    // Retries management
    retryService = kafkaSpoutConfig.getRetryService();

    // Tuples builder delegate
    tuplesBuilder = kafkaSpoutConfig.getTuplesBuilder();

    if (!consumerAutoCommitMode) { // If it is auto commit, no need to commit offsets manually
      commitTimer =
          new Timer(500, kafkaSpoutConfig.getOffsetsCommitPeriodMs(), TimeUnit.MILLISECONDS);
    }

    acked = new HashMap<>();
    emitted = new HashSet<>();
    waitingToEmit = Collections.emptyListIterator();

    LOG.info("Kafka Spout opened with the following configuration: {}", kafkaSpoutConfig);
  }
Example #2
0
 @Override
 public Iterator<PlayerQueue.Entry> iterator() {
   return Collections.emptyListIterator();
 }