Class History, container of the different CacheChanges and the methods to access them. More...
#include <History.hpp>

Public Types | |
| using | iterator = std::vector<CacheChange_t*>::iterator |
| using | reverse_iterator = std::vector<CacheChange_t*>::reverse_iterator |
| using | const_iterator = std::vector<CacheChange_t*>::const_iterator |
Public Member Functions | |
| FASTDDS_EXPORTED_API bool | isFull () |
| Check if the history is full. | |
| FASTDDS_EXPORTED_API size_t | getHistorySize () |
| Get the History size. | |
| FASTDDS_EXPORTED_API const_iterator | find_change_nts (CacheChange_t *ch) |
| Find a specific change in the history using the matches_change method criteria. | |
| virtual FASTDDS_EXPORTED_API iterator | remove_change_nts (const_iterator removal, bool release=true) |
| Remove a specific change from the history. | |
| virtual FASTDDS_EXPORTED_API iterator | remove_change_nts (const_iterator removal, const std::chrono::time_point< std::chrono::steady_clock > &max_blocking_time, bool release=true) |
| Remove a specific change from the history. | |
| FASTDDS_EXPORTED_API bool | remove_all_changes () |
| Remove all changes from the History. | |
| FASTDDS_EXPORTED_API bool | remove_change (CacheChange_t *ch) |
| Remove a specific change from the history. | |
| FASTDDS_EXPORTED_API bool | remove_change (CacheChange_t *ch, const std::chrono::time_point< std::chrono::steady_clock > &max_blocking_time) |
| Remove a specific change from the history. | |
| FASTDDS_EXPORTED_API const_iterator | find_change (CacheChange_t *ch) |
| Find a specific change in the history using the matches_change method criteria. | |
| virtual FASTDDS_EXPORTED_API bool | matches_change (const CacheChange_t *ch_inner, CacheChange_t *ch_outer) |
| Verifies if an element of the changes collection matches a given change Derived classes have more info on how to identify univocally a change and should override. | |
| FASTDDS_EXPORTED_API iterator | remove_change (const_iterator removal, bool release=true) |
| Remove a specific change from the history. | |
| FASTDDS_EXPORTED_API iterator | changesBegin () |
| Get the beginning of the changes history iterator. | |
| FASTDDS_EXPORTED_API reverse_iterator | changesRbegin () |
| FASTDDS_EXPORTED_API iterator | changesEnd () |
| Get the end of the changes history iterator. | |
| FASTDDS_EXPORTED_API reverse_iterator | changesRend () |
| FASTDDS_EXPORTED_API bool | get_min_change (CacheChange_t **min_change) |
| Get the minimum CacheChange_t. | |
| FASTDDS_EXPORTED_API bool | get_max_change (CacheChange_t **max_change) |
| Get the maximum CacheChange_t. | |
| FASTDDS_EXPORTED_API uint32_t | getTypeMaxSerialized () |
| Get the maximum serialized payload size. | |
| FASTDDS_EXPORTED_API RecursiveTimedMutex * | getMutex () const |
| Get the mutex. | |
| FASTDDS_EXPORTED_API bool | get_change (const SequenceNumber_t &seq, const GUID_t &guid, CacheChange_t **change) const |
| const_iterator | get_change_nts (const SequenceNumber_t &seq, const GUID_t &guid, CacheChange_t **change, const_iterator hint) const |
| bool | get_earliest_change (CacheChange_t **change) |
| A method to get the change with the earliest timestamp. | |
Public Attributes | |
| HistoryAttributes | m_att |
| Attributes of the History. | |
Protected Member Functions | |
| History (const HistoryAttributes &att) | |
| History (History &&)=delete | |
| History & | operator= (History &&)=delete |
| virtual | ~History () |
| void | print_changes_seqNum2 () |
| Print the seqNum of the changes in the History (for debuggisi, mng purposes). | |
| virtual FASTDDS_EXPORTED_API void | do_release_cache (CacheChange_t *ch)=0 |
| History::iterator | remove_iterator_constness (const_iterator c_it) |
| Removes the constness of a const_iterator to obtain a regular iterator. | |
Protected Attributes | |
| std::vector< CacheChange_t * > | m_changes |
| Vector of pointers to the CacheChange_t. | |
| bool | m_isHistoryFull = false |
| Variable to know if the history is full without needing to block the History mutex. | |
| RecursiveTimedMutex * | mp_mutex = nullptr |
| Mutex for the History. | |
Class History, container of the different CacheChanges and the methods to access them.
| using const_iterator = std::vector<CacheChange_t*>::const_iterator |
| using iterator = std::vector<CacheChange_t*>::iterator |
| using reverse_iterator = std::vector<CacheChange_t*>::reverse_iterator |
|
protected |
|
protecteddelete |
|
protectedvirtual |
|
inline |
Get the beginning of the changes history iterator.
|
inline |
Get the end of the changes history iterator.
|
inline |
|
inline |
|
protectedpure virtual |
Implemented in ReaderHistory, and WriterHistory.
|
inline |
Find a specific change in the history using the matches_change method criteria.
| ch | Pointer to the CacheChange_t to search for. |
| FASTDDS_EXPORTED_API const_iterator find_change_nts | ( | CacheChange_t * | ch | ) |
Find a specific change in the history using the matches_change method criteria.
No Thread Safe
| ch | Pointer to the CacheChange_t to search for. |
| FASTDDS_EXPORTED_API bool get_change | ( | const SequenceNumber_t & | seq, |
| const GUID_t & | guid, | ||
| CacheChange_t ** | change ) const |
| const_iterator get_change_nts | ( | const SequenceNumber_t & | seq, |
| const GUID_t & | guid, | ||
| CacheChange_t ** | change, | ||
| const_iterator | hint ) const |
| bool get_earliest_change | ( | CacheChange_t ** | change | ) |
A method to get the change with the earliest timestamp.
| change | Pointer to pointer to earliest change |
| FASTDDS_EXPORTED_API bool get_max_change | ( | CacheChange_t ** | max_change | ) |
Get the maximum CacheChange_t.
| max_change | Pointer to pointer to the maximum change. |
| FASTDDS_EXPORTED_API bool get_min_change | ( | CacheChange_t ** | min_change | ) |
Get the minimum CacheChange_t.
| min_change | Pointer to pointer to the minimum change. |
|
inline |
Get the History size.
|
inline |
Get the mutex.
|
inline |
Get the maximum serialized payload size.
|
inline |
Check if the history is full.
|
virtual |
Verifies if an element of the changes collection matches a given change Derived classes have more info on how to identify univocally a change and should override.
| ch_inner | element of the collection to compare with the given change |
| ch_outer | Pointer to the CacheChange_t to identify. |
Reimplemented in ReaderHistory, and WriterHistory.
|
protected |
Print the seqNum of the changes in the History (for debuggisi, mng purposes).
| FASTDDS_EXPORTED_API bool remove_all_changes | ( | ) |
Remove all changes from the History.
| FASTDDS_EXPORTED_API bool remove_change | ( | CacheChange_t * | ch | ) |
Remove a specific change from the history.
| ch | Pointer to the CacheChange_t. |
| FASTDDS_EXPORTED_API bool remove_change | ( | CacheChange_t * | ch, |
| const std::chrono::time_point< std::chrono::steady_clock > & | max_blocking_time ) |
Remove a specific change from the history.
| ch | Pointer to the CacheChange_t. | |
| [in] | max_blocking_time | Maximum time this method has to complete the task. |
|
inline |
Remove a specific change from the history.
| removal | iterator to the CacheChange_t to remove. |
| release | defaults to true and hints if the CacheChange_t should return to the pool |
|
virtual |
Remove a specific change from the history.
No Thread Safe
| removal | iterator to the CacheChange_t to remove. |
| release | defaults to true and hints if the CacheChange_t should return to the pool |
Reimplemented in ReaderHistory, and WriterHistory.
|
virtual |
Remove a specific change from the history.
No Thread Safe
| removal | iterator to the CacheChange_t to remove. | |
| [in] | max_blocking_time | Maximum time this method has to complete the task. |
| release | defaults to true and hints if the CacheChange_t should return to the pool |
Reimplemented in ReaderHistory, and WriterHistory.
|
protected |
Removes the constness of a const_iterator to obtain a regular iterator.
This function takes a const_iterator as input and returns a regular iterator by removing the constness.
| c_it | The const_iterator to remove constness from. |
| HistoryAttributes m_att |
Attributes of the History.
|
protected |
Vector of pointers to the CacheChange_t.
|
protected |
Variable to know if the history is full without needing to block the History mutex.
|
protected |
Mutex for the History.