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 LogManager |
manager |
protected ComputationMetadataMapping |
metadata |
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) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
awaitPoolTermination(Duration timeout) |
boolean |
drainAndStop(Duration timeout) |
String |
getComputationName() |
long |
getLowWatermark() |
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 ExecutorService threadPool
public ComputationPool(Supplier<Computation> supplier, ComputationMetadataMapping metadata, List<List<LogPartition>> defaultAssignments, LogManager manager)
public String getComputationName()
public void start()
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 © 2018 Nuxeo. All rights reserved.