@Override public void invalidate() throws CadiException { try { manager.refresh(); } catch (Exception e) { throw new CadiException(e); } }
@Override public boolean refresh() { try { dm.refresh(); //endpoints = dm.findEndpoints(service, version, envContext, routeOffer, true); if(removeSelf) { // for(int i=0;i<endpoints.length;++i) { // if(endpoints[i].getPort()==thisPort && endpoints[i].getHost().equals(thisMachine)) // endpoints[i]=null; } //} //return endpoints.length!=0; } catch (Exception e) { access.log(Level.ERROR, e.getMessage()); } return false; }
@Override public boolean refresh() { try { dm.refresh(); endpoints = dm.findEndpoints(service, version, envContext, routeOffer, true); if(removeSelf) { for(int i=0;i<endpoints.length;++i) { if(endpoints[i].getPort()==thisPort && endpoints[i].getHost().equals(thisMachine)) endpoints[i]=null; } } return endpoints.length!=0; } catch (Exception e) { access.log(Level.ERROR, e.getMessage()); } return false; }
@Override public <RET> RET best(Retryable<RET> retryable) throws LocatorException, CadiException, APIException { // NOTE: DME2 had Retry Logic embedded lower. try { return (retryable.code(rclient(initURI,ss))); } catch (ConnectException e) { // DME2 should catch try { manager.refresh(); } catch (Exception e1) { throw new CadiException(e1); } throw new CadiException(e); } }
@Override public <RET> RET best(Retryable<RET> retryable) throws LocatorException, CadiException, APIException { // NOTE: DME2 had Retry Logic embedded lower. try { return (retryable.code(rclient(initURI,ss))); } catch (ConnectException e) { // DME2 should catch try { manager.refresh(); } catch (Exception e1) { throw new CadiException(e1); } throw new CadiException(e); } }