You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/01/31 19:28:00 UTC

[jira] [Commented] (GEODE-7704) Combine MemberIdentifer and MemberData interfaces

    [ https://issues.apache.org/jira/browse/GEODE-7704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17027769#comment-17027769 ] 

ASF subversion and git services commented on GEODE-7704:
--------------------------------------------------------

Commit 40d6b47ffce96df1e1bc0da88dff661b57939d7e in geode's branch refs/heads/develop from Dan Smith
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=40d6b47 ]

GEODE-7704: Replacing inheritance of MemberIdentifierImpl with delagation (#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 <eb...@pivotal.io>


> Combine MemberIdentifer and MemberData interfaces
> -------------------------------------------------
>
>                 Key: GEODE-7704
>                 URL: https://issues.apache.org/jira/browse/GEODE-7704
>             Project: Geode
>          Issue Type: Improvement
>          Components: membership
>            Reporter: Dan Smith
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> There is not really a need for separate MemberIdentifier and MemberData interfaces. We should combine these two interfaces into a single interface. MemberIdentiferImpl and GMSMemberData should also be combined into a single object.
> InternalDistributedMember should probably wrap a MemberIdentifier, rather than extend MemberIdentifierImpl, for better encapsulation. If MemberIdentifer takes on all of the methods of MemberData this should be possible.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)