GEODE-7704: Replacing inheritance of MemberIdentifierImpl with delagation#4636
Merged
echobravopapa merged 16 commits intoapache:developfrom Jan 31, 2020
Conversation
…emberData Moving all state down into GMSMemberData and removing duplicate fields isPartial and versionObject. GMSMemberData now has all of the state of a member.
Delegating to MemberIdentifierImpl, rather than inheriting from it.
…rImpl Having InternalDistributedMember delegate to MemberIdentifier, rather than MemberIdentifierImpl, so that we are not relying on the concrete class and all required methods are part of the interface. As a result, adding a number of additional methods to the MemberIdentifier interface.
Removing uses of getMemberData and adding methods to MemberIdentifier that delegate to memberData.
Using MemberIdentifier everywhere insteand of MemberIdentiferImpl. Still need to move MemberIdentiferImpl to an internal package.
Marking the MemberIdentifierFactory as immutable.
The MemberIdentifierImpl.getGroups needs to check for a null array. Places that used to call getMemberData.getGroups were throwing an NPE.
This factory is not going to play well with other parts of the test that are generating InternalDistributedMembers.
InternalDistributedMember now has new serialization methods that delegate to the methods that it previously was just inheriting.
InternalDistributedMemberTest was mocking the underlying MemberData and changing state on the InternalDistributedMember. Now that all state is delegated to the MemberData, this test was failing because the mock was not reflecting the state changes.
…ember-data-GEODE-7704-2
echobravopapa
approved these changes
Jan 29, 2020
mhansonp
pushed a commit
to mhansonp/geode
that referenced
this pull request
Mar 12, 2020
…tion (apache#4636) * Deduplicate fields betweeen MemberIdentifierImpl and GMSMemberData Moving all state down into GMSMemberData and removing duplicate fields isPartial and versionObject. GMSMemberData now has all of the state of a member. * Delegate rather than inherit InternalDistributedMember Delegating to MemberIdentifierImpl, rather than inheriting from it. * Delegate to MemberIdentifier, rather than MemberIdentifierImpl Having InternalDistributedMember delegate to MemberIdentifier, rather than MemberIdentifierImpl, so that we are not relying on the concrete class and all required methods are part of the interface. As a result, adding a number of additional methods to the MemberIdentifier interface. * Removing uses of getMemberData Removing uses of getMemberData and adding methods to MemberIdentifier that delegate to memberData. * Hiding MemberIdentiferImpl Using MemberIdentifier everywhere insteand of MemberIdentiferImpl. Still need to move MemberIdentiferImpl to an internal package. * Making PMD happy Marking the MemberIdentifierFactory as immutable. * Fixing NPE in getGroups The MemberIdentifierImpl.getGroups needs to check for a null array. Places that used to call getMemberData.getGroups were throwing an NPE. * Fixing a test that used MemberIdentifierFactoryImpl This factory is not going to play well with other parts of the test that are generating InternalDistributedMembers. * Fixing AnalyzeSerializablesJUnitTest InternalDistributedMember now has new serialization methods that delegate to the methods that it previously was just inheriting. * Fixing a unit test failure due to mocking MemberData InternalDistributedMemberTest was mocking the underlying MemberData and changing state on the InternalDistributedMember. Now that all state is delegated to the MemberData, this test was failing because the mock was not reflecting the state changes. Co-authored-by: Ernie Burghardt <eburghardt@pivotal.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changing InternalDistributedMember to delegate to an underlying MemberIdentifer, rather than inheriting from MemberIdentifierImpl. Moving MemberIndentifierImpl out of the API for membership.
Moving all member id state to the GMSMemberData class.
Removing the use of getMemberData in as many places as possible and using MemberIdentifier methods instead.