]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
messages/MOSDPeeringOp: add
authorSage Weil <sage@redhat.com>
Wed, 6 Dec 2017 03:32:51 +0000 (21:32 -0600)
committerSage Weil <sage@redhat.com>
Tue, 3 Apr 2018 15:12:35 +0000 (10:12 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/messages/MOSDPeeringOp.h [new file with mode: 0644]

diff --git a/src/messages/MOSDPeeringOp.h b/src/messages/MOSDPeeringOp.h
new file mode 100644 (file)
index 0000000..338d421
--- /dev/null
@@ -0,0 +1,27 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#pragma once
+
+#include "msg/Message.h"
+#include "osd/osd_types.h"
+#include "osd/PGPeeringEvent.h"
+
+class MOSDPeeringOp : public Message {
+public:
+  MOSDPeeringOp(int t, int version, int compat_version)
+    : Message(t, version, compat_version) {}
+
+  void print(ostream& out) const override final {
+    out << get_type_name() << "("
+       << get_spg() << " ";
+    inner_print(out);
+    out << " e" << get_map_epoch() << "/" << get_min_epoch() << ")";
+  }
+
+  virtual spg_t get_spg() const = 0;
+  virtual epoch_t get_map_epoch() const = 0;
+  virtual epoch_t get_min_epoch() const = 0;
+  virtual PGPeeringEvent *get_event() = 0;
+  virtual void inner_print(ostream& out) const = 0;
+};