vulcain-corejs
Version:
Vulcain micro-service framework
18 lines (17 loc) • 561 B
TypeScript
import { CommandProperties } from './commandProperties';
export declare class Semaphore {
private maxExecution;
private maxFallback;
private currentExecution;
private currentFallback;
constructor(maxExecution: number, maxFallback: number);
canExecuteCommand(): boolean;
releaseExecutionCommand(): void;
canExecuteFallback(): boolean;
releaseFallback(): void;
}
export declare class SemaphoreFactory {
private static semaphores;
static getOrCreate(info: CommandProperties): Semaphore;
static resetCache(): void;
}