Class MetadataInfo

java.lang.Object
org.apache.dubbo.metadata.MetadataInfo
All Implemented Interfaces:
Serializable

public class MetadataInfo extends Object implements Serializable
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • init

      public void init()
      Initialize is needed when MetadataInfo is created from deserialization on the consumer side before being used for RPC call.
    • addService

      public void addService(org.apache.dubbo.common.URL url)
    • removeService

      public void removeService(org.apache.dubbo.common.URL url)
    • getRevision

      public String getRevision()
    • calAndGetRevision

      public String calAndGetRevision()
      Calculation of this instance's status like revision and modification of the same instance must be synchronized among different threads.

      Usage of this method is strictly restricted to certain points such as when during registration. Always try to use

      invalid @link
      {@link this#getRevision()
      } instead.
    • setRevision

      public void setRevision(String revision)
    • getContent

      public String getContent()
    • getApp

      public String getApp()
    • setApp

      public void setApp(String app)
    • getServices

      public Map<String,MetadataInfo.ServiceInfo> getServices()
    • getServiceInfo

      public MetadataInfo.ServiceInfo getServiceInfo(String protocolServiceKey)
      Get service info of an interface with specified group, version and protocol
      Parameters:
      protocolServiceKey - key is of format '{group}/{interface name}:{version}:{protocol}'
      Returns:
      the specific service info related to protocolServiceKey
    • getNoProtocolServiceInfo

      public MetadataInfo.ServiceInfo getNoProtocolServiceInfo(String serviceKeyWithoutProtocol)
      Get service infos of an interface with specified group, version. There may have several service infos of different protocols, this method will simply pick the first one.
      Parameters:
      serviceKeyWithoutProtocol - key is of format '{group}/{interface name}:{version}'
      Returns:
      the first service info related to serviceKey
    • getValidServiceInfo

      public MetadataInfo.ServiceInfo getValidServiceInfo(String serviceKey)
    • getMatchedServiceInfos

      public List<MetadataInfo.ServiceInfo> getMatchedServiceInfos(org.apache.dubbo.common.ProtocolServiceKey consumerProtocolServiceKey)
    • getExtendParams

      public Map<String,String> getExtendParams()
    • getInstanceParams

      public Map<String,String> getInstanceParams()
    • getParameter

      public String getParameter(String key, String serviceKey)
    • getParameters

      public Map<String,String> getParameters(String serviceKey)
    • getServiceString

      public String getServiceString(String protocolServiceKey)
    • addSubscribedURL

      public void addSubscribedURL(org.apache.dubbo.common.URL url)
    • removeSubscribedURL

      public boolean removeSubscribedURL(org.apache.dubbo.common.URL url)
    • getSubscribedServiceURLs

      public ConcurrentNavigableMap<String,SortedSet<org.apache.dubbo.common.URL>> getSubscribedServiceURLs()
    • getExportedServiceURLs

      public ConcurrentNavigableMap<String,SortedSet<org.apache.dubbo.common.URL>> getExportedServiceURLs()
    • collectExportedURLSet

      public Set<org.apache.dubbo.common.URL> collectExportedURLSet()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toFullString

      public String toFullString()
    • clone

      public MetadataInfo clone()