Record Class BrokerLookupData

java.lang.Object
java.lang.Record
org.apache.pulsar.broker.loadbalance.extensions.data.BrokerLookupData
All Implemented Interfaces:
org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData

public record BrokerLookupData(String webServiceUrl, String webServiceUrlTls, String pulsarServiceUrl, String pulsarServiceUrlTls, Map<String,org.apache.pulsar.policies.data.loadbalancer.AdvertisedListener> advertisedListeners, Map<String,String> protocols, boolean persistentTopicsEnabled, boolean nonPersistentTopicsEnabled, String loadManagerClassName, long startTimestamp, String brokerVersion, Map<String,String> properties) extends Record implements org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
Defines the information required to broker lookup.
  • Constructor Details

    • BrokerLookupData

      public BrokerLookupData(String webServiceUrl, String webServiceUrlTls, String pulsarServiceUrl, String pulsarServiceUrlTls, Map<String,org.apache.pulsar.policies.data.loadbalancer.AdvertisedListener> advertisedListeners, Map<String,String> protocols, boolean persistentTopicsEnabled, boolean nonPersistentTopicsEnabled, String loadManagerClassName, long startTimestamp, String brokerVersion, Map<String,String> properties)
      Creates an instance of a BrokerLookupData record class.
      Parameters:
      webServiceUrl - the value for the webServiceUrl record component
      webServiceUrlTls - the value for the webServiceUrlTls record component
      pulsarServiceUrl - the value for the pulsarServiceUrl record component
      pulsarServiceUrlTls - the value for the pulsarServiceUrlTls record component
      advertisedListeners - the value for the advertisedListeners record component
      protocols - the value for the protocols record component
      persistentTopicsEnabled - the value for the persistentTopicsEnabled record component
      nonPersistentTopicsEnabled - the value for the nonPersistentTopicsEnabled record component
      loadManagerClassName - the value for the loadManagerClassName record component
      startTimestamp - the value for the startTimestamp record component
      brokerVersion - the value for the brokerVersion record component
      properties - the value for the properties record component
  • Method Details

    • getWebServiceUrl

      public String getWebServiceUrl()
      Specified by:
      getWebServiceUrl in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
    • getWebServiceUrlTls

      public String getWebServiceUrlTls()
      Specified by:
      getWebServiceUrlTls in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
    • getPulsarServiceUrl

      public String getPulsarServiceUrl()
      Specified by:
      getPulsarServiceUrl in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
    • getPulsarServiceUrlTls

      public String getPulsarServiceUrlTls()
      Specified by:
      getPulsarServiceUrlTls in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
    • getProtocols

      public Map<String,String> getProtocols()
      Specified by:
      getProtocols in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
    • getProtocol

      public Optional<String> getProtocol(String protocol)
      Specified by:
      getProtocol in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
    • getLoadManagerClassName

      public String getLoadManagerClassName()
      Specified by:
      getLoadManagerClassName in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
    • getStartTimestamp

      public long getStartTimestamp()
      Specified by:
      getStartTimestamp in interface org.apache.pulsar.policies.data.loadbalancer.ServiceLookupData
    • toLookupResult

      public LookupResult toLookupResult(LookupOptions options) throws PulsarServerException
      Throws:
      PulsarServerException
    • toNamespaceEphemeralData

      public NamespaceEphemeralData toNamespaceEphemeralData()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • webServiceUrl

      public String webServiceUrl()
      Returns the value of the webServiceUrl record component.
      Returns:
      the value of the webServiceUrl record component
    • webServiceUrlTls

      public String webServiceUrlTls()
      Returns the value of the webServiceUrlTls record component.
      Returns:
      the value of the webServiceUrlTls record component
    • pulsarServiceUrl

      public String pulsarServiceUrl()
      Returns the value of the pulsarServiceUrl record component.
      Returns:
      the value of the pulsarServiceUrl record component
    • pulsarServiceUrlTls

      public String pulsarServiceUrlTls()
      Returns the value of the pulsarServiceUrlTls record component.
      Returns:
      the value of the pulsarServiceUrlTls record component
    • advertisedListeners

      public Map<String,org.apache.pulsar.policies.data.loadbalancer.AdvertisedListener> advertisedListeners()
      Returns the value of the advertisedListeners record component.
      Returns:
      the value of the advertisedListeners record component
    • protocols

      public Map<String,String> protocols()
      Returns the value of the protocols record component.
      Returns:
      the value of the protocols record component
    • persistentTopicsEnabled

      public boolean persistentTopicsEnabled()
      Returns the value of the persistentTopicsEnabled record component.
      Returns:
      the value of the persistentTopicsEnabled record component
    • nonPersistentTopicsEnabled

      public boolean nonPersistentTopicsEnabled()
      Returns the value of the nonPersistentTopicsEnabled record component.
      Returns:
      the value of the nonPersistentTopicsEnabled record component
    • loadManagerClassName

      public String loadManagerClassName()
      Returns the value of the loadManagerClassName record component.
      Returns:
      the value of the loadManagerClassName record component
    • startTimestamp

      public long startTimestamp()
      Returns the value of the startTimestamp record component.
      Returns:
      the value of the startTimestamp record component
    • brokerVersion

      public String brokerVersion()
      Returns the value of the brokerVersion record component.
      Returns:
      the value of the brokerVersion record component
    • properties

      public Map<String,String> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component