rocketmq_remoting/protocol/body/
pop_process_queue_info.rs1#[derive(Debug, Clone, Copy)]
18pub struct PopProcessQueueInfo {
19 wait_ack_count: i32,
20 droped: bool,
21 last_pop_timestamp: u64,
22}
23
24impl PopProcessQueueInfo {
25 pub fn new(wait_ack_count: i32, droped: bool, last_pop_timestamp: u64) -> Self {
26 Self {
27 wait_ack_count,
28 droped,
29 last_pop_timestamp,
30 }
31 }
32
33 pub fn wait_ack_count(&self) -> i32 {
34 self.wait_ack_count
35 }
36
37 pub fn set_wait_ack_count(&mut self, wait_ack_count: i32) {
38 self.wait_ack_count = wait_ack_count;
39 }
40
41 pub fn droped(&self) -> bool {
42 self.droped
43 }
44
45 pub fn set_droped(&mut self, droped: bool) {
46 self.droped = droped;
47 }
48
49 pub fn last_pop_timestamp(&self) -> u64 {
50 self.last_pop_timestamp
51 }
52
53 pub fn set_last_pop_timestamp(&mut self, last_pop_timestamp: u64) {
54 self.last_pop_timestamp = last_pop_timestamp;
55 }
56}
57
58impl std::fmt::Display for PopProcessQueueInfo {
59 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
60 write!(
61 f,
62 "PopProcessQueueInfo [wait_ack_count: {}, droped: {}, last_pop_timestamp: {}]",
63 self.wait_ack_count, self.droped, self.last_pop_timestamp
64 )
65 }
66}