Class IOfflineStorageObserver
Defined in File IOfflineStorage.hpp
Class Documentation
-
class Microsoft::Applications::Events::IOfflineStorageObserver
Public Functions
-
inline virtual ~IOfflineStorageObserver()
-
virtual void OnStorageOpened(std::string const &type) = 0
Called when the offline storage (re)opens its backing storage
The type parameter is any textual description of the active underlying offline storage implementation. The recommended format is “<c><impl>/<state></c>”, where
<impl>is name of the implementation (e.g. “SQLite”) and<state>is description of the current state (e.g. if using the “Default”, “Temp” or “None” database file).- Parameters
type – Current storage description
-
virtual void OnStorageFailed(std::string const &reason) = 0
Called when the offline storage encounters some failure
The parameter reason is any textual description of the problem that occurred. It does not necessarily have to be human-readable or self-explaining, it can be just a numerical code that only that implementation’s maintainer can understand.
- Parameters
reason – Reason of the current/recent failure
-
virtual void OnStorageOpenFailed(std::string const &reason) = 0
Called when the offline storage is not open.
The parameter reason is any textual description of the problem that occurred. It does not necessarily have to be human-readable or self-explaining, it can be just a numerical code that only that implementation’s maintainer can understand.
- Parameters
reason – Reason of the current/recent failure
-
virtual void OnStorageTrimmed(DroppedMap const &numRecords) = 0
Called when the offline storage trims some records off in order to maintain its configured size limit
- Parameters
numRecords – Number of records trimmed
-
virtual void OnStorageRecordsDropped(std::map<std::string, size_t> const &numRecords) = 0
Called when the offline storage drops some records with retry count over the configured limit
- Parameters
numRecords – Number of records dropped
-
virtual void OnStorageRecordsRejected(std::map<std::string, size_t> const &numRecords) = 0
Called when the offline storage rejects some records for reason like killSwitch over the configured limit
- Parameters
numRecords – Number of records dropped
-
virtual void OnStorageRecordsSaved(size_t numRecords) = 0
-
inline virtual ~IOfflineStorageObserver()