Class TopicEventPublisher<E extends TopicEvent,N>

java.lang.Object
com.atlassian.confluence.impl.cluster.event.TopicEventPublisher<E,N>
Type Parameters:
E - The type of the event that wraps the application event
N - The type of the cluster node
All Implemented Interfaces:
ClusterEventService

@ThreadSafe public final class TopicEventPublisher<E extends TopicEvent,N> extends Object implements ClusterEventService
A mechanism for publishing arbitrary application events to all Confluence nodes in the cluster, and providing a way to block until all nodes have acknowledged republishing the event.
Since:
8.3
  • Method Details

    • create

      public static <E extends TopicEvent, N> TopicEventPublisher<E,N> create(ClusterConfigurationAccessor configurationAccessor, com.atlassian.event.api.EventPublisher eventPublisher, TopicEventCluster<E,N> cluster)
    • publishEventToCluster

      public com.google.common.util.concurrent.ListenableFuture<?> publishEventToCluster(Object event)
      Send the given event to all other cluster members, and record acknowldegements when those members have processed the event.
      Specified by:
      publishEventToCluster in interface ClusterEventService
      Returns:
      a ListenableFuture which completes when all members have acknowledged the event.
    • isAvailable

      public boolean isAvailable()
      this method remain here to support the dark feature (until it is completely removed)
      Specified by:
      isAvailable in interface ClusterEventService