]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/Connection::add override to virutal methods 6977/head
authorMichal Jarzabek <stiopa@gmail.com>
Fri, 18 Dec 2015 19:26:45 +0000 (19:26 +0000)
committerMichal Jarzabek <stiopa@gmail.com>
Fri, 18 Dec 2015 19:26:45 +0000 (19:26 +0000)
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
src/mon/Monitor.cc
src/msg/async/AsyncConnection.h
src/msg/simple/PipeConnection.h
src/msg/xio/XioConnection.h

index cbf37c2f878092f57df7adb4fa543d6e02054b65..f5cda2a84e4b2914cd1cea5be522935d3a24a8f9 100644 (file)
@@ -3088,19 +3088,19 @@ void Monitor::forward_request_leader(MonOpRequestRef op)
 struct AnonConnection : public Connection {
   AnonConnection(CephContext *cct) : Connection(cct, NULL) {}
 
-  int send_message(Message *m) {
+  int send_message(Message *m) override {
     assert(!"send_message on anonymous connection");
   }
-  void send_keepalive() {
+  void send_keepalive() override {
     assert(!"send_keepalive on anonymous connection");
   }
-  void mark_down() {
+  void mark_down() override {
     // silently ignore
   }
-  void mark_disposable() {
+  void mark_disposable() override {
     // silengtly ignore
   }
-  bool is_connected() { return false; }
+  bool is_connected() override { return false; }
 };
 
 //extract the original message and put it into the regular dispatch function
index c578a7a4358434d22bff84a71df7e375f4da16f4..9bf9a11223c3041908684f45b4366069f731ecfb 100644 (file)
@@ -122,7 +122,7 @@ class AsyncConnection : public Connection {
 
   ostream& _conn_prefix(std::ostream *_dout);
 
-  bool is_connected() {
+  bool is_connected() override {
     Mutex::Locker l(lock);
     return state >= STATE_OPEN && state <= STATE_OPEN_TAG_CLOSE;
   }
@@ -136,11 +136,11 @@ class AsyncConnection : public Connection {
   }
   // Only call when AsyncConnection first construct
   void accept(int sd);
-  int send_message(Message *m);
+  int send_message(Message *m) override;
 
-  void send_keepalive();
-  void mark_down();
-  void mark_disposable() {
+  void send_keepalive() override;
+  void mark_down() override;
+  void mark_disposable() override {
     Mutex::Locker l(lock);
     policy.lossy = true;
   }
index 9e27ec4a58dd2072310ba952bf88af87f7345be8..7a8e9d0a65a1af0651abe6602539084b2008ebe0 100644 (file)
@@ -41,12 +41,12 @@ public:
 
   void reset_pipe(Pipe* p);
 
-  bool is_connected();
+  bool is_connected() override;
 
-  int send_message(Message *m);
-  void send_keepalive();
-  void mark_down();
-  void mark_disposable();
+  int send_message(Message *m) override;
+  void send_keepalive() override;
+  void mark_down() override;
+  void mark_disposable() override;
 
 }; /* PipeConnection */
 
index 9a5f615893a554dc8b95cc826b3860263431cd83..da34d6e5520f72c3f0ecf4b93403fbec445a8d5a 100644 (file)
@@ -259,14 +259,14 @@ public:
       xio_connection_destroy(conn);
   }
 
-  bool is_connected() { return connected.read(); }
+  bool is_connected() override { return connected.read(); }
 
-  int send_message(Message *m);
-  void send_keepalive() {}
-  virtual void mark_down();
+  int send_message(Message *m) override;
+  void send_keepalive() override {}
+  void mark_down() override;
   int _mark_down(uint32_t flags);
-  virtual void mark_disposable();
-  int _mark_disposable(uint32_t flags);
+  virtual void mark_disposable() override;
+  int _mark_disposable(uint32_t flags) override;
 
   const entity_inst_t& get_peer() const { return peer; }
 
@@ -334,12 +334,12 @@ public:
     return static_cast<XioLoopbackConnection*>(RefCountedObject::get());
   }
 
-  virtual bool is_connected() { return true; }
+  bool is_connected() override { return true; }
 
-  int send_message(Message *m);
-  void send_keepalive() {}
-  void mark_down() {}
-  void mark_disposable() {}
+  int send_message(Message *m) override;
+  void send_keepalive()i override {}
+  void mark_down() override {}
+  void mark_disposable() override {}
 
   uint32_t get_seq() {
     return seq.read();