YugabyteDB (2.13.1.0-b60, 21121d69985fbf76aa6958d8f04a9bfa936293b5)

Coverage Report

Created: 2022-03-22 16:43

/Users/deen/code/yugabyte-db/ent/src/yb/master/ts_descriptor.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
#ifndef ENT_SRC_YB_MASTER_TS_DESCRIPTOR_H
14
#define ENT_SRC_YB_MASTER_TS_DESCRIPTOR_H
15
16
#include "yb/util/shared_ptr_tuple.h"
17
18
namespace yb {
19
20
namespace consensus {
21
class ConsensusServiceProxy;
22
}
23
24
namespace tserver {
25
class TabletServerAdminServiceProxy;
26
class TabletServerServiceProxy;
27
class TabletServerBackupServiceProxy;
28
}
29
30
namespace master {
31
namespace enterprise {
32
33
typedef util::SharedPtrTuple<tserver::TabletServerAdminServiceProxy,
34
    tserver::TabletServerServiceProxy,
35
    tserver::TabletServerBackupServiceProxy,
36
    consensus::ConsensusServiceProxy> ProxyTuple;
37
38
} // namespace enterprise
39
} // namespace master
40
} // namespace yb
41
42
#include "../../../../src/yb/master/ts_descriptor.h"
43
44
namespace yb {
45
namespace master {
46
47
class ReplicationInfoPB;
48
namespace enterprise {
49
50
class TSDescriptor : public yb::master::TSDescriptor {
51
  typedef yb::master::TSDescriptor super;
52
 public:
53
  explicit TSDescriptor(std::string perm_id)
54
8.25k
      : super(std::move(perm_id)) {}
55
131
  virtual ~TSDescriptor() {}
56
57
  bool IsAcceptingLeaderLoad(const ReplicationInfoPB& replication_info) const override;
58
59
 private:
60
  // Is the ts in a read-only placement.
61
  bool IsReadOnlyTS(const ReplicationInfoPB& replication_info) const;
62
};
63
64
} // namespace enterprise
65
} // namespace master
66
} // namespace yb
67
68
#endif // ENT_SRC_YB_MASTER_TS_DESCRIPTOR_H