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
Cleanup leftovers for WAN replication SPI #16052
Nov 18, 2019
- removed Node parameter from WanReplicationConsumer. Node is private API and implementations may implement HazelcastInstanceAware to get something like configuration. - changed type of AbstractWanPublisherConfig.implementation to WanReplicationPublisher and WanConsumerConfig.implementation to WanReplicationConsumer. - moved republishReplicationEvent, publishAntiEntropyEvent, pause/stop/resume, getStats and removeWanEvents methods from public API. These methods are all related to our WAN implementation (WAN event republication, anti-entropy, lifecycle methods, statistics and clearing the WAN data) and the user need not implement these methods to have the simplest functioning WAN replication. Some of these are still exposed as REST URIs (clear, pause/stop/resume, sync...) but the REST handlers will be no-op in the case the user provides a custom publisher implementation. It may be possible we expose these methods as public SPI in the future so users may try to implement it and integrate with the REST handlers and other subsystems. - copied most migration and replication-related code from EE WanReplicationService to OS. This now allows the user to fully implement all methods on WAN publisher SPI, regardless if they are using OS or EE. - moved all migration and replication-related methods to a MigrationAwareWanReplicationPublisher interface. Now, if the user wants the publisher to participate in migrations and replication, they will need to implement this interface in addition to the WanReplicationPublisher. Because of this, WanReplicationPublisher is even simpler to implement. Leftovers: - code duplication between OS and EE migration and replication related code. This can be addressed in a minor release. - exposing event data as public methods on WAN replication events
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments.