minos.common.database.locks.impl
Classes
Database Lock class. |
- class DatabaseLock[source]
Bases:
Lock
Database Lock class.
- __init__(client, key, *args, operation_factory=None, **kwargs)[source]
- Parameters
client (DatabaseClient) –
key (Hashable) –
operation_factory (Optional[LockDatabaseOperationFactory]) –
- async acquire()[source]
Acquire the lock.
- Returns
This method does not return anything.
- Return type
None
- async release()[source]
Release the lock.
- Returns
This method does not return anything.
- Return type
None
- hashed_key
Get the hashed key.
- Returns
An integer value.