]>
git.proxmox.com Git - ceph.git/blob - ceph/src/messages/MMonQuorumService.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2012 Inktank, Inc.
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
14 #ifndef CEPH_MMON_QUORUM_SERVICE_H
15 #define CEPH_MMON_QUORUM_SERVICE_H
17 #include "msg/Message.h"
19 class MMonQuorumService
: public Message
{
25 MMonQuorumService(int type
, int head
)
26 : Message
{type
, head
, 1}
28 ~MMonQuorumService() override
{}
31 void set_epoch(epoch_t e
) {
35 void set_round(version_t r
) {
39 epoch_t
get_epoch() const {
43 version_t
get_round() const {
47 void service_encode() {
49 encode(epoch
, payload
);
50 encode(round
, payload
);
53 void service_decode(ceph::buffer::list::const_iterator
&p
) {
59 void encode_payload(uint64_t features
) override
{
60 ceph_abort_msg("MMonQuorumService message must always be a base class");
63 void decode_payload() override
{
64 ceph_abort_msg("MMonQuorumService message must always be a base class");
67 std::string_view
get_type_name() const override
{ return "quorum_service"; }
70 #endif /* CEPH_MMON_QUORUM_SERVICE_H */