Search in sources :

Example 1 with ServiceInfo

use of org.apache.dubbo.metadata.MetadataInfo.ServiceInfo in project dubbo by alibaba.

the class InMemoryWritableMetadataService method exportURL.

@Override
public boolean exportURL(URL url) {
    String registryCluster = RegistryClusterIdentifier.getExtension(url).providerKey(url);
    String[] clusters = registryCluster.split(",");
    for (String cluster : clusters) {
        MetadataInfo metadataInfo = metadataInfos.computeIfAbsent(cluster, k -> {
            return new MetadataInfo(ApplicationModel.getName());
        });
        metadataInfo.addService(new ServiceInfo(url));
    }
    metadataSemaphore.release();
    return addURL(exportedServiceURLs, url);
}
Also used : ServiceInfo(org.apache.dubbo.metadata.MetadataInfo.ServiceInfo) MetadataInfo(org.apache.dubbo.metadata.MetadataInfo)

Aggregations

MetadataInfo (org.apache.dubbo.metadata.MetadataInfo)1 ServiceInfo (org.apache.dubbo.metadata.MetadataInfo.ServiceInfo)1