UNPKG

@microsoft/windows-admin-center-sdk

Version:

Microsoft - Windows Admin Center Shell

64 lines (63 loc) 2.54 kB
import { AppContext } from '../data/app-context'; import { QueryCache } from '../data/query-cache'; import { ClusterInventory } from '../shared/cluster-inventory/cluster-inventory'; import { GatewayInventory } from '../shared/gateway-inventory/gateway-inventory'; import { GatewayInventoryDetail } from '../shared/gateway-inventory/gateway-inventory-detail'; import { ServerInventory } from '../shared/server-inventory/server-inventory'; import { ServerInventoryDetail } from '../shared/server-inventory/server-inventory-detail'; export interface InventoryQueryCachesParams { name?: string; retry?: number; } export interface InventoryQueryCachesOptions { serverCache?: { expiration?: number; }; serverCombinedCache?: { expiration?: number; }; gatewayCache?: { expiration?: number; }; gatewayCombinedCache?: { expiration?: number; }; clusterCache?: { expiration?: number; }; } export declare class InventoryQueryCaches { private appContext; private serverInventoryCache; private serverInventoryDetailCache; private gatewayInventoryCache; private gatewayInventoryDetailCache; private clusterInventoryCache; private serverInventorySharedContext; private serverInventoryCacheNodeName; private gatewayCached; private gatewayCombinedCached; serverCache: QueryCache<ServerInventory, InventoryQueryCachesParams>; serverCombinedCache: QueryCache<[ServerInventory, ServerInventoryDetail], InventoryQueryCachesParams>; gatewayCache: QueryCache<GatewayInventory, InventoryQueryCachesParams>; gatewayCombinedCache: QueryCache<[GatewayInventory, GatewayInventoryDetail], InventoryQueryCachesParams>; clusterCache: QueryCache<ClusterInventory, InventoryQueryCachesParams>; constructor(appContext: AppContext, options?: InventoryQueryCachesOptions); /** * Clear all session storage. */ clear(): void; /** * Create server inventory query. * - It shares the query with ServerInventory and ServerInventoryCombined. Keep track the request and re-create if asked twice. * * @param params the inventory query parameters. * @param detail the state of server query or detail query. * @return Observable<ServerInventory> Shared ServerInventory observable. */ private createServerInventory; private createServerInventoryCombined; private createGatewayInventory; private createGatewayInventoryCombined; private createClusterInventory; }