Expirer class
- Inheritance
-
- Object
- GenericStore<
int> - Expirer
- Implemented types
Constructors
Properties
- context → String
-
finalinherited
-
data
↔ Map<
String, int> -
Stores map of key to pairing info
getter/setter pairinherited
- fromJson → int Function(dynamic)
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onCreate
→ Event<
StoreCreateEvent< int> > -
Emitted when a new key is added to the store.
The event contains the key and the value of type
T
.finalinherited -
onDelete
→ Event<
StoreDeleteEvent< int> > -
Emitted when a key is deleted from the store.
The event contains the key and the value of type
T
.finalinherited -
onExpire
→ Event<
ExpirationEvent> -
final
-
onSync
→ Event<
StoreSyncEvent> -
Emitted when the store is persisted to storage.
This event can be used as a catchall for any creations, updates, or deletions.
finalinherited
-
onUpdate
→ Event<
StoreUpdateEvent< int> > -
Emitted when a key is updated in some way: overwritten, some piece changes, etc.
The event contains the key and the value of type
T
.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storage → IStore
-
finalinherited
- storageKey → String
-
no setterinherited
- version → String
-
finalinherited
Methods
-
checkAndExpire(
String key) → Future< bool> -
Checks if the key has expired and deletes it if it has
Returns true if the key was deleted
Returns false if the key was not deleted
override
-
checkExpiry(
String key, int expiry) → Future< bool> -
override
-
checkInitialized(
) → void -
inherited
-
delete(
String key) → Future< void> -
inherited
-
expire(
String key) → Future< void> -
override
-
get(
String key) → int? -
inherited
-
getAll(
) → List< int> -
inherited
-
has(
String key) → bool -
inherited
-
init(
) → Future< void> -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
persist(
) → Future< void> -
inherited
-
restore(
) → Future< void> -
inherited
-
set(
String key, int value) → Future< void> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited