Base class inherited by both ChunkSource, for implementing the backend part of chunk sources that also have a frontend-part, as well as other chunk sources, such as the GenericFileSource, that has only a backend part.

Hierarchy

Constructors

Properties

RPC_TYPE_ID: string

Should be set to a constant specifying the SharedObject type identifier on the prototype of final derived owner classes. It is not used on counterpart (non-owner) classes.

chunkManager: ChunkManager
chunks: Map<string, Chunk> = ...
disposedStacks: any
freeChunks: Chunk[] = ...
isOwner: undefined | boolean
listeners_: Map<string, ChunkStateListener[]> = ...
refCount: number = 1
referencedGeneration: number
rpc: null | RPC = null
rpcId: null | number = null
sourceQueueLevel: number = 0

sourceQueueLevel must be greater than the sourceQueueLevel of any ChunkSource whose download method depends on chunks from this source. A normal ChunkSource with no other dependencies should have a level of 0.

statistics: Float64Array = ...
unreferencedGeneration: number
wasDisposed: undefined | boolean

Methods

  • Begin downloading the specified the chunk. The returned promise should resolve when the downloaded data has been successfully decoded and stored in the chunk, or rejected if the download or decoding fails.

    Note: This method must be defined by subclasses.

    Parameters

    • chunk: Chunk

      Chunk to download.

    • cancellationToken: CancellationToken

      If this token is canceled, the download/decoding should be aborted if possible.

      TODO(jbms): Move this back to the class definition above and declare this abstract once mixins are compatible with abstract classes.

    Returns Promise<void>

Generated using TypeDoc