public class BoundedInMemoryExecutor<I,O,E> extends Object
| Constructor and Description |
|---|
BoundedInMemoryExecutor(long bufferLimitInBytes,
BoundedInMemoryQueueProducer<I> producer,
Option<BoundedInMemoryQueueConsumer<O,E>> consumer,
Function<I,O> transformFunction) |
BoundedInMemoryExecutor(long bufferLimitInBytes,
BoundedInMemoryQueueProducer<I> producer,
Option<BoundedInMemoryQueueConsumer<O,E>> consumer,
Function<I,O> transformFunction,
Runnable preExecuteRunnable) |
BoundedInMemoryExecutor(long bufferLimitInBytes,
Iterator<I> inputItr,
BoundedInMemoryQueueConsumer<O,E> consumer,
Function<I,O> transformFunction,
Runnable preExecuteRunnable) |
BoundedInMemoryExecutor(long bufferLimitInBytes,
List<BoundedInMemoryQueueProducer<I>> producers,
Option<BoundedInMemoryQueueConsumer<O,E>> consumer,
Function<I,O> transformFunction,
SizeEstimator<O> sizeEstimator,
Runnable preExecuteRunnable) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination() |
E |
execute()
Main API to run both production and consumption.
|
BoundedInMemoryQueue<I,O> |
getQueue() |
boolean |
isRemaining() |
void |
shutdownNow() |
ExecutorCompletionService<Boolean> |
startProducers()
Start all Producers.
|
public BoundedInMemoryExecutor(long bufferLimitInBytes,
Iterator<I> inputItr,
BoundedInMemoryQueueConsumer<O,E> consumer,
Function<I,O> transformFunction,
Runnable preExecuteRunnable)
public BoundedInMemoryExecutor(long bufferLimitInBytes,
BoundedInMemoryQueueProducer<I> producer,
Option<BoundedInMemoryQueueConsumer<O,E>> consumer,
Function<I,O> transformFunction)
public BoundedInMemoryExecutor(long bufferLimitInBytes,
BoundedInMemoryQueueProducer<I> producer,
Option<BoundedInMemoryQueueConsumer<O,E>> consumer,
Function<I,O> transformFunction,
Runnable preExecuteRunnable)
public BoundedInMemoryExecutor(long bufferLimitInBytes,
List<BoundedInMemoryQueueProducer<I>> producers,
Option<BoundedInMemoryQueueConsumer<O,E>> consumer,
Function<I,O> transformFunction,
SizeEstimator<O> sizeEstimator,
Runnable preExecuteRunnable)
public ExecutorCompletionService<Boolean> startProducers()
public E execute()
public boolean isRemaining()
public void shutdownNow()
public boolean awaitTermination()
public BoundedInMemoryQueue<I,O> getQueue()
Copyright © 2022 The Apache Software Foundation. All rights reserved.