forked from iabudiab/ObjectiveRocks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRocksDBCheckpoint.h
40 lines (30 loc) · 1.07 KB
/
RocksDBCheckpoint.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
//
// RocksDBCheckpoint.h
// ObjectiveRocks
//
// Created by Iska on 04/01/15.
// Copyright (c) 2015 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "RocksDB.h"
NS_ASSUME_NONNULL_BEGIN
/**
A checkpoint is an openable Snapshot of a database at a point in time. The `RocksDBCheckpoint` is used to
create such Snapshots for a given DB.
@see RocksDBSnapshot
*/
@interface RocksDBCheckpoint : NSObject
/**
Initializes a new Checkpoint object instance for the given DB which is the nused to created the checkpoints.
@return A newly-initialized Checkoint object instance.
*/
- (instancetype)initWithDatabase:(RocksDB *)db;
/**
Creates a checkpoint, i.e. an openable snapshot, of the DB under the given path.
@param path The path where the checkpint is to be created.
@param error If an error occurs, upon return contains an `NSError` object that describes the problem.
@return `YES` if the checkpoint was created, `NO` otherwise.
*/
- (BOOL)createCheckpointAtPath:(NSString *)path error:(NSError * _Nullable *)error;
@end
NS_ASSUME_NONNULL_END