leveldb
Public Member Functions | Public Attributes | List of all members
leveldb::anonymous_namespace{cache.cc}::LRUHandle Struct Reference
Collaboration diagram for leveldb::anonymous_namespace{cache.cc}::LRUHandle:
Collaboration graph
[legend]

Public Member Functions

Slice key () const
 

Public Attributes

void * value
 
void(* deleter )(const Slice &, void *value)
 
LRUHandlenext_hash
 
LRUHandlenext
 
LRUHandleprev
 
size_t charge
 
size_t key_length
 
bool in_cache
 
uint32_t refs
 
uint32_t hash
 
char key_data [1]
 

Detailed Description

Definition at line 42 of file cache.cc.

Member Function Documentation

§ key()

Slice leveldb::anonymous_namespace{cache.cc}::LRUHandle::key ( ) const
inline

Definition at line 55 of file cache.cc.

55  {
56  // For cheaper lookups, we allow a temporary Handle object
57  // to store a pointer to a key in "value".
58  if (next == this) {
59  return *(reinterpret_cast<Slice*>(value));
60  } else {
61  return Slice(key_data, key_length);
62  }
63  }
Here is the caller graph for this function:

Member Data Documentation

§ charge

size_t leveldb::anonymous_namespace{cache.cc}::LRUHandle::charge

Definition at line 48 of file cache.cc.

§ deleter

void(* leveldb::anonymous_namespace{cache.cc}::LRUHandle::deleter) (const Slice &, void *value)

Definition at line 44 of file cache.cc.

§ hash

uint32_t leveldb::anonymous_namespace{cache.cc}::LRUHandle::hash

Definition at line 52 of file cache.cc.

§ in_cache

bool leveldb::anonymous_namespace{cache.cc}::LRUHandle::in_cache

Definition at line 50 of file cache.cc.

§ key_data

char leveldb::anonymous_namespace{cache.cc}::LRUHandle::key_data[1]

Definition at line 53 of file cache.cc.

§ key_length

size_t leveldb::anonymous_namespace{cache.cc}::LRUHandle::key_length

Definition at line 49 of file cache.cc.

§ next

LRUHandle* leveldb::anonymous_namespace{cache.cc}::LRUHandle::next

Definition at line 46 of file cache.cc.

§ next_hash

LRUHandle* leveldb::anonymous_namespace{cache.cc}::LRUHandle::next_hash

Definition at line 45 of file cache.cc.

§ prev

LRUHandle* leveldb::anonymous_namespace{cache.cc}::LRUHandle::prev

Definition at line 47 of file cache.cc.

§ refs

uint32_t leveldb::anonymous_namespace{cache.cc}::LRUHandle::refs

Definition at line 51 of file cache.cc.

§ value

void* leveldb::anonymous_namespace{cache.cc}::LRUHandle::value

Definition at line 43 of file cache.cc.


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