forked from iabudiab/ObjectiveRocks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRocksDBCompactRangeOptions.h
73 lines (60 loc) · 1.94 KB
/
RocksDBCompactRangeOptions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//
// RocksDBCompactRangeOptions.h
// ObjectiveRocks
//
// Created by Iska on 24/04/16.
// Copyright © 2016 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
Determines the behavior for compacting the bottommost level.
*/
typedef NS_ENUM(NSUInteger, RocksDBBottommostLevelCompaction)
{
RocksDBBottommostLevelCompactionSkip,
RocksDBBottommostLevelCompactionIfHaveCompactionFilter,
RocksDBBottommostLevelCompactionForce,
RocksDBBottommostLevelCompactionForceOptimized
};
/**
The options used for range compactions.
*/
@interface RocksDBCompactRangeOptions : NSObject
/**
If true the compaction is exclusive, if false other compactions may run concurrently at the same time.
Default: true
*/
@property (nonatomic, assign) BOOL exclusiveManualCompaction;
/**
If true, compacted files will be moved to the minimum level capable
of holding the data or given level (specified non-negative targetLevel).
*/
@property (nonatomic, assign) BOOL changeLevel;
/**
If change_level is true and target_level have non-negative value, compacted
files will be moved to target_level.
*/
@property (nonatomic, assign) int targetLevel;
/**
target_path_id for compaction output. Compaction outputs will be placed in options.dbPaths[target_path_id].
Default: 0
*/
@property (nonatomic, assign) uint32_t targetPathId;
/**
By default level based compaction will only compact the bottommost level if there is a compaction filter.
*/
@property (nonatomic, assign) RocksDBBottommostLevelCompaction bottommostLevelCompaction;
/**
If true, compaction will execute immediately even if doing so would cause the DB to
enter write stall mode. Otherwise, it'll sleep until load is low enough.
Default: false
*/
@property (nonatomic, assign) BOOL allowWriteStall;
/**
If > 0, it will replace the option in the DBOptions for this compaction
Default: 0
*/
@property (nonatomic, assign) uint32_t maxSubcompactions;
@end
NS_ASSUME_NONNULL_END