Package org.apache.pulsar.common.naming
Class NamespaceName
java.lang.Object
org.apache.pulsar.common.naming.NamespaceName
- All Implemented Interfaces:
ServiceUnitId
Parser of a value from the namespace field provided in configuration.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic NamespaceNamestatic NamespaceNamestatic NamespaceNameDeprecated.static Optional<NamespaceName>getIfValid(String namespace) Return the namespace object that thisServiceUnitIdbelongs to.getPersistentTopicName(String localTopic) inthashCode()booleanCheck whether a fully-qualified topic is included in thisServiceUnitIdobject.booleanisGlobal()booleanisV2()Returns true if this is a V2 namespace prop/namespace-name.toString()static voidvalidateNamespaceName(String tenant, String namespace) static voidvalidateNamespaceName(String tenant, String cluster, String namespace)
-
Field Details
-
SYSTEM_NAMESPACE
-
-
Method Details
-
get
-
get
-
get
-
getIfValid
-
getTenant
-
getCluster
Deprecated. -
getLocalName
-
isGlobal
public boolean isGlobal() -
getPersistentTopicName
-
toString
- Specified by:
toStringin interfaceServiceUnitId- Overrides:
toStringin classObject
-
equals
-
hashCode
public int hashCode() -
validateNamespaceName
-
validateNamespaceName
-
getNamespaceObject
Description copied from interface:ServiceUnitIdReturn the namespace object that thisServiceUnitIdbelongs to.- Specified by:
getNamespaceObjectin interfaceServiceUnitId- Returns:
- NamespaceName object
-
includes
Description copied from interface:ServiceUnitIdCheck whether a fully-qualified topic is included in thisServiceUnitIdobject.- Specified by:
includesin interfaceServiceUnitId- Parameters:
topicName- a fully-qualified topic object- Returns:
- true or false
-
isV2
public boolean isV2()Returns true if this is a V2 namespace prop/namespace-name.- Returns:
- true if v2
-