类 TopicName
java.lang.Object
org.apache.pulsar.common.naming.TopicName
- 所有已实现的接口:
ServiceUnitId
Encapsulate the parsing of the completeTopicName name.
-
字段概要
字段 -
方法概要
修饰符和类型方法说明booleanstatic StringfromPersistenceNamingEncoding(String mlName) get topic full name from managedLedgerName.static TopicNamestatic TopicNamestatic TopicNamestatic TopicNameget(String domain, NamespaceName namespaceName, String topic) 已过时。Get a string suitable for completeTopicName lookup.Extract the namespace portion out of a completeTopicName name.Get the namespace object that this completeTopicName belongs to.getPartition(int index) For partitions in a topic, return the base partitioned topic name.static TopicNamegetPartitionedTopicName(String topic) intstatic intgetPartitionIndex(String topic) Returns the name of the persistence resource associated with the completeTopicName.Returns the http rest path for use in the admin web service.getRestPath(boolean includeDomain) static StringgetTopicPartitionNameString(String topic, int partitionIndex) A helper method to get a partition name of a topic in String.inthashCode()booleanCheck whether a fully-qualified topic is included in thisServiceUnitIdobject.booleanisGlobal()booleanbooleanbooleanisV2()Returns true if this a V2 topic name prop/ns/topic-name.static booleantoString()
-
字段详细资料
-
方法详细资料
-
get
-
get
-
get
-
get
-
getPartitionedTopicName
-
isValid
-
isPersistent
public boolean isPersistent() -
getNamespace
Extract the namespace portion out of a completeTopicName name.Works both with old & new convention.
- 返回:
- the namespace
-
getNamespaceObject
Get the namespace object that this completeTopicName belongs to.- 指定者:
getNamespaceObject在接口中ServiceUnitId- 返回:
- namespace object
-
getDomain
-
getTenant
-
getCluster
已过时。 -
getNamespacePortion
-
getLocalName
-
getEncodedLocalName
-
getPartition
-
getPartitionIndex
public int getPartitionIndex()- 返回:
- partition index of the completeTopicName. It returns -1 if the completeTopicName (topic) is not partitioned.
-
isPartitioned
public boolean isPartitioned() -
getPartitionedTopicName
For partitions in a topic, return the base partitioned topic name. Eg:persistent://prop/cluster/ns/my-topic-partition-1-->persistent://prop/cluster/ns/my-topicpersistent://prop/cluster/ns/my-topic-->persistent://prop/cluster/ns/my-topic
-
getPartitionIndex
- 返回:
- partition index of the completeTopicName. It returns -1 if the completeTopicName (topic) is not partitioned.
-
getTopicPartitionNameString
A helper method to get a partition name of a topic in String.- 返回:
- topic + "-partition-" + partition.
-
getRestPath
Returns the http rest path for use in the admin web service. Eg: * "persistent/my-tenant/my-namespace/my-topic" * "non-persistent/my-tenant/my-namespace/my-topic"- 返回:
- topic rest path
-
getRestPath
-
getPersistenceNamingEncoding
Returns the name of the persistence resource associated with the completeTopicName.- 返回:
- the relative path to be used in persistence
-
fromPersistenceNamingEncoding
get topic full name from managedLedgerName.- 返回:
- the topic full name, format -> domain://tenant/namespace/topic
-
getLookupName
Get a string suitable for completeTopicName lookup.Example:
persistent://tenant/cluster/namespace/completeTopicName -> persistent/tenant/cluster/namespace/completeTopicName
- 返回:
-
isGlobal
public boolean isGlobal() -
getSchemaName
-
toString
- 指定者:
toString在接口中ServiceUnitId- 覆盖:
toString在类中Object
-
equals
-
hashCode
public int hashCode() -
includes
从接口复制的说明:ServiceUnitIdCheck whether a fully-qualified topic is included in thisServiceUnitIdobject.- 指定者:
includes在接口中ServiceUnitId- 参数:
otherTopicName- a fully-qualified topic object- 返回:
- true or false
-
isV2
public boolean isV2()Returns true if this a V2 topic name prop/ns/topic-name.- 返回:
- true if V2
-