import { LocalLockItem, LockKey, MutexStackItem } from '../utils/interfaces'; import { MutexSynchronizer, MutexSynchronizerOptions } from './MutexSynchronizer'; export interface SharedMutexUnlockHandler { unlock(): void; } export type MutexHandler = () => Promise; export declare class MutexExecutor { readonly synchronizer: MutexSynchronizer; constructor(synchronizer: MutexSynchronizer); lockSingleAccess(lockKey: LockKey, handler: MutexHandler, maxLockingTime?: number, codeStack?: string): Promise; lockMultiAccess(lockKey: LockKey, handler: MutexHandler, maxLockingTime?: number, codeStack?: string): Promise; lockAccess(lockKey: LockKey, handler: MutexHandler, singleAccess?: boolean, maxLockingTime?: number, codeStack?: string): Promise; setOptions(options: Partial): void; watchdog(phase?: string, args?: any): Promise; private id; protected waitingMessagesHandlers: { resolve: (message: any) => void; hash: string; action: string; }[]; protected static stackStorage: import("./AsyncLocalStorage").AsyncLocalStorageMock; protected static allLocks: MutexStackItem[]; protected lock(key: LockKey, itemData: Omit, codeStack?: string): Promise; protected unlock(hash: string): void; }