]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/crimson/net/Connection.h
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / crimson / net / Connection.h
index 4c90f6e6852c2f0deca5f17595a59bf00da44b91..7141e20f476df7a1461e854d0744142d4a24cb28 100644 (file)
@@ -40,6 +40,15 @@ class Connection : public seastar::enable_shared_from_this<Connection> {
 
   virtual ~Connection() {}
 
+  /**
+   * get_shard_id
+   *
+   * The shard id where the Connection is dispatching events and handling I/O.
+   *
+   * May be changed with the accept/connect events.
+   */
+  virtual const seastar::shard_id get_shard_id() const = 0;
+
   virtual const entity_name_t &get_peer_name() const = 0;
 
   entity_type_t get_peer_type() const { return get_peer_name().type(); }
@@ -71,7 +80,9 @@ class Connection : public seastar::enable_shared_from_this<Connection> {
    * send
    *
    * Send a message over a connection that has completed its handshake.
-   * May be invoked from any core.
+   *
+   * May be invoked from any core, but that requires to chain the returned
+   * future to preserve ordering.
    */
   virtual seastar::future<> send(MessageURef msg) = 0;
 
@@ -81,7 +92,8 @@ class Connection : public seastar::enable_shared_from_this<Connection> {
    * Send a keepalive message over a connection that has completed its
    * handshake.
    *
-   * May be invoked from any core.
+   * May be invoked from any core, but that requires to chain the returned
+   * future to preserve ordering.
    */
   virtual seastar::future<> send_keepalive() = 0;
 
@@ -109,9 +121,13 @@ class Connection : public seastar::enable_shared_from_this<Connection> {
   virtual void print(std::ostream& out) const = 0;
 
 #ifdef UNIT_TESTS_BUILT
-  virtual bool is_closed() const = 0;
+  virtual bool is_protocol_ready() const = 0;
+
+  virtual bool is_protocol_standby() const = 0;
+
+  virtual bool is_protocol_closed() const = 0;
 
-  virtual bool is_closed_clean() const = 0;
+  virtual bool is_protocol_closed_clean() const = 0;
 
   virtual bool peer_wins() const = 0;
 #endif