MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
| Public 成员函数 | Private 类型 | Private 成员函数 | Private 属性 | 静态 Private 属性 | 所有成员列表
oceanbase::ObSkipList< Key, ObComparator > 模板类 参考

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
 
ObSkipListoperator= (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
 
Nodenew_node (const Key &key, int height)
 
int random_height ()
 
bool equal (const Key &a, const Key &b) const
 
Nodefind_greater_or_equal (const Key &key, Node **prev) const
 
Nodefind_less_than (const Key &key) const
 
Nodefind_last () const
 

Private 属性

ObComparator const compare_
 
Node *const head_
 
atomic< int > max_height_
 

静态 Private 属性

static common::RandomGenerator rnd = common::RandomGenerator()
 

成员函数说明

◆ contains()

template<typename Key , class ObComparator >
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
返回
true if found, false otherwise

该类的文档由以下文件生成: