Lifespan class

Uses creation time and TTL to validate

Inheritance

Constructors

Lifespan.dynamic(int ttl, [Clock clock = Clock.system])
Creates dynamic validator that will change it's EntityValidator.isValid in time ttl Time to live clock Clock implementation
factory
Lifespan.snapshot(int ttl, [Clock clock = Clock.system])
Creates a snapshot that may be serialized and deserialized back to dynamic Lifespan ttl Time to live clock Clock implementation
factory

Properties

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

Methods

createSnapshot() EntityValidator
Crates a snapshot of validator preserving it's current EntityValidator.isValid value
override
isValid() bool
If true cached entity is valid.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize() String
A way to serialize entity
override
toString() String
A string representation of this object.
override

Operators

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

Static Methods

deserializer([Clock clock = Clock.system]) EntityValidatorDeserializer
Validator deserializer