Search Results for

    / fm / liveswitch / DataBufferPool

    Class: DataBufferPool

    fm.liveswitch.DataBufferPool

    A data buffer pool.

    Implements

    • IDataBufferPool

    Table of contents

    Constructors

    • constructor

    Methods

    • fmliveswitchDataBufferPoolInit
    • getBlockSize
    • getDisabled
    • getEnableStatistics
    • getPooledBytesAvailable
    • getStatistics
    • getTraceStatistics
    • getTypeString
    • releasePools
    • setDisabled
    • setEnableStatistics
    • take
    • getInstance
    • getIsSupported
    • getTracer

    Constructors

    constructor

    + new DataBufferPool(): DataBufferPool

    Initializes a new instance of the [[fm.liveswitch.dataBufferPool]] class.

    Returns: DataBufferPool

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:36

    + new DataBufferPool(tag: string): DataBufferPool

    Initializes a new instance of the [[fm.liveswitch.dataBufferPool]] class.

    Parameters:

    Name Type Description
    tag string The tag for stats output.

    Returns: DataBufferPool

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:42

    Methods

    fmliveswitchDataBufferPoolInit

    ▸ PrivatefmliveswitchDataBufferPoolInit(): void

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:31


    getBlockSize

    ▸ getBlockSize(): number

    Gets the block size.

    Returns: number

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:254


    getDisabled

    ▸ getDisabled(): boolean

    Gets whether the pool is disabled. If disabled, each call to take a buffer will result in a new allocation.

    Returns: boolean

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:268


    getEnableStatistics

    ▸ getEnableStatistics(): boolean

    Gets whether to enable statistics.

    Returns: boolean

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:280


    getPooledBytesAvailable

    ▸ getPooledBytesAvailable(): number

    Gets the total bytes available in the pool.

    Returns: number

    Implementation of: IDataBufferPool

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:307


    getStatistics

    ▸ getStatistics(): PoolStatistics

    Gets the pool usage statistics.

    Returns: PoolStatistics

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:329


    getTraceStatistics

    ▸ getTraceStatistics(): PoolStatistics[]

    Gets all tagged pool usage statistics.

    Returns: PoolStatistics[]

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:341

    ▸ getTraceStatistics(tag: string): PoolStatistics

    Gets pool usage statistics for a specific tag.

    Parameters:

    Name Type Description
    tag string The tag.

    Returns: PoolStatistics

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:348

    ▸ getTraceStatistics(type: Type): PoolStatistics

    Gets pool usage statistics for a specific tag.

    Parameters:

    Name Type Description
    type Type The type to use as the tag.

    Returns: PoolStatistics

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:355


    getTypeString

    ▸ getTypeString(): string

    Returns: string

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:9


    releasePools

    ▸ releasePools(): void

    Release the pools.

    Returns: void

    Implementation of: IDataBufferPool

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:400


    setDisabled

    ▸ setDisabled(value: boolean): void

    Sets whether the pool is disabled. If disabled, each call to take a buffer will result in a new allocation.

    Parameters:

    Name Type
    value boolean

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:462


    setEnableStatistics

    ▸ setEnableStatistics(value: boolean): void

    Sets whether to enable statistics.

    Parameters:

    Name Type
    value boolean

    Returns: void

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:474


    take

    ▸ take(size: number): DataBuffer

    Takes a buffer from the pool.

    Parameters:

    Name Type Description
    size number The number of bytes needed.

    Returns: DataBuffer

    Implementation of: IDataBufferPool

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:495

    ▸ take(size: number, littleEndian: boolean): DataBuffer

    Takes a buffer from the pool.

    Parameters:

    Name Type Description
    size number The number of bytes needed.
    littleEndian boolean Whether the data buffer should be little-endian.

    Returns: DataBuffer

    Implementation of: IDataBufferPool

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:503

    ▸ take(size: number, littleEndian: boolean, clearBytes: boolean): DataBuffer

    Takes a buffer from the pool.

    Parameters:

    Name Type Description
    size number The number of bytes needed.
    littleEndian boolean Whether the data buffer should be little-endian.
    clearBytes boolean Whether to clear the data buffer.

    Returns: DataBuffer

    Implementation of: IDataBufferPool

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:512


    getInstance

    ▸ StaticgetInstance(): DataBufferPool

    Gets the singleton instance.

    Returns: DataBufferPool

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:90


    getIsSupported

    ▸ StaticgetIsSupported(): boolean

    Gets a value indicating whether DataBuffer pooling is supported on this platform.

    Returns: boolean

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:106


    getTracer

    ▸ StaticgetTracer(tag: string): DataBufferPoolTracer

    Get a data buffer pool tracer for a specific tag using the default pool.

    Parameters:

    Name Type Description
    tag string The tag to log to.

    Returns: DataBufferPoolTracer

    A tracer that will associate stats with the type.

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:121

    ▸ StaticgetTracer(tag: string, pool: DataBufferPool): DataBufferPoolTracer

    Get a data buffer pool tracer for a specific tag and pool.

    Parameters:

    Name Type Description
    tag string The tag to log to.
    pool DataBufferPool The underlying pool.

    Returns: DataBufferPoolTracer

    A tracer that will associate stats with the type.

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:130

    ▸ StaticgetTracer(type: Type): DataBufferPoolTracer

    Get a data buffer pool tracer for a specific tag using the default pool. The tag is taken from the class namespace and name.

    Parameters:

    Name Type Description
    type Type The type to use as the tag.

    Returns: DataBufferPoolTracer

    A tracer that will associate stats with the tag.

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:138

    ▸ StaticgetTracer(type: Type, pool: DataBufferPool): DataBufferPoolTracer

    Get a data buffer pool tracer for a specific tag and pool. The tag is taken from the class namespace and name.

    Parameters:

    Name Type Description
    type Type The type to use as the tag.
    pool DataBufferPool The underlying pool.

    Returns: DataBufferPoolTracer

    A tracer that will associate stats with the tag.

    Defined in: Generated/TypeScript/fm.liveswitch/DataBufferPool.ts:147

    In This Article
    Back to top Copyright © LiveSwitch Inc. All Rights Reserved. Doc build for LiveSwitch v1.21.1