public class ComputationPool extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
ComputationPool.NamedThreadFactory |
Modifier and Type | Field and Description |
---|---|
protected List<List<LogPartition>> |
defaultAssignments |
protected Codec<Record> |
inputCodec |
protected LogManager |
manager |
protected ComputationMetadataMapping |
metadata |
protected Codec<Record> |
outputCodec |
protected ComputationPolicy |
policy |
protected List<ComputationRunner> |
runners |
protected Supplier<Computation> |
supplier |
protected ExecutorService |
threadPool |
protected int |
threads |
Constructor and Description |
---|
ComputationPool(Supplier<Computation> supplier,
ComputationMetadataMapping metadata,
List<List<LogPartition>> defaultAssignments,
LogManager manager,
Codec<Record> inputCodec,
Codec<Record> outputCodec,
ComputationPolicy policy) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
awaitPoolTermination(Duration timeout) |
boolean |
drainAndStop(Duration timeout) |
String |
getComputationName() |
long |
getLowWatermark() |
boolean |
isTerminated() |
void |
shutdown() |
void |
start() |
boolean |
stop(Duration timeout) |
boolean |
waitForAssignments(Duration timeout) |
protected final ComputationMetadataMapping metadata
protected final int threads
protected final LogManager manager
protected final Supplier<Computation> supplier
protected final List<List<LogPartition>> defaultAssignments
protected final List<ComputationRunner> runners
protected final Codec<Record> inputCodec
protected final Codec<Record> outputCodec
protected final ComputationPolicy policy
protected ExecutorService threadPool
public ComputationPool(Supplier<Computation> supplier, ComputationMetadataMapping metadata, List<List<LogPartition>> defaultAssignments, LogManager manager, Codec<Record> inputCodec, Codec<Record> outputCodec, ComputationPolicy policy)
public String getComputationName()
public void start()
public boolean isTerminated()
public boolean waitForAssignments(Duration timeout) throws InterruptedException
InterruptedException
public boolean drainAndStop(Duration timeout)
public void shutdown()
protected boolean awaitPoolTermination(Duration timeout)
public long getLowWatermark()
Copyright © 2019 Nuxeo. All rights reserved.