Interface ClusterAwareEvent
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
AbstractPersistenceEvent,AbstractProcessEvent,AbstractSyncEvent,AfterItemCreationEvent,AfterItemRemovalEvent,AfterTenantInitializationClusterAwareEvent,AfterTenantRestartClusterAwareEvent,BackofficeRoleUpdatedClusterAwareEvent,EventExportDisabledEvent,EventExportEnabledEvent,EventExportFailedEvent,InvalidateCertificateCredentialsCacheEvent,InvalidateCharonCacheEvent,InvalidateConsumptionLayerUserSegmentsProviderCacheEvent,KieModuleSwappingEvent,ProcessFinishedEvent,ProcessStartEvent,RepollEvent,RuleEngineInitializedEvent,RulesCompilationInProgressQueryEvent,RulesCompilationInProgressResponseEvent,SyncFinishedEvent,SyncStartEvent
public interface ClusterAwareEvent extends java.io.SerializableInterface for events which can be used for broadcasted/received events in cluster systems.
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default booleancanPublish(PublishEventContext publishEventContext)Decide whether this event should be broadcasted/received.default booleanpublish(int sourceNodeId, int targetNodeId)Deprecated.UsecanPublish(PublishEventContext)instead.
-
-
-
Method Detail
-
publish
default boolean publish(int sourceNodeId, int targetNodeId)Deprecated.UsecanPublish(PublishEventContext)instead.Decide whether this event should be broadcasted/received. Examples arereturn (sourceNodeId==targetNodeId );=> will only publish to local clusterreturn true;=> will publish to all nodesreturn (targetNodeId==14);=> publish to dedicated node regardless of source
- Returns:
trueif 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:
trueif event should be published from source cluster node to target cluster node
-
-