List of all members.
Classes |
| struct | Data |
| | One cache entry. More...
|
| struct | Item |
Public Member Functions |
| CO_API | InstanceCache (const uint64_t maxSize=EQ_100MB) |
| | Construct a new instance cache.
|
| CO_API | ~InstanceCache () |
| | Destruct this instance cache.
|
| CO_API bool | add (const ObjectVersion &rev, const uint32_t instanceID, Command &command, const uint32_t usage=0) |
| | Add a new command to the instance cache.
|
| void | remove (const NodeID &node) |
| | Remove all items from the given node.
|
| CO_API const Data & | operator[] (const base::UUID &id) |
| | Direct access to the cached instance data for the given object id.
|
| CO_API bool | release (const base::UUID &id, const uint32_t count=1) |
| | Release the retrieved instance data of the given object.
|
| CO_API bool | erase (const base::UUID &id) |
| | Erase all the data for the given object.
|
| uint64_t | getSize () const |
| uint64_t | getMaxSize () const |
| void | expire (const int64_t age) |
| | Remove all items which are older than the given time.
|
|
bool | empty () |
Detailed Description
Definition at line 35 of file instanceCache.h.
Constructor & Destructor Documentation
| CO_API co::InstanceCache::InstanceCache |
( |
const uint64_t |
maxSize = EQ_100MB | ) |
|
Construct a new instance cache.
| CO_API co::InstanceCache::~InstanceCache |
( |
| ) |
|
Destruct this instance cache.
Member Function Documentation
| CO_API bool co::InstanceCache::add |
( |
const ObjectVersion & |
rev, |
|
|
const uint32_t |
instanceID, |
|
|
Command & |
command, |
|
|
const uint32_t |
usage = 0 |
|
) |
| |
Add a new command to the instance cache.
- Parameters:
-
| rev | the object identifier and version. |
| instanceID | the master instance ID. |
| command | The command to add. |
| usage | pre-set usage count. |
- Returns:
- true if the command was entered, false if not.
| CO_API bool co::InstanceCache::erase |
( |
const base::UUID & |
id | ) |
|
Erase all the data for the given object.
The data does not have to be accessed, i.e., release has been called for each previous access.
- Returns:
- true if the element was erased, false otherwise.
| void co::InstanceCache::expire |
( |
const int64_t |
age | ) |
|
Remove all items which are older than the given time.
| uint64_t co::InstanceCache::getMaxSize |
( |
| ) |
const [inline] |
- Returns:
- the maximum number of bytes used by the instance cache.
Definition at line 109 of file instanceCache.h.
| uint64_t co::InstanceCache::getSize |
( |
| ) |
const [inline] |
- Returns:
- the number of bytes used by the instance cache.
Definition at line 106 of file instanceCache.h.
| CO_API const Data& co::InstanceCache::operator[] |
( |
const base::UUID & |
id | ) |
|
Direct access to the cached instance data for the given object id.
The instance data for the given object has to be released by the caller, unless 0 has been returned. Not all returned data stream might be ready.
- Parameters:
-
| id | the identifier of the object to look up. |
- Returns:
- the list of cached instance datas, or Data::NONE if no data is cached for this object.
| CO_API bool co::InstanceCache::release |
( |
const base::UUID & |
id, |
|
|
const uint32_t |
count = 1 |
|
) |
| |
Release the retrieved instance data of the given object.
- Parameters:
-
| id | the identifier of the object to release. |
| count | the number of access operations to release |
- Returns:
- true if the element was unpinned, false if it is not in the instance cache.
| void co::InstanceCache::remove |
( |
const NodeID & |
node | ) |
|
Remove all items from the given node.
The documentation for this class was generated from the following file: