Set<String> newInstances = new HashSet<>(); boolean newFullRegistry = false; for (Interest<InstanceInfo> basicInterest : getBasicInterests(newInterests)) { if (basicInterest instanceof InstanceInterest) { newInstances.add(((InstanceInterest) basicInterest).getInstanceId());