Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
kvdb
rocksdb
提交
db1854d7
R
rocksdb
项目概览
kvdb
/
rocksdb
11 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rocksdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
db1854d7
编写于
5月 04, 2014
作者:
I
Igor Canadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Declare all DB methods virtual so that StackableDB can override them
上级
d69dc64b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
23 addition
and
22 deletion
+23
-22
include/rocksdb/db.h
include/rocksdb/db.h
+23
-22
未找到文件。
include/rocksdb/db.h
浏览文件 @
db1854d7
...
...
@@ -164,8 +164,8 @@ class DB {
virtual
Status
Put
(
const
WriteOptions
&
options
,
ColumnFamilyHandle
*
column_family
,
const
Slice
&
key
,
const
Slice
&
value
)
=
0
;
Status
Put
(
const
WriteOptions
&
options
,
const
Slice
&
key
,
const
Slice
&
value
)
{
virtual
Status
Put
(
const
WriteOptions
&
options
,
const
Slice
&
key
,
const
Slice
&
value
)
{
return
Put
(
options
,
DefaultColumnFamily
(),
key
,
value
);
}
...
...
@@ -176,7 +176,7 @@ class DB {
virtual
Status
Delete
(
const
WriteOptions
&
options
,
ColumnFamilyHandle
*
column_family
,
const
Slice
&
key
)
=
0
;
Status
Delete
(
const
WriteOptions
&
options
,
const
Slice
&
key
)
{
virtual
Status
Delete
(
const
WriteOptions
&
options
,
const
Slice
&
key
)
{
return
Delete
(
options
,
DefaultColumnFamily
(),
key
);
}
...
...
@@ -187,8 +187,8 @@ class DB {
virtual
Status
Merge
(
const
WriteOptions
&
options
,
ColumnFamilyHandle
*
column_family
,
const
Slice
&
key
,
const
Slice
&
value
)
=
0
;
Status
Merge
(
const
WriteOptions
&
options
,
const
Slice
&
key
,
const
Slice
&
value
)
{
virtual
Status
Merge
(
const
WriteOptions
&
options
,
const
Slice
&
key
,
const
Slice
&
value
)
{
return
Merge
(
options
,
DefaultColumnFamily
(),
key
,
value
);
}
...
...
@@ -207,7 +207,7 @@ class DB {
virtual
Status
Get
(
const
ReadOptions
&
options
,
ColumnFamilyHandle
*
column_family
,
const
Slice
&
key
,
std
::
string
*
value
)
=
0
;
Status
Get
(
const
ReadOptions
&
options
,
const
Slice
&
key
,
std
::
string
*
value
)
{
virtual
Status
Get
(
const
ReadOptions
&
options
,
const
Slice
&
key
,
std
::
string
*
value
)
{
return
Get
(
options
,
DefaultColumnFamily
(),
key
,
value
);
}
...
...
@@ -225,9 +225,9 @@ class DB {
const
ReadOptions
&
options
,
const
std
::
vector
<
ColumnFamilyHandle
*>&
column_family
,
const
std
::
vector
<
Slice
>&
keys
,
std
::
vector
<
std
::
string
>*
values
)
=
0
;
std
::
vector
<
Status
>
MultiGet
(
const
ReadOptions
&
options
,
const
std
::
vector
<
Slice
>&
keys
,
std
::
vector
<
std
::
string
>*
values
)
{
virtual
std
::
vector
<
Status
>
MultiGet
(
const
ReadOptions
&
options
,
const
std
::
vector
<
Slice
>&
keys
,
std
::
vector
<
std
::
string
>*
values
)
{
return
MultiGet
(
options
,
std
::
vector
<
ColumnFamilyHandle
*>
(
keys
.
size
(),
DefaultColumnFamily
()),
keys
,
values
);
...
...
@@ -248,8 +248,8 @@ class DB {
}
return
true
;
}
bool
KeyMayExist
(
const
ReadOptions
&
options
,
const
Slice
&
key
,
std
::
string
*
value
,
bool
*
value_found
=
nullptr
)
{
virtual
bool
KeyMayExist
(
const
ReadOptions
&
options
,
const
Slice
&
key
,
std
::
string
*
value
,
bool
*
value_found
=
nullptr
)
{
return
KeyMayExist
(
options
,
DefaultColumnFamily
(),
key
,
value
,
value_found
);
}
...
...
@@ -261,7 +261,7 @@ class DB {
// The returned iterator should be deleted before this db is deleted.
virtual
Iterator
*
NewIterator
(
const
ReadOptions
&
options
,
ColumnFamilyHandle
*
column_family
)
=
0
;
Iterator
*
NewIterator
(
const
ReadOptions
&
options
)
{
virtual
Iterator
*
NewIterator
(
const
ReadOptions
&
options
)
{
return
NewIterator
(
options
,
DefaultColumnFamily
());
}
// Returns iterators from a consistent database state across multiple
...
...
@@ -301,7 +301,7 @@ class DB {
// of the sstables that make up the db contents.
virtual
bool
GetProperty
(
ColumnFamilyHandle
*
column_family
,
const
Slice
&
property
,
std
::
string
*
value
)
=
0
;
bool
GetProperty
(
const
Slice
&
property
,
std
::
string
*
value
)
{
virtual
bool
GetProperty
(
const
Slice
&
property
,
std
::
string
*
value
)
{
return
GetProperty
(
DefaultColumnFamily
(),
property
,
value
);
}
...
...
@@ -316,7 +316,7 @@ class DB {
virtual
void
GetApproximateSizes
(
ColumnFamilyHandle
*
column_family
,
const
Range
*
range
,
int
n
,
uint64_t
*
sizes
)
=
0
;
void
GetApproximateSizes
(
const
Range
*
range
,
int
n
,
uint64_t
*
sizes
)
{
v
irtual
v
oid
GetApproximateSizes
(
const
Range
*
range
,
int
n
,
uint64_t
*
sizes
)
{
GetApproximateSizes
(
DefaultColumnFamily
(),
range
,
n
,
sizes
);
}
...
...
@@ -341,26 +341,27 @@ class DB {
const
Slice
*
begin
,
const
Slice
*
end
,
bool
reduce_level
=
false
,
int
target_level
=
-
1
)
=
0
;
Status
CompactRange
(
const
Slice
*
begin
,
const
Slice
*
end
,
bool
reduce_level
=
false
,
int
target_level
=
-
1
)
{
virtual
Status
CompactRange
(
const
Slice
*
begin
,
const
Slice
*
end
,
bool
reduce_level
=
false
,
int
target_level
=
-
1
)
{
return
CompactRange
(
DefaultColumnFamily
(),
begin
,
end
,
reduce_level
,
target_level
);
}
// Number of levels used for this DB.
virtual
int
NumberLevels
(
ColumnFamilyHandle
*
column_family
)
=
0
;
int
NumberLevels
()
{
return
NumberLevels
(
DefaultColumnFamily
());
}
virtual
int
NumberLevels
()
{
return
NumberLevels
(
DefaultColumnFamily
());
}
// Maximum level to which a new compacted memtable is pushed if it
// does not create overlap.
virtual
int
MaxMemCompactionLevel
(
ColumnFamilyHandle
*
column_family
)
=
0
;
int
MaxMemCompactionLevel
()
{
virtual
int
MaxMemCompactionLevel
()
{
return
MaxMemCompactionLevel
(
DefaultColumnFamily
());
}
// Number of files in level-0 that would stop writes.
virtual
int
Level0StopWriteTrigger
(
ColumnFamilyHandle
*
column_family
)
=
0
;
int
Level0StopWriteTrigger
()
{
virtual
int
Level0StopWriteTrigger
()
{
return
Level0StopWriteTrigger
(
DefaultColumnFamily
());
}
...
...
@@ -374,14 +375,14 @@ class DB {
// Get DB Options that we use
virtual
const
Options
&
GetOptions
(
ColumnFamilyHandle
*
column_family
)
const
=
0
;
const
Options
&
GetOptions
()
const
{
virtual
const
Options
&
GetOptions
()
const
{
return
GetOptions
(
DefaultColumnFamily
());
}
// Flush all mem-table data.
virtual
Status
Flush
(
const
FlushOptions
&
options
,
ColumnFamilyHandle
*
column_family
)
=
0
;
Status
Flush
(
const
FlushOptions
&
options
)
{
virtual
Status
Flush
(
const
FlushOptions
&
options
)
{
return
Flush
(
options
,
DefaultColumnFamily
());
}
...
...
@@ -466,7 +467,7 @@ class DB {
#ifndef ROCKSDB_LITE
virtual
Status
GetPropertiesOfAllTables
(
ColumnFamilyHandle
*
column_family
,
TablePropertiesCollection
*
props
)
=
0
;
Status
GetPropertiesOfAllTables
(
TablePropertiesCollection
*
props
)
{
virtual
Status
GetPropertiesOfAllTables
(
TablePropertiesCollection
*
props
)
{
return
GetPropertiesOfAllTables
(
DefaultColumnFamily
(),
props
);
}
#endif // ROCKSDB_LITE
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录