Enum Class Strategy
- All Implemented Interfaces:
Serializable
,Comparable<Strategy>
,Constable
An enum that defines the distribution strategy.
The following strategies are supported:
- Hash: Uses the hash value of the expression to distribute data.
- Range: Uses the range of the expression specified to distribute data.
- Even: Distributes data evenly across partitions.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
NONE
No distribution strategy. This is the default strategy. Will depend on the allocation strategy of the underlying system. -
HASH
Uses the hash value of the expression to distribute data. -
RANGE
Uses the range of the expression specified to distribute data. The range is specified using the rangeStart and rangeEnd properties. -
EVEN
Distributes data evenly across partitions.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getByName
Get the distribution strategy by name.- Parameters:
name
- The name of the distribution strategy.- Returns:
- The distribution strategy.
-