Enum Class AclState

java.lang.Object
java.lang.Enum<AclState>
org.apache.kafka.common.acl.AclState
All Implemented Interfaces:
Serializable, Comparable<AclState>, Constable

public enum AclState extends Enum<AclState>
Represents the state of an ACL. Used to perform operations on ACLs based on their state(Active/Deleted or Any) Lifecycle of AclState : ACTIVE(ACLs are active it will be used in authorization -> DELETED (ACLs are still stored but will not be used in authorization) -> Hard Delete (ACLs are removed from the underlying store). The API for this class is still evolving, and we may break compatibility in minor releases, if necessary.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Represents the active state of an ACL.
    Used in delete/describe requests when we want to work with ACLs independent of their state.
    Represents the inactive state of an ACL When an ACL is soft-deleted, it's state changes to this.
    Represents any AclOperation which this client cannot understand, perhaps because this client is too old.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte
    Return the code of this operation.
    static AclState
    fromCode(byte code)
    Returns the AclState with the provided code.
    boolean
    Returns true if the ACL is an active ACL.
    boolean
    Returns true if the ACL is deleted and is in inactive state.
    boolean
    Returns true if the ACL is in Unknown State
    static AclState
    Returns the enum constant of this class with the specified name.
    static AclState[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • UNKNOWN

      public static final AclState UNKNOWN
      Represents any AclOperation which this client cannot understand, perhaps because this client is too old.
    • ACTIVE

      public static final AclState ACTIVE
      Represents the active state of an ACL.
    • DELETED

      public static final AclState DELETED
      Represents the inactive state of an ACL When an ACL is soft-deleted, it's state changes to this.
    • ANY

      public static final AclState ANY
      Used in delete/describe requests when we want to work with ACLs independent of their state.
  • Method Details

    • values

      public static AclState[] 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 AclState 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
    • code

      public byte code()
      Return the code of this operation.
    • fromCode

      public static AclState fromCode(byte code)
      Returns the AclState with the provided code.
    • isActive

      public boolean isActive()
      Returns true if the ACL is an active ACL.
    • isDeleted

      public boolean isDeleted()
      Returns true if the ACL is deleted and is in inactive state.
    • isUnknown

      public boolean isUnknown()
      Returns true if the ACL is in Unknown State