Package org.apache.kafka.common.quota
Class ClientQuotaFilterComponent
- java.lang.Object
-
- org.apache.kafka.common.quota.ClientQuotaFilterComponent
-
public class ClientQuotaFilterComponent extends Object
Describes a component for applying a client quota filter.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
entityType()
boolean
equals(Object o)
int
hashCode()
Optional<String>
match()
static ClientQuotaFilterComponent
ofDefaultEntity(String entityType)
Constructs and returns a filter component that matches the built-in default entity name for the entity type.static ClientQuotaFilterComponent
ofEntity(String entityType, String entityName)
Constructs and returns a filter component that exactly matches the provided entity name for the entity type.static ClientQuotaFilterComponent
ofEntityType(String entityType)
Constructs and returns a filter component that matches any specified name for the entity type.String
toString()
-
-
-
Method Detail
-
ofEntity
public static ClientQuotaFilterComponent ofEntity(String entityType, String entityName)
Constructs and returns a filter component that exactly matches the provided entity name for the entity type.- Parameters:
entityType
- the entity type the filter component applies toentityName
- the entity name that's matched exactly
-
ofDefaultEntity
public static ClientQuotaFilterComponent ofDefaultEntity(String entityType)
Constructs and returns a filter component that matches the built-in default entity name for the entity type.- Parameters:
entityType
- the entity type the filter component applies to
-
ofEntityType
public static ClientQuotaFilterComponent ofEntityType(String entityType)
Constructs and returns a filter component that matches any specified name for the entity type.- Parameters:
entityType
- the entity type the filter component applies to
-
entityType
public String entityType()
- Returns:
- the component's entity type
-
match
public Optional<String> match()
- Returns:
- the optional match string, where: if present, the name that's matched exactly if empty, matches the default name if null, matches any specified name
-
-