Skip to content

GEODE-7704: Replacing inheritance of MemberIdentifierImpl with delagation#4636

Merged
echobravopapa merged 16 commits intoapache:developfrom
upthewaterspout:feature/collapse-member-data-GEODE-7704-2
Jan 31, 2020
Merged

GEODE-7704: Replacing inheritance of MemberIdentifierImpl with delagation#4636
echobravopapa merged 16 commits intoapache:developfrom
upthewaterspout:feature/collapse-member-data-GEODE-7704-2

Conversation

@upthewaterspout
Copy link
Contributor

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.

…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.
@echobravopapa echobravopapa marked this pull request as ready for review January 29, 2020 00:18
@echobravopapa echobravopapa requested a review from Bill January 29, 2020 00:45
@echobravopapa echobravopapa merged commit 40d6b47 into apache:develop Jan 31, 2020
bschuchardt added a commit that referenced this pull request Jan 31, 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants