Class ComputationPool
java.lang.Object
org.nuxeo.lib.stream.computation.log.ComputationPool
Pool of ComputationRunner
- Since:
- 9.3
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected final List<List<LogPartition>>
protected final ComputationMetadataMapping
protected final ComputationPolicy
protected final List<ComputationRunner>
protected final LogStreamManager
protected final Supplier<Computation>
protected ExecutorService
protected final int
-
Constructor Summary
ConstructorDescriptionComputationPool
(Supplier<Computation> supplier, ComputationMetadataMapping metadata, List<List<LogPartition>> defaultAssignments, LogStreamManager streamManager, ComputationPolicy policy) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
awaitPoolTermination
(Duration timeout) boolean
drainAndStop
(Duration timeout) long
boolean
void
shutdown()
void
start()
boolean
boolean
waitForAssignments
(Duration timeout)
-
Field Details
-
metadata
-
threads
protected final int threads -
supplier
-
defaultAssignments
-
runners
-
streamManager
-
policy
-
threadPool
-
-
Constructor Details
-
ComputationPool
public ComputationPool(Supplier<Computation> supplier, ComputationMetadataMapping metadata, List<List<LogPartition>> defaultAssignments, LogStreamManager streamManager, ComputationPolicy policy)
-
-
Method Details
-
getComputationName
-
start
public void start() -
isTerminated
public boolean isTerminated() -
waitForAssignments
- Throws:
InterruptedException
-
drainAndStop
-
stop
-
shutdown
public void shutdown() -
awaitPoolTermination
-
getLowWatermark
public long getLowWatermark()
-