本文整理汇总了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);
}
示例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);
}
示例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;
}
示例4: getRemovedServices
import org.kuali.rice.ksb.impl.bus.RemoteService; //导入依赖的package包/类
public List<RemoteService> getRemovedServices() {
return this.removedServices;
}
示例5: diffServices
import org.kuali.rice.ksb.impl.bus.RemoteService; //导入依赖的package包/类
public CompleteServiceDiff diffServices(String instanceId, List<LocalService> localServices, List<RemoteService> clientRegistryCache);