/** * Logs the total number of non-filtered instances stored locally. */ private void logTotalInstances() { if (logger.isDebugEnabled()) { int totInstances = 0; for (Application application : getApplications().getRegisteredApplications()) { totInstances += application.getInstancesAsIsFromEureka().size(); } logger.debug("The total number of all instances in the client now is {}", totInstances); } }
/** * Logs the total number of non-filtered instances stored locally. */ private void logTotalInstances() { int totInstances = 0; for (Application application : getApplications().getRegisteredApplications()) { totInstances += application.getInstancesAsIsFromEureka().size(); } logger.debug("The total number of all instances in the client now is {}", totInstances); }
/** * Populates the provided instance count map. The instance count map is used * as part of the general app list synchronization mechanism. * * @param instanceCountMap * the map to populate */ public void populateInstanceCountMap(Map<String, AtomicInteger> instanceCountMap) { for (Application app : this.getRegisteredApplications()) { for (InstanceInfo info : app.getInstancesAsIsFromEureka()) { AtomicInteger instanceCount = instanceCountMap.computeIfAbsent(info.getStatus().name(), k -> new AtomicInteger(0)); instanceCount.incrementAndGet(); } } }
if (existingApp.getInstancesAsIsFromEureka().isEmpty()) { applications.removeApplication(existingApp);
/** * Logs the total number of non-filtered instances stored locally. */ private void logTotalInstances() { if (logger.isDebugEnabled()) { int totInstances = 0; for (Application application : getApplications().getRegisteredApplications()) { totInstances += application.getInstancesAsIsFromEureka().size(); } logger.debug("The total number of all instances in the client now is {}", totInstances); } }
/** * Logs the total number of non-filtered instances stored locally. */ private void logTotalInstances() { int totInstances = 0; for (Application application : getApplications().getRegisteredApplications()) { totInstances += application.getInstancesAsIsFromEureka().size(); } logger.debug("The total number of all instances in the client now is {}", totInstances); }
/** * Populates the provided instance count map. The instance count map is used * as part of the general app list synchronization mechanism. * * @param instanceCountMap * the map to populate */ public void populateInstanceCountMap(Map<String, AtomicInteger> instanceCountMap) { for (Application app : this.getRegisteredApplications()) { for (InstanceInfo info : app.getInstancesAsIsFromEureka()) { AtomicInteger instanceCount = instanceCountMap.computeIfAbsent(info.getStatus().name(), k -> new AtomicInteger(0)); instanceCount.incrementAndGet(); } } }
if (existingApp.getInstancesAsIsFromEureka().isEmpty()) { applications.removeApplication(existingApp);