@itwin/core-frontend
Version:
iTwin.js frontend components
28 lines • 1.54 kB
TypeScript
/** @packageDocumentation
* @module Tiles
*/
import { BeTimePoint } from "@itwin/core-bentley";
import { TileUser } from "./internal";
/** A marker associated with a [[Tile]] to track usage of that tile by any number of [[TileUser]]s.
* The marker tracks:
* - the set of [[TileUser]]s by which the tile is in use for some purpose (displayed, preloaded, requested, selected for shadow map, etc); and
* - the most recent time at which any tile user declared its use of the tile.
* The marker is used to allow tiles to be discarded after they become disused by any tile user, via [[Tile.prune]].
* @see [[Tile.usageMarker]].
* @public
* @extensions
*/
export declare class TileUsageMarker {
private _timePoint;
/** Constructs a usage marker with its timepoint set to the current time and its set of [[TileUser]]s empty. */
constructor();
/** Returns true if this tile is currently in use by no [[TileUser]]s and its timestamp pre-dates `expirationTime`. */
isExpired(expirationTime: BeTimePoint): boolean;
/** Returns true if this tile is currently in use by any [[TileUser]]. */
getIsTileInUse(): boolean;
/** Returns true if this tile's timestamp pre-dates `expirationTime`, without checking if it is in use. */
isTimestampExpired(expirationTime: BeTimePoint): boolean;
/** Updates the timestamp to the specified time and marks the tile as being in use by the specified [[TileUser]]. */
mark(user: TileUser, time: BeTimePoint): void;
}
//# sourceMappingURL=TileUsageMarker.d.ts.map