Returns the {@link ItemProcessor} to use for the given item. Iterates through the chain of resolvers until one
of them returns a non-null processor. If non of them returns a processor, the {@code defaultProcessor} will be
returned.
541829
@Override
    public ItemProcessor getProcessor(Item item) {
        ItemProcessor processor;

        if (CollectionUtils.isNotEmpty(resolvers)) {
            for (ItemProcessorResolver resolver : resolvers) {
                processor = resolver.getProcessor(item);
                if (processor != null) {
                    return processor;
                }
            }
        }

        return defaultProcessor;
    }
628519
public function use_default_processor( callable $processor = null ) {

		static $done = FALSE;
		if ( $done ) {
			return $this;
		}

		$done = TRUE;

		add_action(
			ProcessorsRegistry::ACTION_REGISTER,
			function ( ProcessorsRegistry $registry ) use ($processor) {
				$processor or $processor = new WpContextProcessor();

				$registry->add_processor( $processor, ProcessorsRegistry::DEFAULT_NAME );
			}
		);

		return $this;
	}
1182254
public static MapReduceExecutor getMapReduceExecutor() {
    if (executor == null) {
      // Default to using a local executor with one thread per CPU.
      executor = new LocalMapReduceExecutor(
          Runtime.getRuntime().availableProcessors(), 20);
    }
    return executor;
  }
1074846
@Nullable
    private Comparator<SimpleItem> getComparator() {
        switch (sortingStrategy) {
            case SORT_ASCENDING:
                return new AlphabetComparatorAscending();
            case SORT_DESCENDING:
                return new AlphabetComparatorDescending();
            case SORT_NONE:
                return null;
        }

        throw new RuntimeException("This sortingStrategy is not supported.");
    }
1364529
@Override
	public Processor newProcessor(Processor sourceProcessor) {
		LocalLearnerProcessor newProcessor = new LocalLearnerProcessor();
		LocalLearnerProcessor originProcessor = (LocalLearnerProcessor) sourceProcessor;

		if (originProcessor.getLearner() != null){
			newProcessor.setLearner(originProcessor.getLearner().create());
		}

		if (originProcessor.getChangeDetector() != null){
				newProcessor.setChangeDetector(originProcessor.getChangeDetector());
		}

		newProcessor.setOutputStream(originProcessor.getOutputStream());
		return newProcessor;
	}
135528
public function getProcessor()
    {
        if (is_null($this->processor)) {
            $processor = oxNew(\OxidEsales\PayPalModule\Model\IPNProcessor::class);
            $this->setProcessor($processor);
        }

        return $this->processor;
    }
137202
private CompletableFuture<ProcessorCollection> getProcessor(long streamSegmentId) {
        ProcessorCollection existingProcessor = this.processors.getOrDefault(streamSegmentId, null);
        if (existingProcessor != null) {
            if (closeIfNecessary(existingProcessor).isClosed()) {
                // Existing SegmentAggregator has become stale (most likely due to its SegmentMetadata being evicted),
                // so it has been closed and we need to create a new one.
                this.processors.remove(streamSegmentId);
            } else {
                return CompletableFuture.completedFuture(existingProcessor);
            }
        }

        // Get the SegmentAggregator's Metadata.
        UpdateableSegmentMetadata segmentMetadata = this.dataSource.getStreamSegmentMetadata(streamSegmentId);
        if (segmentMetadata == null) {
            return Futures.failedFuture(new DataCorruptionException(String.format(
                    "No StreamSegment with id '%d' is registered in the metadata.", streamSegmentId)));
        }

        // Then create the aggregator, and only register it after a successful initialization. Otherwise we risk
        // having a registered aggregator that is not initialized.
        SegmentAggregator newAggregator = new SegmentAggregator(segmentMetadata, this.dataSource, this.storage, this.config, this.timer, this.executor);
        ProcessorCollection pc = new ProcessorCollection(newAggregator, this.createProcessors.apply(segmentMetadata));
        try {
            CompletableFuture<Void> init = newAggregator.initialize(this.config.getFlushTimeout());
            Futures.exceptionListener(init, ex -> newAggregator.close());
            return init.thenApply(ignored -> {
                this.processors.put(streamSegmentId, pc);
                return pc;
            });
        } catch (Exception ex) {
            pc.close();
            throw ex;
        }
    }
709359
@Override
  public ExtensionProcessor getLogoutProcessor()
  {
      //do not cache the processor in the webcontainer code, always return the result from security
      IWebAppSecurityCollaborator secCollab = this.collabHelper.getSecurityCollaborator();
      logoutProcessor = secCollab.getFormLogoutExtensionProcessor(this);

      return logoutProcessor;
  }
902416
public Set<? extends Processor<?, ?>> getAllProcessors() {
        IdentityHashMap<Processor<?, ?>, Void> all = new IdentityHashMap<>();
        all.put(this.getProcessor(), null);
        for (ProcessorGraphNode<?, ?> dependency: this.dependencies) {
            for (Processor<?, ?> p: dependency.getAllProcessors()) {
                all.put(p, null);
            }
        }
        return all.keySet();
    }
207354
public static <E> E get(Class<E> type) {
    ServiceLoader<E> loader = ServiceLoader.load(type);
    Iterator<E> iterator = loader.iterator();
    if (iterator.hasNext()) {
      return iterator.next(); // only one is expected
    }
    try {
      //loads the default implementation
      return (E) Class.forName(getDefaultImplementationName(type)).newInstance();
    } catch (Exception e) {
      throw new TruggerException(e);
    }
  }
136843
public static <T> ItemsUnion<T> getInstance(final Comparator<? super T> comparator) {
    return new ItemsUnion<T>(PreambleUtil.DEFAULT_K, comparator, null);
  }
1220434
public ItemProcessor<Chunk<T>> getOrCreateProcessor()
   {
      Node node = childNode.getOrCreate("processor");
      ItemProcessor<Chunk<T>> processor = new ItemProcessorImpl<Chunk<T>>(this, "processor", childNode, node);
      return processor;
   }
45903
public static ProcessHandler getDefaultHandler(Logger logger) {
    return LegacyProcessHandler.builder()
        .addStdErrLineListener(logger::lifecycle)
        .addStdOutLineListener(logger::lifecycle)
        .setExitListener(new NonZeroExceptionExitListener())
        .build();
  }
339893
@Override
	public ResourceBundlePostProcessor buildDefaultProcessorChain() {
		ChainedResourceBundlePostProcessor processor = new CSSMinPostProcessor();
		processor.addNextProcessor(buildLicensesProcessor());
		return processor;
	}
305257
function (model, options) {
                var ret;
                if (model) {
                    ret = this.getProcessorForModelClass(model.factory, options);
                }

                return ret || this.$defaultProcessor;
            }
1044037
public Iterator<PtoPMessageItemStream> getXmitQueueIterator()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getXmitQueueIterator");

    Iterator<PtoPMessageItemStream> itr = null;

    synchronized(_xmitQueuePoints)
    {
      itr = ((HashMap)_xmitQueuePoints.clone()).values().iterator();
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getXmitQueueIterator", itr);

    return itr;
  }
1167210
@Override
    public Set<IProcessor> getProcessors(String dialectPrefix) { // only once called when first access
        final Set<IProcessor> processors = createLastaProcessorsSet();
        processors.addAll(getAdditionalProcessors());
        return processors;
    }