// SPDX-License-Identifier: Apache-2.0
import { Duration } from '../../../../src/core/time/duration.js';
export class NoopLeaseRenewalService {
    buffer;
    counter;
    constructor() {
        this.buffer = new SharedArrayBuffer(Uint32Array.BYTES_PER_ELEMENT);
        this.counter = new Uint32Array(this.buffer);
        Atomics.store(this.counter, 0, 1);
    }
    async isScheduled(scheduleId) {
        return scheduleId > 0;
    }
    async schedule(lease) {
        return Atomics.add(this.counter, 0, 1);
    }
    async cancel(scheduleId) {
        return true;
    }
    async cancelAll() {
        return new Map();
    }
    calculateRenewalDelay(lease) {
        return Duration.ofSeconds(10);
    }
}
//# sourceMappingURL=noop-lease-renewal-service.test.js.map