Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TopicResultImpl<V>

Implementation of the TopicResult interface

Type parameters

  • V

Hierarchy

  • TopicResultImpl

Implements

Index

Constructors

constructor

  • Create a new TopicResultImpl instance

    Parameters

    • path: string

      the topic path

    • type: TopicType

      the topic type

    • value: V

      the value if one was requested

    • properties: {}

      the topic properties

      • [key: string]: string
    • sizeInfo: FetchTopicSizeInfo

      the topic size information

    Returns TopicResultImpl

Properties

Private Readonly mPath

mPath: string

The topic path

Private Readonly mProperties

mProperties: {}

The topic properties

Type declaration

  • [key: string]: string

Private Readonly mType

mType: TopicType

The topic type

Private Readonly mValue

mValue: V

The value if one was requested

Private Readonly sizeInfo

The topic size information

Methods

path

  • path(): string
  • Returns the topic path.

    Returns string

    the topic path

specification

  • Returns the topic specification.

    If the request specified withProperties, the result reflect the topic's specification and can be used to create an identical topic. If the request did not specify withProperties, the specification's property map will be empty.

    Returns TopicSpecification

    the topic specification

type

  • Returns the topic type.

    Returns TopicType

    the topic type

value

  • value(): V
  • Returns the topic value.

    This will only return a value if the fetch request specified withValues and the topic actually had a value. For topics that have no value this will return undefined.

    Returns V

    the topic value or undefined if none available

valueCount

  • valueCount(): number
  • Returns the number of values that the topic has. For a topic with no value this will return 0.

    For a non times series topic with a value this will return 1. For a time series topic this will return the number of events.

    Returns number

    the value count

valueSize

  • valueSize(): number
  • Returns the size of the topic’s value (in bytes) or 0 if the topic has no value.

    For time series topics this will be the size of the last event.

    Returns number

    the value size

valueTotalSize

  • valueTotalSize(): Long
  • Return the total value size of a topic.

    For a non time series topic this will be the same as valueSize(). For a time series topic this will be the total size of all events (in bytes).

    Returns Long

Copyright © 2025 DiffusionData Ltd. All Rights Reserved.