Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Join WAN OS and EE SPI #15527
Performed further cleanup of WAN custom publisher SPI.
Removed an internal interface
Only missing part is exposing entry data on the WanReplicationEvent
Removed `WanReplicationEndpoint` both in OS nor EE. It was unclear what this interface was exactly for, how it was exactly different from `WanReplicationPublisher` and if the user should implement `WanReplicationPublisher` or `WanReplicationEndpoint`. There is now a single interface which contains all of the methods to be implemented by a custom publisher and it's located in OS - `WanReplicationPublisher`. Methods on `WanReplicationPublisher` used only in EE have a default implementation so OS implementations need not implement those methods. Merged `WanReplicationPublisherDelegate` from OS and EE. `WanReplicationPublisherDelegate` no longer implements `WanReplicationPublisher` as it is a special case of an internal publisher which only delegates to other publisher implementations. Having it not implement `WanReplicationPublisher` makes it simpler as some methods it would inherit from the interface would not be invoked at all and would further introduce confusion. There is only a single implementation of `WanReplicationPublisher` that we provide in Hazelcast Enterprise - `WanBatchReplication`. Replaced `WanReplicationPublisher#publishSyncEvent` with `WanReplicationPublisher#publishAntiEntropyEvent`. The anti-entropy event is a parent for the sync event as also a consistency check can be an anti-entropy event. The only reason we didn't do this in 3.x was backwards compatibility. Removed an internal interface `EnterpriseReplicationEventObject` containing private API on enterprise WAN replication events and replaced it with `InternalWanReplicationEvent` interface containing private API for internal use by our WAN implementations. Introduced `InternalWanReplicationPublisher` for private API exposed by our WAN publisher implementations. Removed `WanReplicationPublisher#putBackup`. It was only delegating to `publishReplicationEventBackup` and with its' removal we now only have three publication methods which makes it very simple for implementation - `publishReplicationEvent` for events on partition owner, `publishReplicationEventBackup` for events on partition backup and `republishReplicationEvent` for republishing events received from another cluster. Moved method `removeWanEvents(int, String, String, int)` to `InternalWanReplicationPublisher` as it's only used from our internal WAN publisher implementation and not other parts of the Hazelcast system. Custom implementations don't need to implement or invoke this method. Only missing part is exposing entry data on the WanReplicationEvent which does not involve private API for custom implementations to use.
Rename WanReplicationService#clearQueues with "removeWanEvents" Remove unused WanReplicationService#checkWanReplicationQueues Replace some "target group name" usages with "WAN publisher ID" Replace "wanGroupName" in cache operations with "origin" Clean up some broken links in javadoc Remove unused fields in WanCacheMergeOperation
Please take a look.