Interface ClusterAwareEvent

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractPersistenceEvent, AbstractProcessEvent, AbstractSyncEvent, AfterItemCreationEvent, AfterItemRemovalEvent, AfterTenantInitializationClusterAwareEvent, AfterTenantRestartClusterAwareEvent, BackofficeRoleUpdatedClusterAwareEvent, CronJobInfoEvent, EventExportDisabledEvent, EventExportEnabledEvent, EventExportFailedEvent, InvalidateCertificateCredentialsCacheEvent, InvalidateCharonCacheEvent, InvalidateConsumptionLayerUserSegmentsProviderCacheEvent, KieModuleSwappingEvent, ProcessFinishedEvent, ProcessStartEvent, RepollEvent, RuleEngineInitializedEvent, RulesCompilationInProgressQueryEvent, RulesCompilationInProgressResponseEvent, SyncFinishedEvent, SyncStartEvent

public interface ClusterAwareEvent extends Serializable
Interface for events which can be used for broadcasted/received events in cluster systems.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    canPublish(PublishEventContext publishEventContext)
    Decide whether this event should be broadcasted/received.
    default boolean
    publish(int sourceNodeId, int targetNodeId)
    Deprecated.
  • Method Details

    • publish

      @Deprecated(since="ages") 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