Class AbstractStaticBatchProcessorBuilder<Q,​P extends BatchProcessor<Q>,​OR>

    • Constructor Detail

      • AbstractStaticBatchProcessorBuilder

        public AbstractStaticBatchProcessorBuilder​(Supplier<? extends P> oracleSupplier)
      • AbstractStaticBatchProcessorBuilder

        public AbstractStaticBatchProcessorBuilder​(Collection<? extends P> oracles)
    • Method Detail

      • withMinBatchSize

        public AbstractStaticBatchProcessorBuilder<Q,​P,​OR> withMinBatchSize​(@org.checkerframework.checker.index.qual.NonNegative int minBatchSize)
        Sets the minimal size of batches that are submitted.
        Parameters:
        minBatchSize - the minimal size of batches
        Returns:
        this
      • withNumInstances

        public AbstractStaticBatchProcessorBuilder<Q,​P,​OR> withNumInstances​(@org.checkerframework.checker.index.qual.NonNegative int numInstances)
        Sets the number of instances that should process batches. Note that this value is ignored if the builder has been initialized with a collection of processors in order to guarantee that no unavailable resources are accessed.
        Parameters:
        numInstances - the number of instances to delegate batches to
        Returns:
        this
      • create

        public OR create()
        Create the batch processor.
        Returns:
        the batch processor
      • buildOracle

        protected abstract OR buildOracle​(Collection<? extends P> oracleInstances,
                                          int minBatchSize,
                                          ExecutorService executor)