类 HttpLookupService

  • 所有已实现的接口:
    java.lang.AutoCloseable, LookupService

    public class HttpLookupService
    extends java.lang.Object
    implements LookupService
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void close()  
      java.util.concurrent.CompletableFuture<org.apache.commons.lang3.tuple.Pair<java.net.InetSocketAddress,​java.net.InetSocketAddress>> getBroker​(org.apache.pulsar.common.naming.TopicName topicName)
      Calls http-lookup api to find broker-service address which can serve a given topic.
      java.util.concurrent.CompletableFuture<org.apache.pulsar.common.partition.PartitionedTopicMetadata> getPartitionedTopicMetadata​(org.apache.pulsar.common.naming.TopicName topicName)
      Returns PartitionedTopicMetadata for a given topic.
      java.util.concurrent.CompletableFuture<java.util.Optional<org.apache.pulsar.common.schema.SchemaInfo>> getSchema​(org.apache.pulsar.common.naming.TopicName topicName)
      Returns current SchemaInfo SchemaInfo for a given topic.
      java.util.concurrent.CompletableFuture<java.util.Optional<org.apache.pulsar.common.schema.SchemaInfo>> getSchema​(org.apache.pulsar.common.naming.TopicName topicName, byte[] version)
      Returns specific version SchemaInfo SchemaInfo for a given topic.
      java.lang.String getServiceUrl()
      Returns broker-service lookup api url.
      java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> getTopicsUnderNamespace​(org.apache.pulsar.common.naming.NamespaceName namespace, org.apache.pulsar.common.api.proto.CommandGetTopicsOfNamespace.Mode mode)
      Returns all the topics name for a given namespace.
      void updateServiceUrl​(java.lang.String serviceUrl)
      Instruct the LookupService to switch to a new service URL for all subsequent requests
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • HttpLookupService

        public HttpLookupService​(ClientConfigurationData conf,
                                 io.netty.channel.EventLoopGroup eventLoopGroup)
                          throws org.apache.pulsar.client.api.PulsarClientException
        抛出:
        org.apache.pulsar.client.api.PulsarClientException
    • 方法详细资料

      • updateServiceUrl

        public void updateServiceUrl​(java.lang.String serviceUrl)
                              throws org.apache.pulsar.client.api.PulsarClientException
        从接口复制的说明: LookupService
        Instruct the LookupService to switch to a new service URL for all subsequent requests
        指定者:
        updateServiceUrl 在接口中 LookupService
        抛出:
        org.apache.pulsar.client.api.PulsarClientException
      • getBroker

        public java.util.concurrent.CompletableFuture<org.apache.commons.lang3.tuple.Pair<java.net.InetSocketAddress,​java.net.InetSocketAddress>> getBroker​(org.apache.pulsar.common.naming.TopicName topicName)
        Calls http-lookup api to find broker-service address which can serve a given topic.
        指定者:
        getBroker 在接口中 LookupService
        参数:
        topicName - topic-name
        返回:
        broker-socket-address that serves given topic
      • getPartitionedTopicMetadata

        public java.util.concurrent.CompletableFuture<org.apache.pulsar.common.partition.PartitionedTopicMetadata> getPartitionedTopicMetadata​(org.apache.pulsar.common.naming.TopicName topicName)
        从接口复制的说明: LookupService
        Returns PartitionedTopicMetadata for a given topic.
        指定者:
        getPartitionedTopicMetadata 在接口中 LookupService
        参数:
        topicName - topic-name
        返回:
      • getServiceUrl

        public java.lang.String getServiceUrl()
        从接口复制的说明: LookupService
        Returns broker-service lookup api url.
        指定者:
        getServiceUrl 在接口中 LookupService
        返回:
      • getTopicsUnderNamespace

        public java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> getTopicsUnderNamespace​(org.apache.pulsar.common.naming.NamespaceName namespace,
                                                                                                                org.apache.pulsar.common.api.proto.CommandGetTopicsOfNamespace.Mode mode)
        从接口复制的说明: LookupService
        Returns all the topics name for a given namespace.
        指定者:
        getTopicsUnderNamespace 在接口中 LookupService
        参数:
        namespace - : namespace-name
        返回:
      • getSchema

        public java.util.concurrent.CompletableFuture<java.util.Optional<org.apache.pulsar.common.schema.SchemaInfo>> getSchema​(org.apache.pulsar.common.naming.TopicName topicName)
        从接口复制的说明: LookupService
        Returns current SchemaInfo SchemaInfo for a given topic.
        指定者:
        getSchema 在接口中 LookupService
        参数:
        topicName - topic-name
        返回:
        SchemaInfo
      • getSchema

        public java.util.concurrent.CompletableFuture<java.util.Optional<org.apache.pulsar.common.schema.SchemaInfo>> getSchema​(org.apache.pulsar.common.naming.TopicName topicName,
                                                                                                                                byte[] version)
        从接口复制的说明: LookupService
        Returns specific version SchemaInfo SchemaInfo for a given topic.
        指定者:
        getSchema 在接口中 LookupService
        参数:
        topicName - topic-name
        version - schema info version
        返回:
        SchemaInfo
      • close

        public void close()
                   throws java.lang.Exception
        指定者:
        close 在接口中 java.lang.AutoCloseable
        抛出:
        java.lang.Exception