Enum Class S3AInputPolicy

java.lang.Object
java.lang.Enum<S3AInputPolicy>
org.apache.hadoop.fs.s3a.S3AInputPolicy
All Implemented Interfaces:
Serializable, Comparable<S3AInputPolicy>, Constable

@Private @Unstable public enum S3AInputPolicy extends Enum<S3AInputPolicy>
Stream input policy.
  • Enum Constant Details

  • Method Details

    • values

      public static S3AInputPolicy[] 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

      public static S3AInputPolicy valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<S3AInputPolicy>
    • getPolicy

      public static S3AInputPolicy getPolicy(String name, @Nullable S3AInputPolicy defaultPolicy)
      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 defaultPolicy was "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