net.named_data.jndn.impl
public class PendingInterestTable extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PendingInterestTable.Entry
Entry holds the callbacks and other fields for an entry in the pending
interest table.
|
Constructor and Description |
---|
PendingInterestTable() |
Modifier and Type | Method and Description |
---|---|
PendingInterestTable.Entry |
add(long pendingInterestId,
Interest interestCopy,
OnData onData,
OnTimeout onTimeout,
OnNetworkNack onNetworkNack)
Add a new entry to the pending interest table.
|
void |
extractEntriesForExpressedInterest(Name name,
ArrayList<PendingInterestTable.Entry> entries)
Find all entries from the pending interest table where the name conforms to
the entry's interest selectors, remove the entries from the table, set each
entry's isRemoved flag, and add to the entries list.
|
void |
extractEntriesForNackInterest(Interest interest,
ArrayList<PendingInterestTable.Entry> entries)
Find all entries from the pending interest table where the OnNetworkNack
callback is not null and the entry's interest is the same as the given
interest, remove the entries from the table, set each entry's isRemoved
flag, and add to the entries list.
|
boolean |
removeEntry(PendingInterestTable.Entry pendingInterest)
Remove the specific pendingInterest entry from the table and set its
isRemoved flag.
|
void |
removePendingInterest(long pendingInterestId)
Remove the pending interest entry with the pendingInterestId from the
pending interest table and set its isRemoved flag.
|
public final PendingInterestTable.Entry add(long pendingInterestId, Interest interestCopy, OnData onData, OnTimeout onTimeout, OnNetworkNack onNetworkNack)
pendingInterestId
- The getNextEntryId() for the pending interest ID
which Face got so it could return it to the caller.interestCopy
- The Interest which was sent, which has already been
copied by expressInterest.onData
- Call onData.onData when a matching data packet is
received.onTimeout
- This calls onTimeout.onTimeout if the interest times out.
If onTimeout is null, this does not use it.onNetworkNack
- Call onNetworkNack.onNetworkNack when a network Nack
packet is received.public final void extractEntriesForExpressedInterest(Name name, ArrayList<PendingInterestTable.Entry> entries)
name
- The name to find the interest for (from the incoming data
packet).entries
- Add matching PendingInterestTable.Entry from the pending
interest table. The caller should pass in an empty ArrayList.public final void extractEntriesForNackInterest(Interest interest, ArrayList<PendingInterestTable.Entry> entries)
interest
- The Interest to search for (typically from a Nack packet).entries
- Add matching PendingInterestTable.Entry from the pending
interest table. The caller should pass in an empty ArrayList.public final void removePendingInterest(long pendingInterestId)
pendingInterestId
- The ID returned from expressInterest.public final boolean removeEntry(PendingInterestTable.Entry pendingInterest)
pendingInterest
- The Entry from the pending interest table.Copyright © 2016. All rights reserved.