Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InterestMap<DTInterestId, DTInterestFullfillment>

Type parameters

  • DTInterestId

  • DTInterestFullfillment

Hierarchy

  • InterestMap

Index

Constructors

constructor

Properties

Private comparisonFunc

comparisonFunc: IInterestComparisonFunc<DTInterestId>

a function to compare interests

Private interestObjectMap

interestObjectMap: ObjectMap<Interest<DTInterestId, DTInterestFullfillment>> = ...

stores interests that are currently fullfilled by the cache

interestObservable

interestObservable: ObservableIntake<Interest<DTInterestId, any>> = ...

options

Methods

addInterest

  • addInterest(interestId: DTInterestId, defaultFullfillmentArg?: DTInterestFullfillment): Promise<Interest<DTInterestId, DTInterestFullfillment>>
  • adds an interest to the InterestMap

    Parameters

    • interestId: DTInterestId
    • Optional defaultFullfillmentArg: DTInterestFullfillment

    Returns Promise<Interest<DTInterestId, DTInterestFullfillment>>

checkInterest

  • checkInterest(objectArg: DTInterestId): boolean
  • check interest

    Parameters

    • objectArg: DTInterestId

    Returns boolean

checkInterestByString

  • checkInterestByString(comparisonStringArg: string): boolean
  • checks an interest

    Parameters

    • comparisonStringArg: string

    Returns boolean

findInterest

  • findInterest(interestId: DTInterestId): Interest<DTInterestId, DTInterestFullfillment>
  • finds an interest

    Parameters

    • interestId: DTInterestId

    Returns Interest<DTInterestId, DTInterestFullfillment>

informLostInterest

  • informLostInterest(interestId: DTInterestId): void
  • inform lost interest

    Parameters

    • interestId: DTInterestId

    Returns void

removeInterest

  • removeInterest(interestArg: Interest<DTInterestId, DTInterestFullfillment>): void
  • removes an interest from the interest map

    Parameters

    • interestArg: Interest<DTInterestId, DTInterestFullfillment>

    Returns void

Generated using TypeDoc