UNPKG

@sap/xssec

Version:

XS Advanced Container Security API for node.js

33 lines 1.31 kB
export = ResponseReplica; declare class ResponseReplica { constructor(cache: any, key: any, request: any); cache: any; key: any; request: any; data: any; lastRefresh: any; expirationTime: any; pendingRequest: any; /** * Returns the remaining time until expiration. * @returns time until expiration or 0 if no data available or data expired */ get remainingTime(): number; /** Returns whether the replica already has response data. **/ hasData(): boolean; /** Returns whether the replica is expired. **/ isExpired(): boolean; /** * Returns if the replica is considered stale given the refresh period. Stale replicas should be refreshed but may still be used before expiration. * @param refreshPeriod time period (in ms) before expiration time in which the replica should count as stale (but not yet as expired) * @returns true if the replica is already expired or will expire within the given refresh period. */ isStale(refreshPeriod: any): any; /** * Triggers a refresh of this replica. Multiple calls will still result in only one refresh at a time. * @param {string} correlationId */ refresh(correlationId: string): any; #private; } //# sourceMappingURL=ResponseReplica.d.ts.map