Package org.apache.kafka.common.acl
Enum Class AclState
- All Implemented Interfaces:
Serializable
,Comparable<AclState>
,Constable
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 ConstantsEnum ConstantDescriptionRepresents 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 TypeMethodDescriptionbyte
code()
Return the code of this operation.static AclState
fromCode
(byte code) Returns the AclState with the provided code.boolean
isActive()
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 Statestatic AclState
Returns the enum constant of this class with the specified name.static AclState[]
values()
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
-
Enum Constant Details
-
UNKNOWN
Represents any AclOperation which this client cannot understand, perhaps because this client is too old. -
ACTIVE
Represents the active state of an ACL. -
DELETED
Represents the inactive state of an ACL When an ACL is soft-deleted, it's state changes to this. -
ANY
Used in delete/describe requests when we want to work with ACLs independent of their state.
-
-
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
-
code
public byte code()Return the code of this operation. -
fromCode
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
-