Private synchronized storage and policy implementation. More...
Collaboration diagram for Feel::FunctionSpaceManager::Impl:Classes | |
| struct | Entry |
| Strongly retained function space and its LRU metadata. More... | |
| struct | Key |
| Key for one function space associated with a mesh bucket. More... | |
| struct | MeshBucket |
| Entries, observers, and counters associated with one mesh owner. More... | |
Public Types | |
| using | buckets_type = std::map< owner_type, MeshBucket, owner_less_type > |
Public Member Functions | |
| void | eraseEntry (MeshBucket &bucket, typename std::map< Key, Entry >::iterator entry, bool eviction) |
| Erase one entry and optionally account for an eviction. More... | |
| void | evictIfNeeded (MeshBucket &insertedBucket) |
| Enforce per-mesh and global LRU capacity limits. More... | |
| void | increment (MeshBucket &bucket, uint64_type FunctionSpaceManagerStats::*member, uint64_type amount=1) |
| Increment the same counter globally and for one mesh. More... | |
| void | loadRuntimeConfigOnce () |
| Load manager options from the Environment exactly once. | |
| void | pruneExpiredBuckets () |
| Remove empty buckets whose mesh owner has expired. | |
| std::size_t | retainedEntries () const |
Public Attributes | |
| uint64_type | accessClock = 0 |
| buckets_type | buckets |
| FunctionSpaceManagerConfig | config |
| FunctionSpaceManagerStats | counters |
| bool | logStats = false |
| std::recursive_mutex | mutex |
| bool | runtimeConfigLoaded = false |
| bool | shutdownComplete = false |
Private synchronized storage and policy implementation.
| void Feel::FunctionSpaceManager::Impl::eraseEntry | ( | MeshBucket & | bucket, |
| typename std::map< Key, Entry >::iterator | entry, | ||
| bool | eviction | ||
| ) |
Erase one entry and optionally account for an eviction.
| bucket | bucket containing entry |
| entry | iterator of the entry to erase |
| eviction | whether to increment the eviction counter |
References Feel::FunctionSpaceManager::Impl::MeshBucket::entries, Feel::FunctionSpaceManagerStats::evictions, and increment().
Referenced by evictIfNeeded().
| void Feel::FunctionSpaceManager::Impl::evictIfNeeded | ( | MeshBucket & | insertedBucket | ) |
Enforce per-mesh and global LRU capacity limits.
| insertedBucket | bucket in which an entry was inserted |
References Feel::FunctionSpaceManager::Impl::MeshBucket::entries, eraseEntry(), and retainedEntries().
| void Feel::FunctionSpaceManager::Impl::increment | ( | MeshBucket & | bucket, |
| uint64_type FunctionSpaceManagerStats::* | member, | ||
| uint64_type | amount = 1 |
||
| ) |
Increment the same counter globally and for one mesh.
| bucket | mesh bucket whose counter is incremented |
| member | counter member to update |
| amount | increment amount |
References Feel::FunctionSpaceManager::Impl::MeshBucket::counters.
Referenced by eraseEntry().
| std::size_t Feel::FunctionSpaceManager::Impl::retainedEntries | ( | ) | const |
Referenced by evictIfNeeded().