Enum StateDeclaration.RedistributionMode
- java.lang.Object
-
- java.lang.Enum<StateDeclaration.RedistributionMode>
-
- org.apache.flink.api.common.state.StateDeclaration.RedistributionMode
-
- All Implemented Interfaces:
Serializable,Comparable<StateDeclaration.RedistributionMode>
- Enclosing interface:
- StateDeclaration
@Experimental public static enum StateDeclaration.RedistributionMode extends Enum<StateDeclaration.RedistributionMode>
StateDeclaration.RedistributionModeis used to indicate whether this state supports redistribution between partitions and how to redistribute this state during rescaling.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description IDENTICALStates are guranteed to be identical in different partitions, thus redistribution is not a problem.NONENot supports redistribution.REDISTRIBUTABLEThis state can be safely redistributed between different partitions, and the specific redistribution strategy is determined by the state itself.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StateDeclaration.RedistributionModevalueOf(String name)Returns the enum constant of this type with the specified name.static StateDeclaration.RedistributionMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final StateDeclaration.RedistributionMode NONE
Not supports redistribution.For example : KeyedState is bind to a specific keyGroup, so it is can't support redistribution between partitions.
-
REDISTRIBUTABLE
public static final StateDeclaration.RedistributionMode REDISTRIBUTABLE
This state can be safely redistributed between different partitions, and the specific redistribution strategy is determined by the state itself.For example: ListState's redistribution algorithm is determined by
ListStateDeclaration.RedistributionStrategy.
-
IDENTICAL
public static final StateDeclaration.RedistributionMode IDENTICAL
States are guranteed to be identical in different partitions, thus redistribution is not a problem.
-
-
Method Detail
-
values
public static StateDeclaration.RedistributionMode[] 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 (StateDeclaration.RedistributionMode c : StateDeclaration.RedistributionMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StateDeclaration.RedistributionMode 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
-
-