op_cache_container

The APIs described in this section are reserved and may be changed or deprecated in the future. They do not need your attention.

Table 1 API list

API Definition

Description

ListHead()

Indicates the constructor of the doubly linked list for initialization.

Add(ListHead *head)

Adds head into the current linked list.

Del()

Deletes the current linked list node from the linked list.

Empty()

Checks whether the linked list is empty.

HlistNode()

Indicates the constructor of the hash table node for initialization.

HlistHead()

Indicates the constructor of the linked list head of the hash table for initialization.

Add(HlistNode *node)

Adds node to the linked list head of the hash table.

Lru()

Indicates the constructor of the least recently used (LRU) linked list.

Head()

Obtains the head of the LRU linked list.

Tail()

Obtains the tail of the LRU linked list.

Sentinel()

Obtains the sentinel node of the LRU linked list.

Active(ListHead &entry)

Moves entry to the head of the LRU linked list.

Del(ListHead &entry)

Deletes entry from the LRU linked list.

OpCacheContainerIterator(pointer ptr, ListHead *sentinel, bool reverse = false)

Indicates the constructor of OpCacheContainerIterator.

OpCacheContainerIterator(const OpCacheContainerIterator<KeyType, ValueType> &iter)

Indicates the constructor of OpCacheContainerIterator.

OpCacheContainer(const hasher &hash = hasher(), const key_equal &equal = key_equal())

Indicates the constructor of OpCacheContainer (the hash function needs to be provided).

OpCacheContainer()

Indicates the constructor of OpCacheContainer.

begin()

Obtains the first node of OpCacheContainer.

init(size_t capacity)

Initializes OpCacheContainer.

find(const key_type &key)

Searches for a value from OpCacheContainer using the given key.

insert(reference value)

Inserts value into OpCacheContainer.

erase(reference value)

Deletes value from OpCacheContainer.

rbegin()

Obtains the reverse head node of OpCacheContainer.

rend()

Obtains the reverse tail node of OpCacheContainer.

size()

Obtains the size of OpCacheContainer.

bucket(const KeyType &key)

Obtains the bucket of OpCacheContainer with the given key.

bucket_count()

Obtains the number of buckets in OpCacheContainer.

value_type()

Obtains value of OpCacheContainer.

GetBucket(const key_type &key)

Obtains the bucket of OpCacheContainer with the given key.