Options
All
  • Public
  • Public/Protected
  • All
Menu

A data structure for selecting elements to expire in order

Type parameters

  • TKey

Hierarchy

  • IAgedQueue

Implemented by

Index

Properties

compare

param ageA

The first age to compare

param ageB

The second age to compare

returns

0 if same order, positive if ageA after ageB, negative if ageA before ageB

Methods

addOrReplace

  • addOrReplace(key: TKey, age?: number): void
  • Parameters

    • key: TKey

      The key to add

    • Optional age: number

      The age if explicitly or default if undefined

    Returns void

delete

  • delete(key: TKey): void

getInitialAge

  • getInitialAge(key: TKey): number

isNextExpired

  • isNextExpired(): boolean

next

  • next(): null | TKey

size

  • size(): number

updateAge

  • updateAge(key: TKey): void

Generated using TypeDoc