Package org.apache.kafka.common.acl
Enum AclOperation
- All Implemented Interfaces:
Serializable
,Comparable<AclOperation>
,Constable
@Evolving public enum AclOperation extends Enum<AclOperation>
Represents an operation which an ACL grants or denies permission to perform.
Some operations imply other operations:
ALLOW ALL
impliesALLOW
everythingDENY ALL
impliesDENY
everythingALLOW READ
impliesALLOW DESCRIBE
ALLOW WRITE
impliesALLOW DESCRIBE
ALLOW DELETE
impliesALLOW DESCRIBE
ALLOW ALTER
impliesALLOW DESCRIBE
ALLOW ALTER_CONFIGS
impliesALLOW DESCRIBE_CONFIGS
-
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 ALL
ALL operation.ALTER
ALTER operation.ALTER_CONFIGS
ALTER_CONFIGS operation.ANY
In a filter, matches any AclOperation.CLUSTER_ACTION
CLUSTER_ACTION operation.CREATE
CREATE operation.DELETE
DELETE operation.DESCRIBE
DESCRIBE operation.DESCRIBE_CONFIGS
DESCRIBE_CONFIGS operation.IDEMPOTENT_WRITE
IDEMPOTENT_WRITE operation.READ
READ operation.UNKNOWN
Represents any AclOperation which this client cannot understand, perhaps because this client is too old.WRITE
WRITE operation. -
Method Summary
Modifier and Type Method Description byte
code()
Return the code of this operation.static AclOperation
fromCode(byte code)
Return the AclOperation with the provided code or `AclOperation.UNKNOWN` if one cannot be found.static AclOperation
fromString(String str)
Parse the given string as an ACL operation.boolean
isUnknown()
Return true if this operation is UNKNOWN.static AclOperation
valueOf(String name)
Returns the enum constant of this type with the specified name.static AclOperation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
Represents any AclOperation which this client cannot understand, perhaps because this client is too old. -
ANY
In a filter, matches any AclOperation. -
ALL
ALL operation. -
READ
READ operation. -
WRITE
WRITE operation. -
CREATE
CREATE operation. -
DELETE
DELETE operation. -
ALTER
ALTER operation. -
DESCRIBE
DESCRIBE operation. -
CLUSTER_ACTION
CLUSTER_ACTION operation. -
DESCRIBE_CONFIGS
DESCRIBE_CONFIGS operation. -
ALTER_CONFIGS
ALTER_CONFIGS operation. -
IDEMPOTENT_WRITE
IDEMPOTENT_WRITE operation.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
fromString
Parse the given string as an ACL operation.- Parameters:
str
- The string to parse.- Returns:
- The AclOperation, or UNKNOWN if the string could not be matched.
- Throws:
IllegalArgumentException
-
fromCode
Return the AclOperation with the provided code or `AclOperation.UNKNOWN` if one cannot be found. -
code
public byte code()Return the code of this operation. -
isUnknown
public boolean isUnknown()Return true if this operation is UNKNOWN.
-