SharedStore class abstract

Base class for SharedStore implementations.

Inheritance

Constructors

SharedStore(String id)
Creates a SharedStore with id.
factory
SharedStore.from({SharedStoreReference? reference, String? id})
Creates a SharedStore from reference or id.
factory
SharedStore.fromSharedReference(SharedStoreReference sharedReference)
Creates a SharedStore from sharedReference.
factory
SharedStore.fromUUID()
Creates a SharedStore using a ReferenceableType.newUUID as id.
factory
SharedStore.notShared()
Creates a SharedStore that can NOT be shared. Useful for tests or to have a version that disables the share capabilities.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
The ID of the referenceable instance.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getSharedMap<K, V>(String id, {SharedMapEventCallback? onInitialize, SharedMapKeyCallback<K, V>? onAbsent, SharedMapEntryCallback<K, V>? onPut, SharedMapEntryCallback<K, V>? onRemove}) FutureOr<SharedMap<K, V>?>
Returns a SharedMap with id in this SharedStore instance.
getSharedObject<O extends ReferenceableType>(String id, {Type? t}) FutureOr<O?>
Returns a shared object of type t or O with id. The object should be previously registered with registerSharedObject. See getSharedObjectReference.
override
getSharedObjectReference<O extends ReferenceableType, R extends SharedReference>(String id, {Type? t}) FutureOr<R?>
Returns a SharedReference R for type t or O with id. The object should be previously registered with registerSharedObject. See getSharedObject.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerSharedObject<O extends ReferenceableType>(O o) → void
Registers a shared object o (of type [O]). This object can be retrieved by getSharedObject and getSharedObjectReference.
sharedReference() SharedStoreReference
Returns the SharedReference of this instances, to instantiate it using a fromSharedReference constructor.
override
toString() String
A string representation of this object.
inherited

Operators

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