Abstract

CachedManager

export abstract class CachedManager<K, Holds, R> extends DataManager<K, Holds, R>
export abstract class CachedManager<K, Holds, R> extends DataManager<K, Holds, R>
Manages the API methods of a data model with a mutable cache of instances.

Extends

DataManager<K, Holds, R>
NameConstraintsOptionalDefaultDescription
KNoNone
HoldsNoNone
RNoNone
constructor(client, holds, iterable?)
Constructs a new instance of the CachedManager class
NameTypeOptionalDescription
clientClient<true>NoNone
holdsConstructable<Holds>NoNone
iterableIterable<Holds>YesNone
Readonly
cache:Collection<K, Holds>
The cache of items for this manager.
Inherited from DataManager
Readonly
client:Client
The client that instantiated this Manager
Inherited from BaseManager
Readonly
holds:Constructable<Holds>
The data structure belonging to this manager.
Inherited from DataManager
resolve(idOrInstance):Holds
Resolves a data entry to a data Object.
Returns
An instance from this Manager
NameTypeOptionalDescription
idOrInstanceHoldsNoThe id or instance of something in this Manager
resolveId(idOrInstance):K
Resolves a data entry to an instance id.
Returns
NameTypeOptionalDescription
idOrInstanceK | HoldsNoThe id or instance of something in this Manager
valueOf():Collection<K, Holds>