Package org.apache.kafka.common.config
Class ConfigResource
- java.lang.Object
-
- org.apache.kafka.common.config.ConfigResource
-
public final class ConfigResource extends java.lang.ObjectA class representing resources that have configs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConfigResource.TypeType of resource.
-
Constructor Summary
Constructors Constructor Description ConfigResource(ConfigResource.Type type, java.lang.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 booleanequals(java.lang.Object o)inthashCode()booleanisDefault()Returns true if this is the default resource of a resource type.java.lang.Stringname()Return the resource name.java.lang.StringtoString()ConfigResource.Typetype()Return the resource type.
-
-
-
Constructor Detail
-
ConfigResource
public ConfigResource(ConfigResource.Type type, java.lang.String name)
Create an instance of this class with the provided parameters.- Parameters:
type- a non-null resource typename- a non-null resource name
-
-
Method Detail
-
type
public ConfigResource.Type type()
Return the resource type.
-
name
public java.lang.String name()
Return the resource name.
-
isDefault
public boolean isDefault()
Returns true if this is the default resource of a resource type. Resource name is empty for the default resource.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-