Represents an in-memory storage entry. More...
#include <in-memory-storage-entry.hpp>
Public Member Functions | |
InMemoryStorageEntry () | |
Create an entry. More... | |
void | release () |
Releases reference counts on shared objects. More... | |
const Name & | getName () const |
Returns the name of the Data packet stored in the in-memory storage entry. More... | |
const Name & | getFullName () const |
Returns the full name (including implicit digest) of the Data packet stored in the in-memory storage entry. More... | |
const Data & | getData () const |
Returns the Data packet stored in the in-memory storage entry. More... | |
void | setData (const Data &data) |
Changes the content of in-memory storage entry. More... | |
void | setMarkStaleEventId (unique_ptr< scheduler::ScopedEventId > &&eventId) |
Set eventId for the markStale event. More... | |
void | markStale () |
Disable the data from satisfying interest with MustBeFresh. More... | |
bool | isFresh () |
Check if the data can satisfy an interest with MustBeFresh. More... | |
Represents an in-memory storage entry.
Definition at line 35 of file in-memory-storage-entry.hpp.
ndn::util::InMemoryStorageEntry::InMemoryStorageEntry | ( | ) |
Create an entry.
Definition at line 27 of file in-memory-storage-entry.cpp.
void ndn::util::InMemoryStorageEntry::release | ( | ) |
Releases reference counts on shared objects.
Definition at line 33 of file in-memory-storage-entry.cpp.
|
inline |
Returns the name of the Data packet stored in the in-memory storage entry.
Definition at line 51 of file in-memory-storage-entry.hpp.
|
inline |
Returns the full name (including implicit digest) of the Data packet stored in the in-memory storage entry.
Definition at line 60 of file in-memory-storage-entry.hpp.
|
inline |
Returns the Data packet stored in the in-memory storage entry.
Definition at line 69 of file in-memory-storage-entry.hpp.
References markStale(), setData(), and setMarkStaleEventId().
Referenced by ndn::util::InMemoryStorage::find().
void ndn::util::InMemoryStorageEntry::setData | ( | const Data & | data | ) |
Changes the content of in-memory storage entry.
This method also allows data to satisfy Interest with MustBeFresh
Definition at line 40 of file in-memory-storage-entry.cpp.
Referenced by getData().
void ndn::util::InMemoryStorageEntry::setMarkStaleEventId | ( | unique_ptr< scheduler::ScopedEventId > && | eventId | ) |
Set eventId for the markStale event.
Definition at line 47 of file in-memory-storage-entry.cpp.
Referenced by getData().
void ndn::util::InMemoryStorageEntry::markStale | ( | ) |
Disable the data from satisfying interest with MustBeFresh.
Definition at line 53 of file in-memory-storage-entry.cpp.
Referenced by getData(), and ndn::util::InMemoryStorage::insert().
|
inline |
Check if the data can satisfy an interest with MustBeFresh.
Definition at line 95 of file in-memory-storage-entry.hpp.