Interface Topics.FetchResult.TopicResult<V>

Type Parameters:
V - The result value type. This would be Void unless the request indicated that values are to be returned, in which case this would be the value class requested.
Enclosing interface:
Topics.FetchResult<V>

public static interface Topics.FetchResult.TopicResult<V>
Encapsulates the result of a fetch invocation for a single selected topic.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the topic path.
    Returns the topic specification.
    Returns the topic type.
    Returns the topic value.
    int
    Returns the number of values that the topic has.
    int
    Returns the size of the topic’s value (in bytes) or 0 if the topic has no value.
    long
    Return the total value size of a topic.
  • Method Details

    • path

      String path()
      Returns the topic path.
      Returns:
      the topic path
    • type

      TopicType type()
      Returns the topic type.

      This is a convenience method equivalent to calling specification().getType().

      Returns:
      the topic type
    • value

      V value()
      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 null.

      Returns:
      the topic value or null if none available
    • specification

      TopicSpecification 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:
      the topic specification
    • valueSize

      int valueSize()
      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:
      the value size
    • valueCount

      int valueCount()
      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:
      the value count
    • valueTotalSize

      long valueTotalSize()
      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).