fn remove_all_acked_changes_but_keep_depth(&mut self, depth: usize)  {
    // All readers have acked up to this point (SequenceNumber)
    let acked_by_all_readers = self.readers.values()
          .map(|r| r.acked_up_to_before())
          .min()
          .unwrap_or(SequenceNumber::zero());
    // If all readers have acked all up to before 5, and depth is 5, we need
    // to keep samples 0..4, i.e. from acked_up_to_before - depth .
    let first_keeper = 
      max( acked_by_all_readers - SequenceNumber::from(depth) , 
            self.first_change_sequence_number );

    // We notify the DDSCache that it can release older samples
    // as far as this Writeris concenrned.
    if let Some(&keep_instant) = self.sequence_number_to_instant.get(&first_keeper) {
      self.dds_cache.write().unwrap()
        .from_topic_remove_before(&self.my_topic_name, keep_instant);
    } else {
      warn!("{:?} missing from instant map",first_keeper);
    }
    self.first_change_sequence_number = first_keeper;
    self.sequence_number_to_instant = 
      self.sequence_number_to_instant.split_off(&first_keeper);
  }
/// Removes permanently cacheChanges from DDSCache.
/// CacheChanges can be safely removed only if they are acked by all readers. (Reliable)
/// Depth is QoS policy History depth.
/// Returns SequenceNumbers of removed CacheChanges
/// This is called repeadedly by handle_cache_cleaning action.
Removes permanently cacheChanges from DDSCache.
CacheChanges can be safely removed only if they are acked by all readers. (Reliable)
Depth is QoS policy History depth.
Returns SequenceNumbers of removed CacheChanges
This is called repeadedly by handle_cache_cleaning action.
Removes permanently cacheChanges from DDSCache . CacheChanges can be safely removed only if they are acked by all readers . ( Reliable ) Depth is QoS policy History depth . Returns SequenceNumbers of removed CacheChanges This is called repeadedly by handle_cache_cleaning action .
fn remove_all_acked_changes_but_keep_depth(&mut self, depth: usize)  {
    // All readers have acked up to this point (SequenceNumber)
    let acked_by_all_readers = self.readers.values()
          .map(|r| r.acked_up_to_before())
          .min()
          .unwrap_or(SequenceNumber::zero());
    // If all readers have acked all up to before 5, and depth is 5, we need
    // to keep samples 0..4, i.e. from acked_up_to_before - depth .
    let first_keeper = 
      max( acked_by_all_readers - SequenceNumber::from(depth) , 
            self.first_change_sequence_number );
    // We notify the DDSCache that it can release older samples
    // as far as this Writeris concenrned.
    if let Some(&keep_instant) = self.sequence_number_to_instant.get(&first_keeper) {
      self.dds_cache.write().unwrap()
        .from_topic_remove_before(&self.my_topic_name, keep_instant);
    } else {
      warn!("{:?} missing from instant map",first_keeper);
    }
    self.first_change_sequence_number = first_keeper;
    self.sequence_number_to_instant = 
      self.sequence_number_to_instant.split_off(&first_keeper);
  }
fn remove_all_acked_changes_but_keep_depth ( & mut self , depth : usize ) { // All readers have acked up to this point (SequenceNumber) let acked_by_all_readers = self . readers . values ( ) . map ( | r | r . acked_up_to_before ( ) ) . min ( ) . unwrap_or ( SequenceNumber :: zero ( ) ) ; // If all readers have acked all up to before 5, and depth is 5, we need // to keep samples 0..4, i.e. from acked_up_to_before - depth . let first_keeper = max ( acked_by_all_readers - SequenceNumber :: from ( depth ) , self . first_change_sequence_number ) ; // We notify the DDSCache that it can release older samples // as far as this Writeris concenrned. if let Some ( & keep_instant ) = self . sequence_number_to_instant . get ( & first_keeper ) { self . dds_cache . write ( ) . unwrap ( ) . from_topic_remove_before ( & self . my_topic_name , keep_instant ) ; } else { warn ! ( " " first_keeper ) ; } self . first_change_sequence_number = first_keeper ; self . sequence_number_to_instant = self . sequence_number_to_instant . split_off ( & first_keeper ) ; }
Removes permanently cacheChanges from DDSCache.
Removes permanently cacheChanges from DDSCache .
&mut self
depth
usize