Package org.apache.dubbo.metadata
Class MetadataInfo
java.lang.Object
org.apache.dubbo.metadata.MetadataInfo
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMetadataInfo(String app) MetadataInfo(String app, String revision, Map<String, MetadataInfo.ServiceInfo> services) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddService(org.apache.dubbo.common.URL url) voidaddSubscribedURL(org.apache.dubbo.common.URL url) Calculation of this instance's status like revision and modification of the same instance must be synchronized among different threads.clone()Set<org.apache.dubbo.common.URL> booleangetApp()ConcurrentNavigableMap<String, SortedSet<org.apache.dubbo.common.URL>> getMatchedServiceInfos(org.apache.dubbo.common.ProtocolServiceKey consumerProtocolServiceKey) getNoProtocolServiceInfo(String serviceKeyWithoutProtocol) Get service infos of an interface with specified group, version.getParameter(String key, String serviceKey) getParameters(String serviceKey) getServiceInfo(String protocolServiceKey) Get service info of an interface with specified group, version and protocolgetServiceString(String protocolServiceKey) ConcurrentNavigableMap<String, SortedSet<org.apache.dubbo.common.URL>> getValidServiceInfo(String serviceKey) inthashCode()voidinit()Initialize is needed when MetadataInfo is created from deserialization on the consumer side before being used for RPC call.voidremoveService(org.apache.dubbo.common.URL url) booleanremoveSubscribedURL(org.apache.dubbo.common.URL url) voidvoidsetRevision(String revision) toString()
-
Field Details
-
EMPTY
-
-
Constructor Details
-
MetadataInfo
public MetadataInfo() -
MetadataInfo
-
MetadataInfo
-
-
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
-
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
} instead.invalid @link
{@link this#getRevision() -
setRevision
-
getContent
-
getApp
-
setApp
-
getServices
-
getServiceInfo
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
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
-
getMatchedServiceInfos
public List<MetadataInfo.ServiceInfo> getMatchedServiceInfos(org.apache.dubbo.common.ProtocolServiceKey consumerProtocolServiceKey) -
getExtendParams
-
getInstanceParams
-
getParameter
-
getParameters
-
getServiceString
-
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
-
hashCode
public int hashCode() -
equals
-
toString
-
toFullString
-
clone
-