YugabyteDB (2.13.0.0-b42, bfc6a6643e7399ac8a0e81d06a3ee6d6571b33ab)

Coverage Report

Created: 2022-03-09 17:30

/Users/deen/code/yugabyte-db/src/yb/tablet/snapshot_coordinator.h
Line
Count
Source
1
// Copyright (c) YugaByte, Inc.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
4
// in compliance with the License.  You may obtain a copy of the License at
5
//
6
// http://www.apache.org/licenses/LICENSE-2.0
7
//
8
// Unless required by applicable law or agreed to in writing, software distributed under the License
9
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
10
// or implied.  See the License for the specific language governing permissions and limitations
11
// under the License.
12
//
13
14
#ifndef YB_TABLET_SNAPSHOT_COORDINATOR_H
15
#define YB_TABLET_SNAPSHOT_COORDINATOR_H
16
17
#include "yb/tablet/tablet_fwd.h"
18
19
#include "yb/util/status_fwd.h"
20
21
namespace yb {
22
23
class Slice;
24
25
namespace tablet {
26
27
// Interface for snapshot coordinator.
28
class SnapshotCoordinator {
29
 public:
30
  virtual CHECKED_STATUS CreateReplicated(
31
      int64_t leader_term, const SnapshotOperation& operation) = 0;
32
33
  virtual CHECKED_STATUS DeleteReplicated(
34
      int64_t leader_term, const SnapshotOperation& operation) = 0;
35
36
  virtual CHECKED_STATUS RestoreSysCatalogReplicated(
37
      int64_t leader_term, const SnapshotOperation& operation, Status* complete_status) = 0;
38
39
  virtual CHECKED_STATUS Load(Tablet* tablet) = 0;
40
41
  virtual CHECKED_STATUS ApplyWritePair(const Slice& key, const Slice& value) = 0;
42
43
92
  virtual ~SnapshotCoordinator() = default;
44
};
45
46
} // namespace tablet
47
} // namespace yb
48
49
#endif // YB_TABLET_SNAPSHOT_COORDINATOR_H