protected boolean isDuplicate(MembershipEvent event, boolean joined) {
      synchronized (eventHistory) {
        boolean duplicate = false;
        String memberId = event.getMemberId();

        // find memberId in eventHistory...
        int indexOf = eventHistory.indexOf(memberId);
        if (indexOf > -1) {
          // found an event for this member
          if (eventJoined.get(memberId) == joined) {
            // we already recorded a matching event for this member
            duplicate = true;
          } else {
            // remove the event from history and map... will be re-inserted
            Assert.assertTrue(eventHistory.remove(memberId),
                "Failed to replace entry in eventHistory for " + memberId);
            Assert.assertTrue(eventJoined.remove(memberId) != null,
                "Failed to replace entry in eventJoined for " + memberId);
          }
        }

        if (!duplicate) {
          // add the event to the history and map
          if (eventHistory.size() == historySize) {
            // filled the eventHistory, so need to remove first entry
            eventHistory.removeFirst();
          }
          eventHistory.addLast(memberId); // linked list
          eventJoined.put(memberId, joined); // boolean map
          Assert.assertTrue(eventHistory.size() <= historySize,
              "Attempted to grow eventHistory beyond maximum of " + historySize);
        }
        return duplicate;
      } // sync
    }
Returns true if the member is a client to a CacheServer hosted by this process. Returns false
if the member is a CacheServer that this process is connected to.

@return whether the member is a client to a CacheServer hosted by this process
geode-core/src/main/java/org/apache/geode/management/membership/UniversalMembershipListenerAdapter.java