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 eventN
- 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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <E extends TopicEvent,N>
TopicEventPublisher<E,N>create(ClusterManager clusterManager, com.atlassian.event.api.EventPublisher eventPublisher, TopicEventCluster<E,N> cluster, DarkFeaturesManager darkFeaturesManager)
boolean
isAvailable()
this method remain here to support the dark feature (until it is completely removed)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.
-
-
-
Method Detail
-
create
public static <E extends TopicEvent,N> TopicEventPublisher<E,N> create(ClusterManager clusterManager, com.atlassian.event.api.EventPublisher eventPublisher, TopicEventCluster<E,N> cluster, DarkFeaturesManager darkFeaturesManager)
-
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 interfaceClusterEventService
- 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 interfaceClusterEventService
-
-