UNPKG

@itwin/core-frontend

Version:
26 lines 1.42 kB
/** @packageDocumentation * @module Utils */ import { ReadonlySortedArray } from "@itwin/core-bentley"; import { TileUser } from "../../tile/internal"; /** An immutable set of [[TileUser]]s wherein uniqueness is determined by each TileUser's unique integer identifier. * @see [[UniqueTileUserSets]]. */ export declare class ReadonlyTileUserSet extends ReadonlySortedArray<TileUser> { constructor(user?: TileUser); } /** Maintains a set of [[TileUserSets]] designed to minimize duplication. * For example, the tile request scheduler needs to associate with each [[TileRequest]] the set of [[TileUser]]s awaiting the request's response. * Using UniqueTileUserSets ensures all tiles requested by the same user use the same TileUserSet object. * Additionally, whenever a user is unregistered there is no need to track down every associated tile request - the user can just be removed from the TileUserSets managed by this object. * The TileUserSets managed by this object should be treated as immutable - "adding" a user to an existing set should be done using [[getTileUserSet]]. */ export declare class UniqueTileUserSets { private readonly _sets; getTileUserSet(user: TileUser, users?: ReadonlyTileUserSet): ReadonlyTileUserSet; clearAll(): void; clear(): void; remove(user: TileUser): void; static get emptySet(): ReadonlyTileUserSet; } //# sourceMappingURL=TileUserSet.d.ts.map