@Override public List<SC2SLMTRecordBean> getSC2SLMTs() { Map<Integer, SC2SLMTRecordBean> map = getCachedObject(); List<SC2SLMTRecordBean> res = new ArrayList<SC2SLMTRecordBean>(); if (map != null && !map.isEmpty()) { for (SC2SLMTRecordBean sc2sl : map.values()) { res.add(sc2sl); } } if (!res.isEmpty()) { return res; } else { // might be a new try { res = helper.getSC2SLMTs(); if (res != null) { setCacheReady(false); // Force a refresh on next call; } return res; } catch (Exception e) { throw SubnetApi.getSubnetException(e); } } }
@Override public SC2SLMTRecordBean getSC2SLMT(int lid) { Map<Integer, SC2SLMTRecordBean> map = getCachedObject(); if (map != null) { return map.get(lid); } // might be a new node try { SC2SLMTRecordBean res = helper.getSC2SLMT(lid); if (res != null) { setCacheReady(false); // Force a refresh on next call; } return res; } catch (Exception e) { log.error("Error getting Cable Infos by lid " + lid, e); e.printStackTrace(); throw SubnetApi.getSubnetException(e); } }
@Override protected RuntimeException processRefreshCacheException(Exception e) { return SubnetApi.getSubnetException(e); }