当前位置: 首页>>代码示例>>Java>>正文


Java RemoteService类代码示例

本文整理汇总了Java中org.kuali.rice.ksb.impl.bus.RemoteService的典型用法代码示例。如果您正苦于以下问题:Java RemoteService类的具体用法?Java RemoteService怎么用?Java RemoteService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RemoteService类属于org.kuali.rice.ksb.impl.bus包,在下文中一共展示了RemoteService类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: diffServices

import org.kuali.rice.ksb.impl.bus.RemoteService; //导入依赖的package包/类
@Override
public CompleteServiceDiff diffServices(String instanceId, List<LocalService> localServices, List<RemoteService> clientRegistryCache) {
       List<ServiceInfo> allRegistryServices = serviceRegistry.getAllOnlineServices();
       List<ServiceInfo> allRegistryServicesForInstance = serviceRegistry.getAllServicesForInstance(instanceId);
	LocalServicesDiff localServicesDiff = calculateLocalServicesDiff(allRegistryServicesForInstance, instanceId, localServices);
	RemoteServicesDiff remoteServicesDiff = calculateRemoteServicesDiff(allRegistryServices, clientRegistryCache);
	return new CompleteServiceDiff(localServicesDiff, remoteServicesDiff);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:ServiceRegistryDiffCalculatorImpl.java

示例2: calculateRemoteServicesDiff

import org.kuali.rice.ksb.impl.bus.RemoteService; //导入依赖的package包/类
protected RemoteServicesDiff calculateRemoteServicesDiff(List<ServiceInfo> allRegistryServices, List<RemoteService> clientRegistryCache) {

        Map<String, ServiceInfo> indexedRegistryServices = indexRegistryServices(allRegistryServices);
		Map<String, ServiceInfo> servicesToAddToClientRegistryCache = new HashMap<String, ServiceInfo>(indexedRegistryServices);
		List<RemoteService> servicesToRemoveFromClientRegistryCache = new ArrayList<RemoteService>();

		for (RemoteService remoteService : clientRegistryCache) {
			ServiceInfo indexedRegistryService = indexedRegistryServices.get(remoteService.getServiceInfo().getServiceId());
			if (indexedRegistryService == null) {
				servicesToRemoveFromClientRegistryCache.add(remoteService);
			} else {
				if (!remoteService.getServiceInfo().getChecksum().equals(indexedRegistryService.getChecksum())) {
					servicesToRemoveFromClientRegistryCache.add(remoteService);
				} else {
					servicesToAddToClientRegistryCache.remove(remoteService.getServiceInfo().getServiceId());
				}
			}
		}
		
		if (LOG.isDebugEnabled()) {
			LOG.debug("For instance found " + servicesToRemoveFromClientRegistryCache.size() + " services to remove from client registry cache, "+
				servicesToAddToClientRegistryCache.size() + " services to add to client registry cache");
		}
		
		return new RemoteServicesDiff(new ArrayList<ServiceInfo>(servicesToAddToClientRegistryCache.values()),
                servicesToRemoveFromClientRegistryCache);
	}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:28,代码来源:ServiceRegistryDiffCalculatorImpl.java

示例3: RemoteServicesDiff

import org.kuali.rice.ksb.impl.bus.RemoteService; //导入依赖的package包/类
public RemoteServicesDiff(List<ServiceInfo> newServices, List<RemoteService> removedServices) {
	this.newServices = newServices == null ? new ArrayList<ServiceInfo>(0) : newServices;
	this.removedServices = removedServices == null ? new ArrayList<RemoteService>(0) : removedServices;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:5,代码来源:RemoteServicesDiff.java

示例4: getRemovedServices

import org.kuali.rice.ksb.impl.bus.RemoteService; //导入依赖的package包/类
public List<RemoteService> getRemovedServices() {
	return this.removedServices;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:RemoteServicesDiff.java

示例5: diffServices

import org.kuali.rice.ksb.impl.bus.RemoteService; //导入依赖的package包/类
public CompleteServiceDiff diffServices(String instanceId, List<LocalService> localServices, List<RemoteService> clientRegistryCache); 
开发者ID:kuali,项目名称:kc-rice,代码行数:2,代码来源:ServiceRegistryDiffCalculator.java


注:本文中的org.kuali.rice.ksb.impl.bus.RemoteService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。