use of org.apache.servicecomb.registry.api.registry.FindInstancesResponse in project incubator-servicecomb-java-chassis by apache.
the class TestFindInstancesResponse method setUp.
@Before
public void setUp() throws Exception {
oFindInstancesResponse = new FindInstancesResponse();
oListMicroserviceInstance = new ArrayList<>();
oListMicroserviceInstance.add(Mockito.mock(MicroserviceInstance.class));
}
use of org.apache.servicecomb.registry.api.registry.FindInstancesResponse in project incubator-servicecomb-java-chassis by apache.
the class MicroserviceStore method findServiceInstances.
public MicroserviceInstances findServiceInstances(String revision) {
if (instancesRevision.equals(revision)) {
return new MicroserviceInstances().setRevision(instancesRevision).setNeedRefresh(false);
}
List<MicroserviceInstance> instances = instancesById.values().stream().map(InstanceStore::getInstance).collect(Collectors.toList());
FindInstancesResponse response = new FindInstancesResponse().setInstances(instances);
return new MicroserviceInstances().setRevision(instancesRevision).setInstancesResponse(response);
}
Aggregations