Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TopicViewsImpl

Implementation of the TopicView feature

Hierarchy

  • TopicViewsImpl

Implements

Index

Constructors

constructor

  • Create a new instance of the TopicView feature

    Parameters

    Returns TopicViewsImpl

Properties

Private CREATE_TOPIC_VIEW

Command service for creating a topic view

Private LIST_TOPIC_VIEWS

LIST_TOPIC_VIEWS: ServiceSender<null, ListTopicViewsResult>

Command service for obtaining a list of topic views

Private REMOVE_TOPIC_VIEW

REMOVE_TOPIC_VIEW: ServiceSender<string, null>

Command service for removing a topic view

Private internal

internal: InternalSession

The internal session

Methods

createTopicView

  • Create a new named topic view.

    If a view with the same name already exists the new view will update the existing view.

    Parameters

    • name: string
    • specification: string

    Returns Result<TopicView>

    a Result that completes when a response is received from the server, returning the topic view created by the operation.

    If the task fails, the Result will resolve with an error. Common reasons for failure, include:

    • the specification is invalid;
    • the cluster was repartitioning;
    • the calling session does not have MODIFY_TOPIC_VIEW permission or appropriate path prefix permissions;
    • the session is closed.

listTopicViews

  • List all the topic views that have been created.

    Returns Result<TopicView[]>

    a Result that resolves when a response is received from the server, returning a list of views sorted by their creation order.

    If the task fails, the Result will resolve with an Error. Common reasons for failure include:

    • the cluster was repartitioning;
    • the calling session does not have READ_TOPIC_VIEW permission or appropriate path prefix permissions;
    • the session is closed.

removeTopicView

  • removeTopicView(name: string): Result<void>
  • Remove a named topic view if it exists.

    If the named view does not exist the completable future will complete successfully.

    Parameters

    • name: string

    Returns Result<void>

    a Result that resolves when a response is received from the server.

    If the task fails, the Result will resolve with an Error. Common reasons for failure include:

    • the cluster was repartitioning;
    • the calling session does not have MODIFY_TOPIC_VIEW permission or appropriate path prefix permissions;
    • the session is closed.