FilePersistor class
- Inheritance
-
- Object
- Persistor
- StubPersistor
- FilePersistor
Constructors
-
FilePersistor({void onClear(Set<
Collection> collections)?, void onClearAll()?, void onHydrate(Json data)?, void onPersist(Set<Document> batch)?, void onSync()?, Duration persistenceThrottle = const Duration(milliseconds: 100), PersistorSettings settings = const PersistorSettings()})
Properties
- encrypter → DataStoreEncrypter
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- logger → Logger
-
finalinherited
-
onClear
→ void Function(Set<
Collection> collections)? -
finalinherited
- onClearAll → void Function()?
-
finalinherited
- onHydrate → void Function(Json data)?
-
finalinherited
-
onPersist
→ void Function(Set<
Document> batch)? -
finalinherited
- onSync → void Function()?
-
finalinherited
- persistenceThrottle → Duration
-
The throttle for batching persisted documents. All documents updated within the throttle
duration are batched together into a single persist operation.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settings → PersistorSettings
-
finalinherited
Methods
-
clear(
List< Collection> collections) → Future<void> -
Clear function used to clear all documents under the given collections.
inherited
-
clearAll(
) → Future< void> -
Clears all documents and removes all persisted data.
inherited
-
hydrate(
[List< StoreReference> ? refs]) → Future<Json> -
Hydration function called to read data from persistence. If no entities are specified,
then it hydrations all persisted data. if entities are specified, it hydrates only the data from
the paths under those entities.
inherited
-
init(
) → Future< void> -
Public APIs to be implemented by any Persistor extension like FilePersistor.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
persist(
List< Document> docs) → Future<void> -
Persist function called with the bath of documents that have changed (including been deleted) within the last throttle window
specified by the Persistor.persistenceThrottle duration.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited