Class ISubBlockCacheStatistics#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Derived Type#

Class Documentation#

class ISubBlockCacheStatistics#

This interface defines how status information about the cache-state can be queried.

Subclassed by libCZI::ISubBlockCache

Public Functions

virtual Statistics GetStatistics(std::uint8_t mask) const = 0#

Gets momentarily valid statistics about the cache. The mask defines which statistic/s is/are to be retrieved. In case of multiple fields being requested, it is guaranteed that all requested fields are a transactional snapshot of the state.

Parameters:

mask – A bitmask specifying which fields are requested. Only the fields requested are guaranteed to be valid in the returned struct.

Returns:

A consistent snapshot of the statistics.

virtual ~ISubBlockCacheStatistics() = default#
ISubBlockCacheStatistics() = default#
ISubBlockCacheStatistics(const ISubBlockCacheStatistics&) = delete#
ISubBlockCacheStatistics &operator=(const ISubBlockCacheStatistics&) = delete#
ISubBlockCacheStatistics(ISubBlockCacheStatistics&&) noexcept = delete#
ISubBlockCacheStatistics &operator=(ISubBlockCacheStatistics&&) noexcept = delete#

Public Static Attributes

static constexpr std::uint8_t kMemoryUsage = 1#

Bit-mask identifying the memory-usage field in the statistics struct.

static constexpr std::uint8_t kElementsCount = 2#

Bit-mask identifying the elements-count field in the statistics struct.

struct Statistics#

This struct defines the statistics which can be queried from the cache. There is a bitfield which defines which elements are valid. If the bit is set, then the corresponding member is valid.

Public Members

std::uint8_t validityMask#

A bit mask which indicates which members are valid. C.f. the constants kMemoryUsage and kElementsCount.

std::uint64_t memoryUsage#

The memory usage of all elements in the cache. This field is only valid if the bit kMemoryUsage is set in the validityMask.

std::uint32_t elementsCount#

The number of elements in the cache. This field is only valid if the bit kElementsCount is set in the validityMask.