Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new BaseDataSourceInput(cacheable?: boolean, cacheExpiration?: Date, retryCount?: number, timeoutInMillis?: number, reload?: boolean, cacheType?: CacheType): BaseDataSourceInput
  • Parameters

    • cacheable: boolean = false
    • cacheExpiration: Date = ...
    • retryCount: number = ...
    • timeoutInMillis: number = ...
    • reload: boolean = false
    • cacheType: CacheType = ...

    Returns BaseDataSourceInput

Properties

Optional cacheExpiration

cacheExpiration: Date

Expiration Date time of the cached item. Default is current time plus 5 minutes.

Optional cacheType

cacheType: CacheType

cacheType defines where the response data should be stored. Default is IndexedBB. set cacheType storageType.INDEXEDDB/storageType.LOCALSTORAGE/storageType.SESSIONSTORAGE

Optional cacheable

cacheable: boolean

Flag to indicate if this datasource call should be cached.

Optional reload

reload: boolean

reload defines if the data should be retrive from the cache or not. Default is false. set reload to true when fresh data needs to fetched from the API

Optional retryCount

retryCount: number

retryCount defines the number of retry for datasource.execute() to be called if a failure is encountered.

Optional timeoutInMillis

timeoutInMillis: number

timeoutInMillis defines the timeout for API requests.

Static Private DEFAULT_CACHE_EXPIRATION

DEFAULT_CACHE_EXPIRATION: Date = ...

Methods

Abstract digest

  • digest(): Promise<string>
  • Returns Promise<string>

Protected digestData

  • digestData(...data: string[]): Promise<string>
  • This function generates a unique digest value for this input. Subclass needs to provide the unique data to be digested to ensure the uniqueness.

    Parameters

    • Rest ...data: string[]

      unique data to be digested.

    Returns Promise<string>

    Promise filled with hex string representation of the digested value. This hex string can be used for comparison and display.

Private hexString

  • hexString(buffer: any): string
  • This will convert a non empty ArrayBuffer to hex string.

    Parameters

    • buffer: any

      ArrayBuffer to convert to hex string representation.

    Returns string

    hexString string representation of buffer.

Generated using TypeDoc