Package org.apache.kafka.common.resource
Class ResourceFilter
- java.lang.Object
-
- org.apache.kafka.common.resource.ResourceFilter
-
-
Field Summary
Fields Modifier and Type Field Description static ResourceFilter
ANY
Matches any resource.
-
Constructor Summary
Constructors Constructor Description ResourceFilter(ResourceType resourceType, String name)
Create an instance of this class with the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
findIndefiniteField()
Return a string describing an ANY or UNKNOWN field, or null if there is no such field.int
hashCode()
boolean
isUnknown()
Return true if this ResourceFilter has any UNKNOWN components.boolean
matches(Resource other)
Return true if this filter matches the given Resource.boolean
matchesAtMostOne()
Return true if this filter could only match one ACE.String
name()
Return the resource name or null.ResourceType
resourceType()
Return the resource type.String
toString()
-
-
-
Field Detail
-
ANY
public static final ResourceFilter ANY
Matches any resource.
-
-
Constructor Detail
-
ResourceFilter
public ResourceFilter(ResourceType resourceType, String name)
Create an instance of this class with the provided parameters.- Parameters:
resourceType
- non-null resource typename
- resource name or null
-
-
Method Detail
-
resourceType
public ResourceType resourceType()
Return the resource type.
-
name
public String name()
Return the resource name or null.
-
isUnknown
public boolean isUnknown()
Return true if this ResourceFilter has any UNKNOWN components.
-
matches
public boolean matches(Resource other)
Return true if this filter matches the given Resource.
-
matchesAtMostOne
public boolean matchesAtMostOne()
Return true if this filter could only match one ACE. In other words, if there are no ANY or UNKNOWN fields.
-
findIndefiniteField
public String findIndefiniteField()
Return a string describing an ANY or UNKNOWN field, or null if there is no such field.
-
-