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) 2004-2006 Sage Weil <sage@newdream.net>
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.
15 #ifndef CEPH_MMONJOIN_H
16 #define CEPH_MMONJOIN_H
18 #include "messages/PaxosServiceMessage.h"
23 class MMonJoin : public PaxosServiceMessage {
29 MMonJoin() : PaxosServiceMessage(MSG_MON_JOIN, 0) {}
30 MMonJoin(uuid_d &f, string n, const entity_addr_t& a)
31 : PaxosServiceMessage(MSG_MON_JOIN, 0),
32 fsid(f), name(n), addr(a)
36 ~MMonJoin() override {}
39 const char *get_type_name() const override { return "mon_join"; }
40 void print(ostream& o) const override {
41 o << "mon_join(" << name << " " << addr << ")";
44 void encode_payload(uint64_t features) override {
46 ::encode(fsid, payload);
47 ::encode(name, payload);
48 ::encode(addr, payload, features);
50 void decode_payload() override {
51 bufferlist::iterator p = payload.begin();