NamedLockObservation class
A read-only, point-in-time observation of a NamedLock.
The observed state may change immediately after NamedLock.observe returns. It is suitable for diagnostics and monitoring, not coordination.
Constructors
- NamedLockObservation.held({required String name, required int ownerPid, required int ownerIsolateId, required DateTime acquiredAt})
-
Creates an observation of a lock held by a live owner.
const
- NamedLockObservation.notHeld({required String name})
-
Creates an observation of a lock without a live owner.
const
Properties
- acquiredAt → DateTime?
-
The approximate time at which the lock was acquired.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isHeld → bool
-
Whether the lock had a live owner when it was observed.
final
- name → String
-
The name of the observed lock.
final
- ownerIsolateId → int?
-
The isolate that owned the lock when it was observed.
final
- ownerPid → int?
-
The process that owned the lock when it was observed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited