Configuring Lock adapters
MemoryLockAdapter
MemoryLockAdapter
Implementing your custom ILockAdapter
The Lock middleware wraps function calls with a distributed lock, ensuring mutual exclusion across processes. Before executing the wrapped function, a lock is acquired on a key derived from the function's arguments. If another process already holds the lock, the call waits (or fails immediately for non-blocking locks) until the lock is released.
withLockPrefix plugin
The eridu-tech/lock component provides a way for managing locks independent of underlying platform or storage.
The LockFactoryResolver class provides a flexible way to configure and switch between different lock adapters at runtime.