InMemoryStorage class

In-memory storage backend for development and testing.

All data is lost when the process exits.

Implemented types

Constructors

InMemoryStorage()

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

clearMessages(String userId) Future<void>
Removes all pending messages for userId.
override
getMessageCount() Future<int>
Returns the total number of pending messages.
override
getMessages(String userId) Future<List<MessageRecord>>
Returns all pending messages for userId.
override
getPreKey(String userId) Future<PreKeyRecord?>
Returns the PreKeyRecord for userId, or null if none available.
override
getPreKeyCount() Future<int>
Returns the total number of stored pre-key bundles.
override
getUser(String userId) Future<UserRecord?>
Returns the UserRecord for userId, or null if not found.
override
getUserCount() Future<int>
Returns the total number of registered users.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerUser(UserRecord record) Future<void>
Registers a new user. Throws StateError if the user already exists.
override
removePreKey(String userId) Future<void>
Removes the pre-key bundle for userId.
override
storeMessage(MessageRecord record) Future<void>
Stores a pending message for later retrieval.
override
storePreKey(PreKeyRecord record) Future<void>
Stores (or replaces) a pre-key bundle for a user.
override
toString() String
A string representation of this object.
inherited

Operators

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