Enum ChainingStrategy
- java.lang.Object
-
- java.lang.Enum<ChainingStrategy>
-
- org.apache.flink.streaming.api.operators.ChainingStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<ChainingStrategy>
@PublicEvolving public enum ChainingStrategy extends Enum<ChainingStrategy>
Defines the chaining scheme for the operator. When an operator is chained to the predecessor, it means that they run in the same thread. They become one operator consisting of multiple steps.The default value used by the StreamOperator is
HEAD
, which means that the operator is not chained to its predecessor. Most operators override this withALWAYS
, meaning they will be chained to predecessors whenever possible.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALWAYS
Operators will be eagerly chained whenever possible.HEAD
The operator will not be chained to the predecessor, but successors may chain to this operator.HEAD_WITH_SOURCES
This operator will run at the head of a chain (similar as inHEAD
, but it will additionally try to chain source inputs if possible.NEVER
The operator will not be chained to the preceding or succeeding operators.
-
Field Summary
Fields Modifier and Type Field Description static ChainingStrategy
DEFAULT_CHAINING_STRATEGY
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ChainingStrategy
valueOf(String name)
Returns the enum constant of this type with the specified name.static ChainingStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALWAYS
public static final ChainingStrategy ALWAYS
Operators will be eagerly chained whenever possible.To optimize performance, it is generally a good practice to allow maximal chaining and increase operator parallelism.
-
NEVER
public static final ChainingStrategy NEVER
The operator will not be chained to the preceding or succeeding operators.
-
HEAD
public static final ChainingStrategy HEAD
The operator will not be chained to the predecessor, but successors may chain to this operator.
-
HEAD_WITH_SOURCES
public static final ChainingStrategy HEAD_WITH_SOURCES
This operator will run at the head of a chain (similar as inHEAD
, but it will additionally try to chain source inputs if possible. This allows multi-input operators to be chained with multiple sources into one task.
-
-
Field Detail
-
DEFAULT_CHAINING_STRATEGY
public static final ChainingStrategy DEFAULT_CHAINING_STRATEGY
-
-
Method Detail
-
values
public static ChainingStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ChainingStrategy c : ChainingStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ChainingStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-