/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { PeerSubscription } from "#node/server/InteractionServer.js"; import { DatatypeModel } from "@matter/model"; import { Behavior } from "../../Behavior.js"; /** * Subscriptions Persistence handling. * * This behavior collects and stores active subscriptions to allow re-activating them on restart in order to try to * speed up the controller reconnection process. This can mean a bit more memory usage on start of the device. To * disable this feature set `persistenceEnabled` as state of the `subscription` behavior to `false`. */ export declare class SubscriptionsServer extends Behavior { #private; static readonly id = "subscriptions"; readonly state: SubscriptionsServer.State; internal: SubscriptionsServer.Internal; initialize(): void; static readonly schema: DatatypeModel; /** * Start recording the subscriptions of a new run of the node. The subscriptions recorded so far become the former * subscriptions that {@link reestablishFormerSubscriptions} re-establishes. * * The node invokes this each time it starts its network, before it accepts or re-establishes subscriptions. * * @internal */ beginRun(): void; reestablishFormerSubscriptions(): Promise; } export declare namespace SubscriptionsServer { class State { /** Set to false if persistence of subscriptions should be disabled */ persistenceEnabled: boolean; /** * List of subscriptions. This list is collected automatically. * The state value should not be initialized by the developer. */ subscriptions: PeerSubscription[]; } class Internal { /** * Subscriptions that were established on the former device run. {@link SubscriptionsServer.beginRun} sets * them from the recorded subscriptions and they are then used to re-establish the subscriptions. */ formerSubscriptions: PeerSubscription[]; } } //# sourceMappingURL=SubscriptionsServer.d.ts.map