public abstract class SplitRunner<S extends Splittable<S>> extends Object
Constructor and Description |
---|
SplitRunner() |
Modifier and Type | Method and Description |
---|---|
abstract <A> A |
collect(SplitCollector<S,A> collector,
java.util.function.Supplier<S> splitSupplier)
Performs a collection operation.
|
abstract <A> A |
collectPool(SplitCollector<S,A> collector,
java.util.function.Supplier<S> splitSupplier)
Performs a collection operation with a hint that accumulator pooling
is recommended.
|
static <S extends Splittable<S>> |
createBenchRunner()
Returns an instance that invokes multiple SplitProcessor instances
of different types and reports comparative timings to stdout.
|
static <S extends Splittable<S>> |
createDefaultRunner()
Returns an instance that uses SplitProcessor instances in the normal way
with the default concurrency policy.
|
static <S extends Splittable<S>> |
createSequentialRunner()
Returns an instance that performs single-threaded sequential
execution.
|
static <S extends Splittable<S>> |
createStandardRunner(SplitPolicy policy)
Returns an instance that uses SplitProcessor instances in the normal way
with a given concurrency policy.
|
abstract boolean |
willAttemptSplit(S content)
Indicates whether an attempt will be made to split a top-level
splittable in order to process it.
|
public abstract <A> A collect(SplitCollector<S,A> collector, java.util.function.Supplier<S> splitSupplier)
collector
- collectorsplitSupplier
- supplier for splittable object to processpublic abstract <A> A collectPool(SplitCollector<S,A> collector, java.util.function.Supplier<S> splitSupplier)
collector
- collectorsplitSupplier
- supplier for splittable object to processpublic abstract boolean willAttemptSplit(S content)
content
- splittablepublic static <S extends Splittable<S>> SplitRunner<S> createDefaultRunner()
public static <S extends Splittable<S>> SplitRunner<S> createStandardRunner(SplitPolicy policy)
policy
- concurrency policypublic static <S extends Splittable<S>> SplitRunner<S> createBenchRunner()
public static <S extends Splittable<S>> SplitRunner<S> createSequentialRunner()
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.