Skip to main content

Module lock

Module lock 

Source
Expand description

Named locks.

Structs§

FilesystemLockStore
Disk-backed LockStore (one file per resource).
FilesystemLockStoreConfig
Configuration for FilesystemLockStore.
InMemoryLockStore
In-process lock store backed by a Mutex + HashMap.
Lock
Named lock bound to one owner token and a LockStore.
LockFactory
Creates Lock handles against a shared LockStore.
LockKey
Resource name plus opaque owner token.
LockStoreService
Newtype so LockStore trait objects can be stored in the container.
RegisterDefaultLockPass
Seeds DEFAULT_LOCK_STORE_SERVICE with an InMemoryLockStore when missing.

Enums§

LockError
Failure while creating or operating a lock.

Constants§

DEFAULT_LOCK_STORE_SERVICE
Container id of the default lock store when registered by the pass.
DEFAULT_LOCK_TTL
Default TTL when LockFactory::create_lock receives ttl: None (Symfony default).
LOCK_STORE_TAG
Service tag applied to lock store definitions.

Traits§

LockStore
Low-level lock persistence (Symfony PersistingStoreInterface analogue).

Functions§

generate_lock_token
Generates a random hex owner token.
validate_resource
Rejects empty resource names.