Skip to main content

6 docs tagged with "SharedLock"

View all tags

SharedLock middlewares

The SharedLock middleware wraps function calls with a distributed shared lock (reader-writer lock), providing concurrency control with two access modes: Reader mode ("READER") allows multiple callers to execute the wrapped function concurrently as long as no writer holds the lock, while Writer mode ("WRITER") grants exclusive access. Before executing the wrapped function, the appropriate lock is acquired on a key derived from the function's arguments.

SharedLock usage

The eridu-tech/shared-lock component provides a way for managing shared-locks (a.k.a reader writer locks) independent of underlying platform or storage.

SharedLockFactoryResolver

The SharedLockFactoryResolver class provides a flexible way to configure and switch between different shared-lock adapters at runtime.