PulseStorage class abstract interface

Defines the contract for persisting PulseEvents on the device.

Storage enables offline event queuing: events captured when the transport is unavailable are stored locally and retried when connectivity is restored.

Note

No implementation is provided in Phase 1. This interface is defined early so that the EventPipeline architecture accommodates persistence without requiring structural refactoring in future phases.

Implementations will be added in Phase 3 (offline queue support).

Implementing custom storage

final class SharedPrefsStorage implements PulseStorage {
  @override
  Future<void> store(PulseEvent event) async { ... }

  @override
  Future<List<PulseEvent>> retrieveAll() async { ... }

  @override
  Future<void> delete(String eventId) async { ... }

  @override
  Future<void> clear() async { ... }
}

See also:

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Removes all stored events.
delete(String eventId) Future<void>
Removes the event with eventId from storage.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
retrieveAll() Future<List<PulseEvent>>
Returns all currently stored events.
store(PulseEvent event) Future<void>
Persists event for later retrieval.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited