LONGBOW_TEST_CASE(Local, _athenaLRUContentStoreEntry_Display)
{
    CCNxName *name1 = ccnxName_CreateFromURI("lci:/first/entry");
    CCNxContentObject *contentObject1 = ccnxContentObject_CreateWithDataPayload(name1, NULL);

    ccnxContentObject_SetExpiryTime(contentObject1, 87654321);
    _AthenaLRUContentStoreEntry *entry1 = _athenaLRUContentStoreEntry_Create(contentObject1);

    _athenaLRUContentStoreEntry_Display(entry1, 4);

    _athenaLRUContentStoreEntry_Release(&entry1);
    ccnxContentObject_Release(&contentObject1);
    ccnxName_Release(&name1);
}
Example #2
0
void
athenaLRUContentStore_Display(const AthenaContentStoreImplementation *store, int indentation)
{
    AthenaLRUContentStore *impl = (AthenaLRUContentStore *) store;

    parcDisplayIndented_PrintLine(indentation, "AthenaLRUContentStore @ %p {", impl);
    parcDisplayIndented_PrintLine(indentation + 4, "maxSizeInBytes = %zu", impl->maxSizeInBytes);
    parcDisplayIndented_PrintLine(indentation + 4, "sizeInBytes = %zu", impl->currentSizeInBytes);
    parcDisplayIndented_PrintLine(indentation + 4, "numEntriesInStore = %zu", impl->numEntries);
    parcDisplayIndented_PrintLine(indentation + 4, "numEntriesInNameIndex = %zu", parcHashMap_Size(impl->tableByName));
    parcDisplayIndented_PrintLine(indentation + 4, "numEntriesInName+KeyIndex = %zu",
                                  parcHashMap_Size(impl->tableByNameAndKeyId));
    parcDisplayIndented_PrintLine(indentation + 4, "numEntriesInName+HashIndex = %zu",
                                  parcHashMap_Size(impl->tableByNameAndObjectHash));

    parcDisplayIndented_PrintLine(indentation + 4, "LRU = {");
    _AthenaLRUContentStoreEntry *entry = impl->lruHead;  // Dump entries, head to tail
    while (entry) {
        _athenaLRUContentStoreEntry_Display(entry, indentation + 8);
        entry = entry->next;
    }
    parcDisplayIndented_PrintLine(indentation + 4, "}");
    parcDisplayIndented_PrintLine(indentation, "}");
}