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
Interface for events which can be used for broadcasted/received events in cluster systems.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanPublish(PublishEventContext publishEventContext) Decide whether this event should be broadcasted/received.default booleanpublish(int sourceNodeId, int targetNodeId) Deprecated.
-
Method Details
-
publish
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
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
-
canPublish(PublishEventContext)instead.