public class ProduceExecuteConsume extends ExecutingExecutionStrategy implements ExecutionStrategy
A strategy where the caller thread iterates over task production, submitting each
task to an Executor for execution.
| Modifier and Type | Class and Description |
|---|---|
static class |
ProduceExecuteConsume.Factory |
ExecutionStrategy.DefaultExecutionStrategyFactory, ExecutionStrategy.Producer| Constructor and Description |
|---|
ProduceExecuteConsume(ExecutionStrategy.Producer producer,
Executor executor) |
ProduceExecuteConsume(ExecutionStrategy.Producer producer,
Executor executor,
Invocable.InvocationType preferred) |
| 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.
|
execute, getPreferredInvocationType, invokepublic ProduceExecuteConsume(ExecutionStrategy.Producer producer, Executor executor)
public ProduceExecuteConsume(ExecutionStrategy.Producer producer, Executor executor, Invocable.InvocationType preferred)
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 © 1995–2017 Webtide. All rights reserved.