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 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) |
| 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 ExecutorService threadPool
public ComputationPool(Supplier<Computation> supplier, ComputationMetadataMapping metadata, List<List<LogPartition>> defaultAssignments, LogManager manager, Codec<Record> inputCodec, Codec<Record> outputCodec)
public String getComputationName()
public void start()
public boolean isTerminated()
public boolean waitForAssignments(Duration timeout) throws InterruptedException
InterruptedExceptionpublic boolean drainAndStop(Duration timeout)
public void shutdown()
protected boolean awaitPoolTermination(Duration timeout)
public long getLowWatermark()
Copyright © 2018 Nuxeo. All rights reserved.