Class SliceViewChunkSourceBackend<Spec, ChunkType>

License

Copyright 2016 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Type Parameters

Hierarchy

Implements

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.

chunkConstructor: ChunkConstructor<SliceViewChunk>
chunkManager: ChunkManager
chunks: Map<string, ChunkType>
disposedStacks: any
freeChunks: Chunk[] = ...
isOwner: undefined | boolean
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.

spec: Spec
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