import * as CL from "../Clock/index.js"; import * as Tp from "../Collections/Immutable/Tuple/index.js"; import * as T from "../Effect/index.js"; import type * as Ex from "../Exit/index.js"; import * as Ref from "../Ref/index.js"; export declare abstract class StrategyBase { readonly _State: State; readonly [T._R]: (_: Environment) => void; readonly [T._E]: (_: Error) => void; readonly [T._A]: (_: Item) => void; abstract initial(): T.RIO; abstract track(state: State): (item: Ex.Exit) => T.UIO; abstract run(state: State, getExcess: T.UIO, shrink: T.UIO): T.UIO; } export declare type Strategy = StrategyBase; declare type StrategyState> = T["_State"]; /** * A strategy that does nothing to shrink excess items. This is useful * when the minimum size of the pool is equal to its maximum size and so * there is nothing to do. */ export declare class None extends StrategyBase { initial(): T.RIO; track(_state: StrategyState): (attempted: Ex.Exit) => T.UIO; run(_state: StrategyState, _getExcess: T.UIO, _shrink: T.UIO): T.UIO; } /** * A strategy that shrinks the pool down to its minimum size if items in * the pool have not been used for the specified duration. */ export declare class TimeToLive extends StrategyBase]>, CL.HasClock, unknown, unknown> { readonly timeToLive: number; constructor(timeToLive: number); initial(): T.RIO>; track(state: StrategyState): (attempted: Ex.Exit) => T.UIO; run(state: StrategyState, getExcess: T.UIO, shrink: T.UIO): T.UIO; } export {}; //# sourceMappingURL=Strategy.d.ts.map