Storage Engine API
mongo::RecordAccessTracker::Rolling Class Reference

this contains many slices of times the idea you put mem status in the current time slice and then after a certain period of time, it rolls off so we check again More...

Detailed Description

this contains many slices of times the idea you put mem status in the current time slice and then after a certain period of time, it rolls off so we check again

Public Member Functions

 Rolling ()=default
 
bool access (size_t region, short offset, bool doHalf, ClockSource *cs)
 After this call, we assume the page is in RAM. More...
 
void updateLastRotate (ClockSource *cs)
 Updates _lastRotate to the current time. More...
 

Private Member Functions

void _rotate (ClockSource *cs)
 

Private Attributes

int _curSlice = 0
 
Date_t _lastRotate
 
Slice _slices [NumSlices]
 
SimpleMutex _lock
 

Constructor & Destructor Documentation

◆ Rolling()

mongo::RecordAccessTracker::Rolling::Rolling ( )
default

Member Function Documentation

◆ _rotate()

void mongo::RecordAccessTracker::Rolling::_rotate ( ClockSource *  cs)
private

◆ access()

bool mongo::RecordAccessTracker::Rolling::access ( size_t  region,
short  offset,
bool  doHalf,
ClockSource *  cs 
)

After this call, we assume the page is in RAM.

Parameters
doHalfif this is a known good access, want to put in first half.
Returns
whether we know the page is in RAM

◆ updateLastRotate()

void mongo::RecordAccessTracker::Rolling::updateLastRotate ( ClockSource *  cs)

Updates _lastRotate to the current time.

Member Data Documentation

◆ _curSlice

int mongo::RecordAccessTracker::Rolling::_curSlice = 0
private

◆ _lastRotate

Date_t mongo::RecordAccessTracker::Rolling::_lastRotate
private

◆ _lock

SimpleMutex mongo::RecordAccessTracker::Rolling::_lock
private

◆ _slices

Slice mongo::RecordAccessTracker::Rolling::_slices[NumSlices]
private

The documentation for this class was generated from the following files: