TileStorage Class

Facilitates interaction with cloud tile cache.

Methods

Name Description
constructor(storage: ServerStorage): TileStorage    
downloadTile(iModelId: string, changesetId: string, treeId: string, contentId: string, guid?: string): Promise<Uint8Array> Downloads a tile from the cloud cache.  
getCachedTiles(iModelId: string): Promise<TileId[]> Returns a list of all tiles that are found in the cloud cache.  
getCachedTilesGenerator(iModelId: string): AsyncGenerator<TileId, any, unknown> Returns an async iterator of all tiles that are found in the cloud cache.  
getDownloadConfig(iModelId: string, expiresInSeconds?: number): Promise<TransferConfig> Returns config that can be used by frontends to download tiles  
initialize(iModelId: string): Promise<void> Ensures any required cloud storage resources for a specific iModel are ready to use.  
isTileCached(iModelId: string, changesetId: string, treeId: string, contentId: string, guid?: string): Promise<boolean> Returns a boolean indicating whether a tile exists in the cloud cache  
uploadTile(iModelId: string, changesetId: string, treeId: string, contentId: string, content: Uint8Array, guid?: string, metadata?: Metadata): Promise<void> Uploads a tile to the cloud cache.  

Properties

Name Type Description
storage Readonly ServerStorage Allows using the underlying ServerStorage API directly.  

Defined in

Last Updated: 19 April, 2024