public void extractEntriesForNackInterest( Interest interest, ArrayList <Entry> entries) { SignedBlob encoding = interest.wireEncode(); // Go backwards through the list so we can remove entries. for (int i = table_.Count - 1; i >= 0; --i) { PendingInterestTable.Entry pendingInterest = table_[i]; if (pendingInterest.getOnNetworkNack() == null) { continue; } // wireEncode returns the encoding cached when the interest was sent (if // it was the default wire encoding). if (pendingInterest.getInterest().wireEncode().equals(encoding)) { ILOG.J2CsMapping.Collections.Collections.Add(entries, table_[i]); // We let the callback from callLater call _processInterestTimeout, but // for efficiency, mark this as removed so that it returns right away. ILOG.J2CsMapping.Collections.Collections.RemoveAt(table_, i); pendingInterest.setIsRemoved(); } } }
public void extractEntriesForExpressedInterest( Data data, ArrayList <Entry> entries) { // Go backwards through the list so we can remove entries. for (int i = table_.Count - 1; i >= 0; --i) { PendingInterestTable.Entry pendingInterest = table_[i]; if (pendingInterest.getInterest().matchesData(data)) { ILOG.J2CsMapping.Collections.Collections.Add(entries, table_[i]); // We let the callback from callLater call _processInterestTimeout, but // for efficiency, mark this as removed so that it returns right away. ILOG.J2CsMapping.Collections.Collections.RemoveAt(table_, i); pendingInterest.setIsRemoved(); } } }
public bool removeEntry(PendingInterestTable.Entry pendingInterest) { if (pendingInterest.getIsRemoved()) { // extractEntriesForExpressedInterest or removePendingInterest has // removed pendingInterest from the table, so we don't need to look for it. // Do nothing. return(false); } if (ILOG.J2CsMapping.Collections.Collections.Remove(table_, pendingInterest)) { pendingInterest.setIsRemoved(); return(true); } else { return(false); } }