GenerationAwareLockStrategy class abstract interface

Optional LockStrategy capability that persists the container compaction generation inside the lock descriptor itself so peers avoid reopening the data file on every commit or sync() check.

Implemented types
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

close() → Future<void>
Releases any lock descriptors or handles maintained by this strategy.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readGenerationSync() → int
Reads the stored compaction generation (0 if uninitialized), callable while holding withSharedLock or withExclusiveLock.
toString() → String
A string representation of this object.
inherited
withExclusiveLock<T>(Future<T> action()) → Future<T>
Acquires an exclusive (writer/compactor) lock, runs action, and releases the lock.
inherited
withSharedLock<T>(Future<T> action()) → Future<T>
Acquires a shared (reader) lock, runs action, and releases the lock.
inherited
writeGenerationSync(int generation) → void
Stores generation inside the lock descriptor, callable while holding withExclusiveLock.

Operators

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