minos.common.database.locks.factories

Classes

LockDatabaseOperationFactory

Lock Database Operation Factory class.

class LockDatabaseOperationFactory[source]

Bases: DatabaseOperationFactory, ABC

Lock Database Operation Factory class.

abstract build_acquire(hashed_key)[source]

Build the database operation to acquire the lock.

Parameters

hashed_key (int) – The hashed key that identifies the lock.

Returns

A DatabaseOperation instance.

Return type

DatabaseOperation

abstract build_release(hashed_key)[source]

Build the database operation to release the lock.

Parameters

hashed_key (int) – The hashed key that identifies the lock.

Returns

A DatabaseOperation instance.

Return type

DatabaseOperation