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> = ...
credentialsProvider: undefined | CredentialsProvider<any>
disposedStacks: any
freeChunks: Chunk[] = ...
isOwner: undefined | boolean
minishardIndexSource: undefined | MinishardIndexSource = ...
properties: readonly Readonly<IndexedSegmentProperty>[]
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

  • Adds the specified chunk to the chunk cache.

    If the chunk cache was previously empty, also call this.addRef() to increment the reference count.

    Parameters

    Returns void

  • Precondition: this.isOwner === true.

    Returns {
        gen: number;
        id: null | number;
    }

    • gen: number
    • id: null | number
  • Precondition: this.isOwner === true.

    This should be called when the counterpart's refCount is decremented and reaches zero.

    Parameters

    • generation: number

    Returns void

  • Returns void

  • Returns void

  • 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>

  • Parameters

    • rpc: RPC
    • options: any = {}

    Returns void

  • Parameters

    • rpc: RPC
    • rpcId: number = ...

    Returns void

  • Precondition: this.isOwner === true.

    Returns void

  • Returns void

  • Type Parameters

    • T extends {
          cancel: (() => void);
      }

    Parameters

    • cancellable: T

    Returns T

  • Type Parameters

    Parameters

    • f: T

    Returns T

  • Remove the specified chunk from the chunk cache.

    If the chunk cache becomes empty, also call this.dispose() to decrement the reference count.

    Parameters

    Returns void

  • Parameters

    Returns boolean

  • Type Parameters

    Parameters

    • f: T

    Returns T

Generated using TypeDoc