Package org.apache.hadoop.fs.s3a
Enum Class S3AInputPolicy
- All Implemented Interfaces:
Serializable,Comparable<S3AInputPolicy>,Constable
Stream input policy.
-
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
Modifier and TypeMethodDescriptionstatic S3AInputPolicygetFirstSupportedPolicy(Collection<String> policies, S3AInputPolicy defaultPolicy) Scan the list of input policies, returning the first one supported.static S3AInputPolicygetPolicy(String name, S3AInputPolicy defaultPolicy) Choose an access policy.toString()static S3AInputPolicyReturns the enum constant of this class with the specified name.static S3AInputPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Normal
-
Random
-
Sequential
-
-
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
-
toString
- Overrides:
toStringin classEnum<S3AInputPolicy>
-
getPolicy
Choose an access policy.- Parameters:
name- strategy name from a configuration option, etc.defaultPolicy- default policy to fall back to.- Returns:
- the chosen strategy or null if there was no match and
the value of
defaultPolicywas "null".
-
getFirstSupportedPolicy
public static S3AInputPolicy getFirstSupportedPolicy(Collection<String> policies, @Nullable S3AInputPolicy defaultPolicy) Scan the list of input policies, returning the first one supported.- Parameters:
policies- list of policies.defaultPolicy- fallback- Returns:
- a policy or the defaultPolicy, which may be null
-