public class ProduceExecuteConsume extends Object implements ExecutionStrategy
A strategy where the caller thread iterates over task production, submitting each
task to an Executor for execution.
ExecutionStrategy.Producer| Constructor and Description |
|---|
ProduceExecuteConsume(ExecutionStrategy.Producer producer,
Executor executor) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispatch()
Initiates (or resumes) the task production and consumption.
|
void |
produce()
Initiates (or resumes) the task production and consumption.
|
public ProduceExecuteConsume(ExecutionStrategy.Producer producer, Executor executor)
public void produce()
ExecutionStrategyInitiates (or resumes) the task production and consumption.
The produced task may be run by the same thread that called this method.
produce in interface ExecutionStrategyExecutionStrategy.dispatch()public void dispatch()
ExecutionStrategyInitiates (or resumes) the task production and consumption.
This method guarantees that the task is never run by the thread that called this method.
TODO review the need for this (only used by HTTP2 push)dispatch in interface ExecutionStrategyExecutionStrategy.produce()Copyright © 2010 - 2020 Adobe. All Rights Reserved