]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: add setters for Connections
authorKefu Chai <kchai@redhat.com>
Thu, 11 Apr 2019 07:50:18 +0000 (15:50 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 16 Apr 2019 14:14:11 +0000 (22:14 +0800)
so we don't directly access its member variables

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/net/Connection.h

index bc5e3f295c385bbcc88df5f9d072aa776b55c156..b7481fc7db71a87fc5c1444bc09df21a46fc3098 100644 (file)
@@ -60,6 +60,12 @@ class Connection : public seastar::enable_shared_from_this<Connection> {
 
   virtual void print(ostream& out) const = 0;
 
+  void set_last_keepalive(utime_t when) {
+    last_keepalive = when;
+  }
+  void set_last_keepalive_ack(utime_t when) {
+    last_keepalive_ack = when;
+  }
   utime_t get_last_keepalive() const { return last_keepalive; }
   utime_t get_last_keepalive_ack() const { return last_keepalive_ack; }
 };