Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SyncReferenceCollection<K, V>

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected Readonly _keys

_keys: Map<string, K> = new Map<string, K>()

Protected Readonly _values

_values: Map<string, V> = new Map<string, V>()

Protected Readonly factory

factory: (key: K) => V

Type declaration

    • (key: K): V
    • Parameters

      • key: K

      Returns V

Readonly onDidCreate

onDidCreate: Event<V> = this.onDidCreateEmitter.event

Protected Readonly onDidCreateEmitter

onDidCreateEmitter: Emitter<V> = new Emitter<V>()

Readonly onWillDispose

onWillDispose: Event<V> = this.onWillDisposeEmitter.event

Protected Readonly onWillDisposeEmitter

onWillDisposeEmitter: Emitter<V> = new Emitter<V>()

Protected Readonly references

references: Map<string, DisposableCollection> = new Map<string, DisposableCollection>()

Protected Readonly toDispose

toDispose: DisposableCollection = new DisposableCollection()

Methods

acquire

clear

  • clear(): void

Protected createReferences

dispose

  • dispose(): void

Protected doAcquire

  • doAcquire(key: string, object: V): Reference<V>

get

  • get(args: K): V | undefined

Protected getOrCreateValue

  • getOrCreateValue(key: string, args: K): V

has

  • has(args: K): boolean

keys

  • keys(): K[]

Protected toKey

  • toKey(args: K): string

values

  • values(): V[]