Storage Engine API
mongo::dur::Already< Prime > Class Template Reference

Bitmap to remember things we have already marked for journaling. More...

#include <dur_commitjob.h>

Detailed Description

template<int Prime>
class mongo::dur::Already< Prime >

Bitmap to remember things we have already marked for journaling.

False negatives are ok if infrequent, since they impact performance.

Public Member Functions

 Already ()
 
void clear ()
 
bool checkAndSet (void *p, int len)
 Checks if we have Already recorded/indicated our write intent for this region of memory and automatically upgrades the length if the length was shorter previously. More...
 

Private Member Functions

 MONGO_DISALLOW_COPYING (Already)
 

Static Private Member Functions

static unsigned hashPointer (void *v)
 

Private Attributes

std::pair< void *, int > nodes [Prime]
 

Constructor & Destructor Documentation

◆ Already()

template<int Prime>
mongo::dur::Already< Prime >::Already ( )
inline

Member Function Documentation

◆ checkAndSet()

template<int Prime>
bool mongo::dur::Already< Prime >::checkAndSet ( void p,
int  len 
)
inline

Checks if we have Already recorded/indicated our write intent for this region of memory and automatically upgrades the length if the length was shorter previously.

Returns
true if already indicated.

◆ clear()

template<int Prime>
void mongo::dur::Already< Prime >::clear ( )
inline

◆ hashPointer()

template<int Prime>
static unsigned mongo::dur::Already< Prime >::hashPointer ( void v)
inlinestaticprivate

◆ MONGO_DISALLOW_COPYING()

template<int Prime>
mongo::dur::Already< Prime >::MONGO_DISALLOW_COPYING ( Already< Prime >  )
private

Member Data Documentation

◆ nodes

template<int Prime>
std::pair<void*, int> mongo::dur::Already< Prime >::nodes[Prime]
private

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