@Test public void testGetPutInformationElementByEnterpriseNum() { String ieName = "/sys:system/sys:hostname"; assertNull(m_informationElementCache.getInformationElement(183L, ieName)); InformationElement ie = putInformationElement(ieName); assertEquals(ie, m_informationElementCache.getInformationElement(183L, ieName)); }
public InformationElement getInformationElement(String family, int informationElementId) { InformationElementStorage informationElementStorage = m_informationElementStorage.get(family); if (Objects.isNull(informationElementStorage)) { return null; } Map<Integer, InformationElement> ieIdMap = informationElementStorage.getIEIdMap(); return ieIdMap.get(informationElementId); }
InformationElementCache { public InformationElement getInformationElement(String family, int informationElementId) { InformationElementStorage informationElementStorage = m_informationElementStorage.get(family); if (Objects.isNull(informationElementStorage)) { return null; } Map<Integer, InformationElement> ieIdMap = informationElementStorage.getIEIdMap(); return ieIdMap.get(informationElementId); } }
InformationElementCache { public InformationElement getInformationElement(String family, int informationElementId) { InformationElementStorage informationElementStorage = m_informationElementStorage.get(family); if (Objects.isNull(informationElementStorage)) { return null; } Map<Integer, InformationElement> ieIdMap = informationElementStorage.getIEIdMap(); return ieIdMap.get(informationElementId); } InformationElementCache(); }
InformationElementCache { public InformationElement getInformationElement(String family, int informationElementId) { InformationElementStorage informationElementStorage = m_informationElementStorage.get(family); if (Objects.isNull(informationElementStorage)) { return null; } Map<Integer, InformationElement> ieIdMap = informationElementStorage.getIEIdMap(); return ieIdMap.get(informationElementId); } InformationElementCache(); InformationElement getInformationElement(String family, int informationElementId); InformationElement getInformationElement(long enterpriseNumber, String informationElementName); void putInformationElementId(String family, InformationElement ie); void putInformationElementName(long enterpriseNumber, InformationElement ie); boolean removeInformationElement(String deviceFamily); boolean isAvailable(); boolean isAvailable(String family); }
InformationElementCache { public InformationElement getInformationElement(String family, int informationElementId) { InformationElementStorage informationElementStorage = m_informationElementStorage.get(family); if (Objects.isNull(informationElementStorage)) { return null; } Map<Integer, InformationElement> ieIdMap = informationElementStorage.getIEIdMap(); return ieIdMap.get(informationElementId); } InformationElementCache(); InformationElement getInformationElement(String family, int informationElementId); InformationElement getInformationElement(long enterpriseNumber, String informationElementName); void putInformationElementId(String family, InformationElement ie); void putInformationElementName(long enterpriseNumber, InformationElement ie); boolean removeInformationElement(String deviceFamily); boolean isAvailable(); boolean isAvailable(String family);  }