@Override public ServiceInstance<T> getInstance(String id) { return instanceProvider.getInstance(id); } }
@Override public ServiceInstance<T> getInstance(String id) { return instanceProvider.getInstance(id); } }
@Override public ApplicationInstance instance(String nodeId) { String name = NodeIdBean.parse(nodeId).getApplication(); ServiceInstance<NodeStatus> instance = serviceProviders.getUnchecked(name).getInstance(nodeId); if (instance == null) instance = nonCachedInstanceProviders.getUnchecked(name).getInstance(nodeId); return ZkServiceInstanceAdaptor.applicationInstance(instance); }
@Override public GroupInstance instance(String groupInstanceId) { String groupName = new GroupInstanceIdBean(groupInstanceId).getGroup(); ServiceInstance<GroupProxy> instance = serviceProviders.getUnchecked(groupName).getInstance(groupInstanceId); if (instance == null) instance = nonCachedInstanceProviders.getUnchecked(groupName).getInstance(groupInstanceId); return ZkServiceInstanceAdaptor.groupInstance(instance); }
@Override public UnitInstance instance(String unitInstanceId) { String name = new UnitInstanceIdBean(unitInstanceId).getFullName(); ServiceInstance<UnitProxy> serviceInstance = serviceProviders.getUnchecked(name).getInstance(unitInstanceId); if (serviceInstance == null) serviceInstance = nonCachedInstanceProviders.getUnchecked(name).getInstance(unitInstanceId); return ZkServiceInstanceAdaptor.unitInstance(serviceInstance); }