Package org.apache.kafka.common.acl
Enum AclOperation
- java.lang.Object
-
- java.lang.Enum<AclOperation>
-
- org.apache.kafka.common.acl.AclOperation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AclOperation>
@Evolving public enum AclOperation extends java.lang.Enum<AclOperation>
Represents an operation which an ACL grants or denies permission to perform. Some operations imply other operations. ALLOW ALL implies ALLOW everything DENY ALL implies DENY everything ALLOW READ implies ALLOW DESCRIBE ALLOW WRITE implies ALLOW DESCRIBE ALLOW DELETE implies ALLOW DESCRIBE ALLOW ALTER implies ALLOW DESCRIBE ALLOW ALTER_CONFIGS implies ALLOW DESCRIBE_CONFIGS The API for this class is still evolving and we may break compatibility in minor releases, if necessary.
-
-
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
All Methods Static Methods Instance Methods Concrete Methods 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(java.lang.String str)
Parse the given string as an ACL operation.boolean
isUnknown()
Return true if this operation is UNKNOWN.static AclOperation
valueOf(java.lang.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 Detail
-
UNKNOWN
public static final AclOperation UNKNOWN
Represents any AclOperation which this client cannot understand, perhaps because this client is too old.
-
ANY
public static final AclOperation ANY
In a filter, matches any AclOperation.
-
ALL
public static final AclOperation ALL
ALL operation.
-
READ
public static final AclOperation READ
READ operation.
-
WRITE
public static final AclOperation WRITE
WRITE operation.
-
CREATE
public static final AclOperation CREATE
CREATE operation.
-
DELETE
public static final AclOperation DELETE
DELETE operation.
-
ALTER
public static final AclOperation ALTER
ALTER operation.
-
DESCRIBE
public static final AclOperation DESCRIBE
DESCRIBE operation.
-
CLUSTER_ACTION
public static final AclOperation CLUSTER_ACTION
CLUSTER_ACTION operation.
-
DESCRIBE_CONFIGS
public static final AclOperation DESCRIBE_CONFIGS
DESCRIBE_CONFIGS operation.
-
ALTER_CONFIGS
public static final AclOperation ALTER_CONFIGS
ALTER_CONFIGS operation.
-
IDEMPOTENT_WRITE
public static final AclOperation IDEMPOTENT_WRITE
IDEMPOTENT_WRITE operation.
-
-
Method Detail
-
values
public static AclOperation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AclOperation c : AclOperation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AclOperation valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
fromString
public static AclOperation fromString(java.lang.String str) throws java.lang.IllegalArgumentException
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:
java.lang.IllegalArgumentException
-
fromCode
public static AclOperation fromCode(byte code)
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.
-
-