Top Description Inners Fields Constructors Methods
org.eclipse.jetty.util.thread.strategy

public Class ProduceExecuteConsume

extends Object
implements ExecutionStrategy
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.util.thread.ExecutionStrategy
Imports
java.util.concurrent.Executor, org.eclipse.jetty.util.thread.AutoLock, .ExecutionStrategy, .Invocable, .Invocable.InvocationType, org.slf4j.Logger, .LoggerFactory

A strategy where the caller thread iterates over task production, submitting each task to an Executor for execution.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum

Field Summary

Modifier and TypeField and Description
private final Executor
private final AutoLock
private final ExecutionStrategy.Producer
private ProduceExecuteConsume.State
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
dispatch()

Implements org.eclipse.jetty.util.thread.ExecutionStrategy.dispatch.

Initiates (or resumes) the task production and consumption.

public void
produce()

Implements org.eclipse.jetty.util.thread.ExecutionStrategy.produce.

Initiates (or resumes) the task production and consumption.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_executorback to summary
private final Executor _executor
_lockback to summary
private final AutoLock _lock
_producerback to summary
private final ExecutionStrategy.Producer _producer
_stateback to summary
private ProduceExecuteConsume.State _state
LOGback to summary
private static final Logger LOG

Constructor Detail

ProduceExecuteConsumeback to summary
public ProduceExecuteConsume(ExecutionStrategy.Producer producer, Executor executor)

Method Detail

dispatchback to summary
public void dispatch()

Implements org.eclipse.jetty.util.thread.ExecutionStrategy.dispatch.

Doc from org.eclipse.jetty.util.thread.ExecutionStrategy.dispatch.

Initiates (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)
Annotations
@Override
produceback to summary
public void produce()

Implements org.eclipse.jetty.util.thread.ExecutionStrategy.produce.

Doc from org.eclipse.jetty.util.thread.ExecutionStrategy.produce.

Initiates (or resumes) the task production and consumption.

The produced task may be run by the same thread that called this method.

Annotations
@Override
org.eclipse.jetty.util.thread.strategy back to summary

private final Enum ProduceExecuteConsume.State

extends Enum<ProduceExecuteConsume.State>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ProduceExecuteConsume.State
public static final ProduceExecuteConsume.State
public static final ProduceExecuteConsume.State

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ProduceExecuteConsume.State
public static ProduceExecuteConsume.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

EXECUTEback to summary
public static final ProduceExecuteConsume.State EXECUTE
IDLEback to summary
public static final ProduceExecuteConsume.State IDLE
PRODUCEback to summary
public static final ProduceExecuteConsume.State PRODUCE

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static ProduceExecuteConsume.State valueOf(String name)
valuesback to summary
public static ProduceExecuteConsume.State[] values()