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.Factory, 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 execution.
|
void |
execute()
Initiates (or resumes) the task production and execution.
|
public ProduceExecuteConsume(ExecutionStrategy.Producer producer, Executor executor)
public void execute()
ExecutionStrategyInitiates (or resumes) the task production and execution.
The produced task may be run by the same thread that called this method.
execute in interface ExecutionStrategyExecutionStrategy.dispatch()public void dispatch()
ExecutionStrategyInitiates (or resumes) the task production and execution.
This method guarantees that the task is never run by the thread that called this method.
dispatch in interface ExecutionStrategyExecutionStrategy.execute()Copyright © 1995-2015 Webtide. All Rights Reserved.