MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
|
类 | |
class | Iterator |
Iteration over the contents of a skip list 更多... | |
struct | Node |
Public 成员函数 | |
ObSkipList (ObComparator cmp) | |
Create a new ObSkipList object that will use "cmp" for comparing keys. | |
ObSkipList (const ObSkipList &)=delete | |
ObSkipList & | operator= (const ObSkipList &)=delete |
void | insert (const Key &key) |
Insert key into the list. REQUIRES: nothing that compares equal to key is currently in the list | |
void | insert_concurrently (const Key &key) |
bool | contains (const Key &key) const |
Returns true if an entry that compares equal to key is in the list. 更多... | |
Private 类型 | |
enum | { kMaxHeight = 12 } |
Private 成员函数 | |
int | get_max_height () const |
Node * | new_node (const Key &key, int height) |
int | random_height () |
bool | equal (const Key &a, const Key &b) const |
Node * | find_greater_or_equal (const Key &key, Node **prev) const |
Node * | find_less_than (const Key &key) const |
Node * | find_last () const |
Private 属性 | |
ObComparator const | compare_ |
Node *const | head_ |
atomic< int > | max_height_ |
静态 Private 属性 | |
static common::RandomGenerator | rnd = common::RandomGenerator() |
bool oceanbase::ObSkipList< Key, ObComparator >::contains | ( | const Key & | key | ) | const |
Returns true if an entry that compares equal to key is in the list.
[in] | key |