@Test public void testRemoveLsaFromBin() throws Exception { lsaWrapper = new LsaWrapperImpl(); opaqueLsaHeader = new OpaqueLsaHeader(); opaqueLsaHeader.setLsType(1); key = ospfLsdb.getLsaKey(opaqueLsaHeader); lsaWrapper.setLsaHeader(opaqueLsaHeader); ospfLsdb.addLsaToMaxAgeBin(key, lsaWrapper); ospfLsdb.removeLsaFromBin(lsaWrapper); lsaWrapper = new LsaWrapperImpl(); opaqueLsaHeader = new OpaqueLsaHeader(); opaqueLsaHeader.setLsType(2); ospfLsdb.getLsaKey(opaqueLsaHeader); lsaWrapper.setLsaHeader(opaqueLsaHeader); ospfLsdb.addLsaToMaxAgeBin(key, lsaWrapper); ospfLsdb.removeLsaFromBin(lsaWrapper); lsaWrapper = new LsaWrapperImpl(); opaqueLsaHeader = new OpaqueLsaHeader(); opaqueLsaHeader.setLsType(3); ospfLsdb.getLsaKey(opaqueLsaHeader); lsaWrapper.setLsaHeader(opaqueLsaHeader); ospfLsdb.addLsaToMaxAgeBin(key, lsaWrapper); ospfLsdb.removeLsaFromBin(lsaWrapper); lsaWrapper = new LsaWrapperImpl(); opaqueLsaHeader = new OpaqueLsaHeader(); opaqueLsaHeader.setLsType(4); ospfLsdb.getLsaKey(opaqueLsaHeader); lsaWrapper.setLsaHeader(opaqueLsaHeader); ospfLsdb.addLsaToMaxAgeBin(key, lsaWrapper); ospfLsdb.removeLsaFromBin(lsaWrapper); lsaWrapper = new LsaWrapperImpl(); opaqueLsaHeader = new OpaqueLsaHeader(); opaqueLsaHeader.setLsType(5); ospfLsdb.getLsaKey(opaqueLsaHeader); lsaWrapper.setLsaHeader(opaqueLsaHeader); ospfLsdb.addLsaToMaxAgeBin(key, lsaWrapper); ospfLsdb.removeLsaFromBin(lsaWrapper); lsaWrapper = new LsaWrapperImpl(); opaqueLsaHeader = new OpaqueLsaHeader(); opaqueLsaHeader.setLsType(9); ospfLsdb.getLsaKey(opaqueLsaHeader); lsaWrapper.setLsaHeader(opaqueLsaHeader); ospfLsdb.addLsaToMaxAgeBin(key, lsaWrapper); ospfLsdb.removeLsaFromBin(lsaWrapper); lsaWrapper = new LsaWrapperImpl(); opaqueLsaHeader = new OpaqueLsaHeader(); opaqueLsaHeader.setLsType(10); ospfLsdb.getLsaKey(opaqueLsaHeader); lsaWrapper.setLsaHeader(opaqueLsaHeader); ospfLsdb.addLsaToMaxAgeBin(key, lsaWrapper); ospfLsdb.removeLsaFromBin(lsaWrapper); lsaWrapper = new LsaWrapperImpl(); opaqueLsaHeader = new OpaqueLsaHeader(); opaqueLsaHeader.setLsType(11); ospfLsdb.getLsaKey(opaqueLsaHeader); lsaWrapper.setLsaHeader(opaqueLsaHeader); ospfLsdb.addLsaToMaxAgeBin(key, lsaWrapper); ospfLsdb.removeLsaFromBin(lsaWrapper); assertThat(ospfLsdb, is(notNullValue())); }
public void removeLsaFromBin(Object lsaWrapper) { if (lsaWrapper != null) { lsdbAge.removeLsaFromBin((LsaWrapper) lsaWrapper); } }
OspfLsdbImpl implements OspfLsdb { public void removeLsaFromBin(Object lsaWrapper) { if (lsaWrapper != null) { lsdbAge.removeLsaFromBin((LsaWrapper) lsaWrapper); } } }
OspfLsdbImpl implements OspfLsdb { public void removeLsaFromBin(Object lsaWrapper) { if (lsaWrapper != null) { lsdbAge.removeLsaFromBin((LsaWrapper) lsaWrapper); } } OspfLsdbImpl(OspfArea ospfArea); }
OspfLsdbImpl implements OspfLsdb { public void removeLsaFromBin(Object lsaWrapper) { if (lsaWrapper != null) { lsdbAge.removeLsaFromBin((LsaWrapper) lsaWrapper); } } OspfLsdbImpl(OspfArea ospfArea); @Override boolean equals(Object o); @Override int hashCode(); void initializeDb(); List getAllLsaHeaders(boolean excludeMaxAgeLsa, boolean isOpaqueCapable); String getLsaKey(LsaHeader lsaHeader); LsaWrapper lsaLookup(LsaHeader lsaHeader); LsaWrapper findLsa(int lsType, String lsaKey); boolean addLsa(LsaHeader newLsa, boolean isSelfOriginated, OspfInterface ospfInterface); void addLsaToMaxAgeBin(String key, Object wrapper); void removeLsaFromBin(Object lsaWrapper); String isNewerOrSameLsa(LsaHeader lsa1, LsaHeader lsa2); long getLsSequenceNumber(OspfLsaType lsaType); void deleteLsa(LsaHeader lsaHeader); void setRouterLsaSeqNo(long routerLsaSeqNo); void setNetworkLsaSeqNo(long networkLsaSeqNo); }
OspfLsdbImpl implements OspfLsdb { public void removeLsaFromBin(Object lsaWrapper) { if (lsaWrapper != null) { lsdbAge.removeLsaFromBin((LsaWrapper) lsaWrapper); } } OspfLsdbImpl(OspfArea ospfArea); @Override boolean equals(Object o); @Override int hashCode(); void initializeDb(); List getAllLsaHeaders(boolean excludeMaxAgeLsa, boolean isOpaqueCapable); String getLsaKey(LsaHeader lsaHeader); LsaWrapper lsaLookup(LsaHeader lsaHeader); LsaWrapper findLsa(int lsType, String lsaKey); boolean addLsa(LsaHeader newLsa, boolean isSelfOriginated, OspfInterface ospfInterface); void addLsaToMaxAgeBin(String key, Object wrapper); void removeLsaFromBin(Object lsaWrapper); String isNewerOrSameLsa(LsaHeader lsa1, LsaHeader lsa2); long getLsSequenceNumber(OspfLsaType lsaType); void deleteLsa(LsaHeader lsaHeader); void setRouterLsaSeqNo(long routerLsaSeqNo); void setNetworkLsaSeqNo(long networkLsaSeqNo);  }