本文整理匯總了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);