15.2.6.4. ReaderHistory

class eprosima::fastrtps::rtps::ReaderHistory : public eprosima::fastrtps::rtps::History

Class ReaderHistory, container of the different CacheChanges of a reader

Public Functions

ReaderHistory(const HistoryAttributes &att)

Constructor of the ReaderHistory. It needs a HistoryAttributes.

bool received_change(CacheChange_t *change, size_t)

Virtual method that is called when a new change is received. In this implementation this method just calls add_change. The suer can overload this method in case he needs to perform additional checks before adding the change.

Return

True if added.

Parameters
  • change: Pointer to the change

bool add_change(CacheChange_t *a_change)

Add a CacheChange_t to the ReaderHistory.

Return

True if added.

Parameters
  • a_change: Pointer to the CacheChange to add.

iterator remove_change_nts(const_iterator removal, bool release = true) override

Remove a specific change from the history. No Thread Safe

Return

iterator to the next change if any

Parameters
  • removal: iterator to the change for removal

  • release: specifies if the change must be returned to the pool

bool matches_change(const CacheChange_t *inner, CacheChange_t *outer) override

Criteria to search a specific CacheChange_t on history

Return

true if inner matches outer criteria

Parameters
  • inner: change to compare

  • outer: change for comparison

bool remove_changes_with_guid(const GUID_t &a_guid)

Remove all changes from the History that have a certain guid.

Return

True if succesful, even if no changes have been removed.

Parameters
  • a_guid: Pointer to the target guid to search for.

bool remove_fragmented_changes_until(const SequenceNumber_t &seq_num, const GUID_t &writer_guid)

Remove all fragmented changes from certain writer up to certain sequence number.

Return

True if succesful, even if no changes have been removed.

Parameters
  • seq_num: First SequenceNumber_t not to be removed.

  • writer_guid: GUID of the writer for which changes should be looked for.