17.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.

virtual 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 user can overload this method in case he needs to perform additional checks before adding the change.

Parameters

change – Pointer to the change

Returns

True if added.

bool add_change(CacheChange_t *a_change)

Add a CacheChange_t to the ReaderHistory.

Parameters

a_change – Pointer to the CacheChange to add.

Returns

True if added.

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

Remove a specific change from the history. No Thread Safe

Parameters
  • removal – iterator to the change for removal

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

Returns

iterator to the next change if any

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

Criteria to search a specific CacheChange_t on history

Parameters
  • inner – change to compare

  • outer – change for comparison

Returns

true if inner matches outer criteria

bool remove_changes_with_guid(const GUID_t &a_guid)

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

Parameters

a_guid – Pointer to the target guid to search for.

Returns

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

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.

Parameters
  • seq_num – First SequenceNumber_t not to be removed.

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

Returns

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