import type { CobuildConfiguration } from '../../api/CobuildConfiguration';
import type { OperationStatus } from '../operations/OperationStatus';
import type { ICobuildContext } from './ICobuildLockProvider';
import type { OperationBuildCache } from '../buildCache/OperationBuildCache';
export interface ICobuildLockOptions {
    /**
     * {@inheritdoc CobuildConfiguration}
     */
    cobuildConfiguration: CobuildConfiguration;
    /**
     * {@inheritdoc ICobuildContext.clusterId}
     */
    cobuildClusterId: string;
    /**
     * {@inheritdoc ICobuildContext.packageName}
     */
    packageName: string;
    /**
     * {@inheritdoc ICobuildContext.phaseName}
     */
    phaseName: string;
    operationBuildCache: OperationBuildCache;
    /**
     * The expire time of the lock in seconds.
     */
    lockExpireTimeInSeconds: number;
}
export interface ICobuildCompletedState {
    status: OperationStatus.Success | OperationStatus.SuccessWithWarning | OperationStatus.Failure;
    cacheId: string;
}
export declare class CobuildLock {
    readonly cobuildConfiguration: CobuildConfiguration;
    readonly operationBuildCache: OperationBuildCache;
    private _cobuildContext;
    constructor(options: ICobuildLockOptions);
    setCompletedStateAsync(state: ICobuildCompletedState): Promise<void>;
    getCompletedStateAsync(): Promise<ICobuildCompletedState | undefined>;
    tryAcquireLockAsync(): Promise<boolean>;
    renewLockAsync(): Promise<void>;
    get cobuildContext(): ICobuildContext;
}
//# sourceMappingURL=CobuildLock.d.ts.map