Interface Subscription


public interface Subscription
ClusterEventService subscription context.

The subscription represents a node's subscription to a specific topic. A Subscription instance is returned once an ClusterEventService subscription has been propagated. The subscription context can be used to unsubscribe the node from the given topic() by calling close().

  • Method Summary

    Modifier and Type
    Method
    Description
    Closes the subscription, causing it to be unregistered.
    Returns the subscription topic.
  • Method Details

    • topic

      String topic()
      Returns the subscription topic.
      Returns:
      the topic to which the subscriber is subscribed
    • close

      Closes the subscription, causing it to be unregistered.

      When the subscription is closed, the subscriber will be unregistered and the change will be propagated to all the members of the cluster. The returned future will be completed once the change has been propagated to all nodes.

      Returns:
      a future to be completed once the subscription has been closed