]> git.proxmox.com Git - ceph.git/blame - ceph/src/messages/MOSDPeeringOp.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / messages / MOSDPeeringOp.h
CommitLineData
11fdf7f2
TL
1// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2// vim: ts=8 sw=2 smarttab
3
4#pragma once
5
6#include "msg/Message.h"
7#include "osd/osd_types.h"
11fdf7f2 8
9f95a23c 9class PGPeeringEvent;
11fdf7f2 10
9f95a23c
TL
11class MOSDPeeringOp : public Message {
12public:
13 MOSDPeeringOp(int t, int version, int compat_version)
14 : Message{t, version, compat_version} {}
11fdf7f2 15
9f95a23c 16 void print(std::ostream& out) const override final {
11fdf7f2
TL
17 out << get_type_name() << "("
18 << get_spg() << " ";
19 inner_print(out);
20 out << " e" << get_map_epoch() << "/" << get_min_epoch() << ")";
21 }
22
23 virtual spg_t get_spg() const = 0;
24 virtual epoch_t get_map_epoch() const = 0;
25 virtual epoch_t get_min_epoch() const = 0;
26 virtual PGPeeringEvent *get_event() = 0;
9f95a23c 27 virtual void inner_print(std::ostream& out) const = 0;
1e59de90
TL
28
29#ifdef WITH_SEASTAR
30 // In crimson, conn is independently maintained outside Message.
31 // Instead of get features from the connection later, set features at
32 // the start of the operation.
33 void set_features(uint64_t _features) {
34 features = _features;
35 }
36
37protected:
38 uint64_t features;
39#endif
11fdf7f2 40};