fn handle_cache_cleaning(&mut self) {
    let resource_limit = 32; // TODO: This limit should be obtained
    // from Topic and Writer QoS. There should be some reasonable default limit
    // in case some suppied QoS setting does not specify a larger value.
    // In any case, there has to be some limit to avoid memory leak.

    match self.qos_policies.history {
      None => {
        self.remove_all_acked_changes_but_keep_depth(1);
      }
      Some(History::KeepAll) => {
        self.remove_all_acked_changes_but_keep_depth(resource_limit);
      }
      Some(History::KeepLast { depth: d }) => {
        self.remove_all_acked_changes_but_keep_depth(d as usize);
      }
    }

    self.set_cache_cleaning_timer();
  }
/// This is called by dp_wrapper everytime cacheCleaning message is received.
This is called by dp_wrapper everytime cacheCleaning message is received.
This is called by dp_wrapper everytime cacheCleaning message is received .
fn handle_cache_cleaning(&mut self) {
    let resource_limit = 32; // TODO: This limit should be obtained
    // from Topic and Writer QoS. There should be some reasonable default limit
    // in case some suppied QoS setting does not specify a larger value.
    // In any case, there has to be some limit to avoid memory leak.
    match self.qos_policies.history {
      None => {
        self.remove_all_acked_changes_but_keep_depth(1);
      }
      Some(History::KeepAll) => {
        self.remove_all_acked_changes_but_keep_depth(resource_limit);
      }
      Some(History::KeepLast { depth: d }) => {
        self.remove_all_acked_changes_but_keep_depth(d as usize);
      }
    }
    self.set_cache_cleaning_timer();
  }
fn handle_cache_cleaning ( & mut self ) { let resource_limit = 32 ; // TODO: This limit should be obtained // from Topic and Writer QoS. There should be some reasonable default limit // in case some suppied QoS setting does not specify a larger value. // In any case, there has to be some limit to avoid memory leak. match self . qos_policies . history { None => { self . remove_all_acked_changes_but_keep_depth ( 1 ) ; } Some ( History :: KeepAll ) => { self . remove_all_acked_changes_but_keep_depth ( resource_limit ) ; } Some ( History :: KeepLast { depth : d } ) => { self . remove_all_acked_changes_but_keep_depth ( d as usize ) ; } } self . set_cache_cleaning_timer ( ) ; }
This is called by dp_wrapper everytime cacheCleaning message is received.
This is called by dp_wrapper everytime cacheCleaning message is received .
&mut self