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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static NamespaceName
static NamespaceName
static NamespaceName
Deprecated.static Optional<NamespaceName>
getIfValid
(String namespace) Return the namespace object that thisServiceUnitId
belongs to.getPersistentTopicName
(String localTopic) int
hashCode()
boolean
Check whether a fully-qualified topic is included in thisServiceUnitId
object.boolean
isGlobal()
boolean
isV2()
Returns true if this is a V2 namespace prop/namespace-name.toString()
static void
validateNamespaceName
(String tenant, String namespace) static void
validateNamespaceName
(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:
toString
in interfaceServiceUnitId
- Overrides:
toString
in classObject
-
equals
-
hashCode
public int hashCode() -
validateNamespaceName
-
validateNamespaceName
-
getNamespaceObject
Description copied from interface:ServiceUnitId
Return the namespace object that thisServiceUnitId
belongs to.- Specified by:
getNamespaceObject
in interfaceServiceUnitId
- Returns:
- NamespaceName object
-
includes
Description copied from interface:ServiceUnitId
Check whether a fully-qualified topic is included in thisServiceUnitId
object.- Specified by:
includes
in 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
-