Skip to content

Class: RingBufferObjectCache ​

Implements ​

Constructors ​

Constructor ​

new RingBufferObjectCache(maxSize?): RingBufferObjectCache

Parameters ​

maxSize? ​

number = 100

Returns ​

RingBufferObjectCache

Methods ​

add() ​

add(obj): void

Insert a new MoqtObject, preserving sorted order (duplicates allowed or replaced impl‑defined).

Parameters ​

obj ​

MoqtObject

Returns ​

void

Implementation of ​

ObjectCache.add


clear() ​

clear(): void

Remove all cached objects.

Returns ​

void

Implementation of ​

ObjectCache.clear


getByLocation() ​

getByLocation(location): MoqtObject | undefined

Return the object whose Location exactly matches (group & object) or undefined if absent.

Parameters ​

location ​

Location

Returns ​

MoqtObject | undefined

Implementation of ​

ObjectCache.getByLocation


getRange() ​

getRange(start?, end?): MoqtObject[]

Return a shallow copy array of objects whose Location is >= start and < end (end exclusive).

Parameters ​

start? ​

Location

end? ​

Location

Returns ​

MoqtObject[]

Implementation of ​

ObjectCache.getRange


size() ​

size(): number

Current number of cached objects.

Returns ​

number

Implementation of ​

ObjectCache.size