import type { NetworkAgentRedisService } from '@flux/mesh/store/redis/network-agent';
import { NetworkUsageRedisCacheService } from '@flux/mesh/store/redis/network-usage';
import type { TAddress, TClientId, TAgentOwnUId, TNetworkId_S } from '@flux/shared/types';
import type { TFluxClientUID } from '@flux/shared/utils';
export declare class NetworkAgentRedisCache {
    readonly networkAgentRedisService: NetworkAgentRedisService;
    readonly networkUsageRedisCacheService: NetworkUsageRedisCacheService;
    private readonly redisConnection;
    private readonly cache;
    private readonly timers;
    constructor();
    /**
     * Register an agent.
     *
     * @param { TNetworkId_S } networkId - The network ID
     * @param { TClientId } id - The client socket ID
     * @param { Bun.SocketAddress | null } ip - The client IP address
     * @param { TAddress } address - The client address
     * @param { object } throughput - The throughput tracking object
     * @param { TAgentOwnUId } [uid] - Optional agent UID
     * @param { TFluxClientUID } [machineUID] - Optional machine UID
     *
     * @returns { Promise<void> }
     */
    registerAgent(networkId: TNetworkId_S, id: TClientId, ip: Bun.SocketAddress | null, address: TAddress, throughput: {
        bytes: number;
        packets: number;
    }, uid?: TAgentOwnUId, machineUID?: TFluxClientUID): Promise<void>;
    /**
     * Unregisters a network agent UID and associated data from the Redis hash.
     *
     * @param { TClientId } clientId
     * @param { TNetworkId_S } [networkId]
     * @param { TAgentOwnUId } [clientOwnUId] - Optional agent UID
     *
     * @returns { void }
     */
    unregister(clientId: TClientId, networkId?: TNetworkId_S, clientOwnUId?: {
        clientOwnUId: TAgentOwnUId;
        networkId: TNetworkId_S;
    }): Promise<void>;
    /**
     * Resolves the network client address by an agent's UID, using a local cache to avoid unnecessary Redis calls.
     *
     * @param { TNetworkId_S } networkId - The network ID
     * @param { TAgentOwnUId } clientOwnUId - The agent UID to look up
     *
     * @returns { Promise<TAddress> } The resolved address
     */
    resolveClientAddressByUid(networkId: TNetworkId_S, clientOwnUId: TAgentOwnUId): Promise<TAddress>;
}
