/** * manages multi-count lock for multiple Ids - holds total count of locks & manages its change * * during init, max total lock amount can be set defaulted to 0 (0 - unlimited) * * on any given id lock can be acquired and released in the future * all locks can be cleared for specified id */ export declare class MultiLock { lockLimit: number; private lockHash; private lockLength; /** * * @param lockLimit - max amount of locks for all ids */ constructor(lockLimit?: number); /** * try to one acquire lock - if lock acquired returns true otherwise false * * @param {string} id - lockID */ acquire(id: string): boolean; /** * releases one lock for given id * * @param {string} id - lockID */ release(id: string): boolean; /** * unlocks all locks for given Id * * @param {string|void} id - lockID */ clean(id: string | void): void; /** * if given a string, returns lock amount for that id else returns total amount for all ids in sum * * @param {string|void} id - lockID */ getSize(id: string | void): number; /** * return map if given a string, returns lock amount for that id else returns total amount for all ids in sum * */ getIds(): Map; } //# sourceMappingURL=multi-lock.d.ts.map