forked from iabudiab/ObjectiveRocks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRocksDBEnv.h
51 lines (38 loc) · 1.44 KB
/
RocksDBEnv.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
//
// RocksDBEnv.h
// ObjectiveRocks
//
// Created by Iska on 05/01/15.
// Copyright (c) 2015 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
#if ROCKSDB_USING_THREAD_STATUS
#import "RocksDBThreadStatus.h"
#endif
NS_ASSUME_NONNULL_BEGIN
/**
All file operations (and other operating system calls) issued by the RocksDB implementation are routed through an
`RocksDBEnv` object. Currently `RocksDBEnv` only exposes the high & low priority thread pool parameters.
*/
@interface RocksDBEnv : NSObject
/**
Initializes a new Env instane with the given high & low priority background threads.
@param lowPrio The count of thread for the high priority queue.
@param highPrio The count of thread for the low priority queue.
@return A newly-initialized instance with the given number of threads.
*/
+ (instancetype)envWithLowPriorityThreadCount:(int)lowPrio andHighPriorityThreadCount:(int)highPrio;
/** @brief Sets the count of thread for the high priority queue. */
- (void)setHighPriorityPoolThreadsCount:(int)numThreads;
/** @brief Sets the count of thread for the low priority queue. */
- (void)setLowPriorityPoolThreadsCount:(int)numThreads;
#if ROCKSDB_USING_THREAD_STATUS
/**
Returns an array with the status of all threads that belong to the current Env.
@see RocksDBThreadStatus
@warning This method is not available in RocksDB Lite.
*/
- (NSArray<RocksDBThreadStatus *> *)threadList;
#endif
@end
NS_ASSUME_NONNULL_END