SnapshotRegistry class
Central registry for state providers with key mapping.
The registry maps string keys to state handlers (exporter/importer pairs) and enforces unique key registration. This is an internal class used by the Checkpoint SDK to manage registered state contributors.
Thread-safety: Registration and lookup operations are synchronized to ensure safe concurrent access.
Properties
Methods
-
clear(
) → void - Clears all registered handlers.
-
getAllKeys(
) → List< String> - Gets all registered keys in a deterministic order.
-
getExporter(
String key) → Map< String, dynamic> Function()? - Gets the exporter function for the given key.
-
getImporter(
String key) → void Function(Map< String, dynamic> )? - Gets the importer function for the given key.
-
isRegistered(
String key) → bool - Checks if a key is registered.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
String key, Map< String, dynamic> exporter(), void importer(Map<String, dynamic> )) → void - Registers a state handler with the given key.
-
synchronized<
T> (T action()) → T - Executes a function within a synchronized block.
-
toString(
) → String -
A string representation of this object.
inherited
-
unregister(
String key) → bool - Unregisters a state handler with the given key.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → SnapshotRegistry
-
Get the singleton instance.
no setter