Interface ClusterAwareEvent

    • Method Detail

      • publish

        default boolean publish​(int sourceNodeId,
                                int targetNodeId)
        Deprecated.
        Decide whether this event should be broadcasted/received. Examples are
        • return (sourceNodeId==targetNodeId ); => will only publish to local cluster
        • return true; => will publish to all nodes
        • return (targetNodeId==14); => publish to dedicated node regardless of source
        Returns:
        true if event should be published from source cluster node to target cluster node
      • canPublish

        default boolean canPublish​(PublishEventContext publishEventContext)
        Decide whether this event should be broadcasted/received.
        Parameters:
        publishEventContext - context object containing all necessary information about target and source node Id's as well as target node groups.
        Returns:
        true if event should be published from source cluster node to target cluster node