MCPcopy Create free account
hub / github.com/ceph/ceph / QueueItem

Class QueueItem

src/msg/DispatchQueue.h:45–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers 5

queue_connectMethod · 0.70
queue_acceptMethod · 0.70
queue_remote_resetMethod · 0.70
queue_resetMethod · 0.70
queue_refusedMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected