![]() |
Storage Engine API
|
Simple, fixed size hash table used for namespace mapping (effectively the contents of the MMAP V1 .ns file). More...
#include <hashtab.h>
Simple, fixed size hash table used for namespace mapping (effectively the contents of the MMAP V1 .ns file).
Uses a contiguous block of memory, so you can put it in a memory mapped file very easily.
Classes | |
struct | Node |
Public Types | |
typedef stdx::function< void(const Namespace &k, NamespaceDetails &v)> | IteratorCallback |
Public Member Functions | |
NamespaceHashTable (void *buf, int buflen, const char *name) | |
NamespaceDetails * | get (const Namespace &k) const |
void | kill (OperationContext *opCtx, const Namespace &k) |
bool | put (OperationContext *opCtx, const Namespace &k, const NamespaceDetails &value) |
returns false if too full More... | |
void | iterAll (IteratorCallback callback) |
Private Member Functions | |
MONGO_DISALLOW_COPYING (NamespaceHashTable) | |
MONGO_STATIC_ASSERT (sizeof(Node)==628) | |
int | _find (const Namespace &k, bool &found) const |
Node & | _nodes (int i) const |
Private Attributes | |
const char * | _name |
void *const | _buf |
int | n |
int | maxChain |
typedef stdx::function<void(const Namespace& k, NamespaceDetails& v)> mongo::NamespaceHashTable::IteratorCallback |
mongo::NamespaceHashTable::NamespaceHashTable | ( | void * | buf, |
int | buflen, | ||
const char * | name | ||
) |
|
private |
|
inlineprivate |
|
inline |
|
inline |
|
private |
|
private |
|
inline |
returns false if too full
|
private |
|
private |
|
private |
|
private |