import { type TAddress, type TClientId, type TNetworkId_S } from '@flux/shared/types';
import type { TFluxClientUID } from '@flux/shared/utils';
export declare class NetworkAuthorityRedisCache {
    private readonly redisConnection;
    private readonly cache;
    private readonly clientCache;
    /**
     * Registers a network authority.
     *
     * @param { TNetworkId_S } networkId - The network ID to register on
     * @param { TClientId } clientId - The socket ID of the authority
     * @param { TFluxClientUID } [machineUID] - Optional machine UID
     *
     * @returns { Promise<void> }
     */
    register(networkId: TNetworkId_S, clientId: TClientId, machineUID?: TFluxClientUID): Promise<void>;
    /**
     * Unregisters a network authority from the local network.
     *
     * @param { TClientId } clientId
     * @param { TNetworkId_S } [networkId]
     *
     * @returns { Promise<void> }
     */
    unregister(clientId: TClientId, networkId?: TNetworkId_S): Promise<void>;
    /**
     * Used for cleanup, in case of discovering an idle authority.
     *
     * @param { TNetworkId_S } networkId - The network ID
     * @param { TAddress } networkAuthorityAddress - The address of the authority to unregister globally
     *
     * @returns { void }
     */
    unregisterGlobal(networkId: TNetworkId_S, networkAuthorityAddress: TAddress): void;
    /**
     * Resolves a random network authority address for a given network ID.
     *
     * @param { TNetworkId_S } networkId - The network ID to resolve an authority for
     *
     * @returns { Promise<TAddress> } The resolved authority address
     */
    resolveAuthorityAddressOrThrow(networkId: TNetworkId_S): Promise<TAddress>;
    /**
     * Removes a client from the cache and unregisters it globally.
     *
     * @param { TNetworkId_S } networkId
     * @param { TAddress } networkAuthorityAddress - The address of the unresponsive client
     */
    removeUnresponsiveClient(networkId: TNetworkId_S, networkAuthorityAddress: TAddress): void;
}
