1 /*
2 * Copyright (c) 2021 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15 #include "kv_store_snapshot_callback.h"
16
17 #include "distributeddb_log_print.h"
18
19 using namespace DistributedDB;
20
Callback(DBStatus status,const std::vector<Entry> & entriesVec)21 void KvStoreSnapshotCallback::Callback(DBStatus status, const std::vector<Entry> &entriesVec)
22 {
23 this->status_ = status;
24 this->entriesVec_ = entriesVec;
25 MST_LOG("KvStoreSnapshotCallback status: %d, entriesVec.size(): %zu", status, entriesVec.size());
26 }
27
GetStatus()28 DBStatus KvStoreSnapshotCallback::GetStatus()
29 {
30 return status_;
31 }
32
GetEntries()33 std::vector<Entry> KvStoreSnapshotCallback::GetEntries()
34 {
35 return entriesVec_;
36 }