Enum ValidationCondition

java.lang.Object
java.lang.Enum<ValidationCondition>
org.apache.hadoop.ozone.om.request.validation.ValidationCondition
All Implemented Interfaces:
Serializable, Comparable<ValidationCondition>

public enum ValidationCondition extends Enum<ValidationCondition>
Defines conditions for which validators can be assigned to. These conditions describe a situation where special request handling might be necessary. In these cases we do not override the actual request handling code, but based on certain request properties we might reject a request early, or we might modify the request, or the response received/sent from/to the client.
  • Enum Constant Details

    • CLUSTER_NEEDS_FINALIZATION

      public static final ValidationCondition CLUSTER_NEEDS_FINALIZATION
      Classifies validations that has to run after an upgrade until the cluster is in a pre-finalized state.
    • OLDER_CLIENT_REQUESTS

      public static final ValidationCondition OLDER_CLIENT_REQUESTS
      Classifies validations that has to run, when the client uses an older protocol version than the server.
  • Method Details

    • values

      public static ValidationCondition[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ValidationCondition 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 name
      NullPointerException - if the argument is null
    • shouldApply

      public abstract boolean shouldApply(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest req, ValidationContext ctx)