| 43 | ArrivalSet marrival; |
| 44 | |
| 45 | class QueueItem { |
| 46 | int type; |
| 47 | ConnectionRef con; |
| 48 | ceph::ref_t<Message> m; |
| 49 | public: |
| 50 | explicit QueueItem(const ceph::ref_t<Message>& m) : type(-1), con(0), m(m) {} |
| 51 | QueueItem(int type, Connection *con) : type(type), con(con), m(0) {} |
| 52 | bool is_code() const { |
| 53 | return type != -1; |
| 54 | } |
| 55 | int get_code () const { |
| 56 | ceph_assert(is_code()); |
| 57 | return type; |
| 58 | } |
| 59 | const ceph::ref_t<Message>& get_message() { |
| 60 | ceph_assert(!is_code()); |
| 61 | return m; |
| 62 | } |
| 63 | Connection *get_connection() { |
| 64 | ceph_assert(is_code()); |
| 65 | return con.get(); |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * An iterator into #marrival. This field is only initialized if |
| 70 | * `!is_code()`. It is set by add_arrival() and used by |
| 71 | * remove_arrival(). |
| 72 | */ |
| 73 | ArrivalSet::iterator arrival; |
| 74 | }; |
| 75 | |
| 76 | CephContext *cct; |
| 77 | Messenger *msgr; |
no outgoing calls
no test coverage detected