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 struct MMonQuorumService : public Message
24 MMonQuorumService(int type, int head=1, int compat=1) :
25 Message(type, head, compat),
31 ~MMonQuorumService() override { }
35 void set_epoch(epoch_t e) {
39 void set_round(version_t r) {
43 epoch_t get_epoch() const {
47 version_t get_round() const {
51 void service_encode() {
52 ::encode(epoch, payload);
53 ::encode(round, payload);
56 void service_decode(bufferlist::iterator &p) {
61 void encode_payload(uint64_t features) override {
62 assert(0 == "MMonQuorumService message must always be a base class");
65 void decode_payload() override {
66 assert(0 == "MMonQuorumService message must always be a base class");
69 const char *get_type_name() const override { return "quorum_service"; }
72 #endif /* CEPH_MMON_QUORUM_SERVICE_H */