/** * Unregisters this processor as a membership listener * * @since GemFire 5.7 */ protected void removeListener() { try { getDistributionManager().removeMembershipListener(this); } catch (DistributedSystemDisconnectedException e) { // ignore } }
final Object[] msgArgs = new Object[] {Long.valueOf(timeout + (severeAlert ? getSevereAlertThreshold() : 0)), this, getDistributionManager().getId(), activeMembers}; final String msg = "%s seconds have elapsed while waiting for replies: %s on %s whose current membership list is: [%s]"; getDistributionManager().getStats().incReplyTimeouts(); "View no longer has {} as an active member, so we will no longer wait for it.", this.members[i]); memberDeparted(getDistributionManager(), this.members[i], false); } else { if (suspectMembers != null) { } else if (suspectThem) { if (suspectMembers != null && suspectMembers.size() > 0) { getDistributionManager().getMembershipManager().suspectMembers(suspectMembers, "Failed to respond within ack-wait-threshold");
if (!removeMember(sender, false) && warn) { final DistributionManager dm = getDistributionManager(); // fix for bug 33253 Set ids = getDistributionManagerIds(); if (ids == null || ids.contains(sender)) {
/** * Registers this processor as a membership listener and returns a set of the current members. * * @return a Set of the current members * @since GemFire 5.7 */ protected Set addListenerAndGetMembers() { return getDistributionManager().addMembershipListenerAndGetDistributionManagerIds(this); }
/** * Returns the set of members that this processor should care about. * * @return a Set of the current members * @since GemFire 5.7 */ protected Set getDistributionManagerIds() { return getDistributionManager().getDistributionManagerIds(); }
/** * perform initial membership processing while under synchronization of this.members * * @param activeMembers the DM's current membership set */ protected void processActiveMembers(Set activeMembers) { for (int i = 0; i < this.members.length; i++) { if (this.members[i] != null) { if (!activeMembers.contains(this.members[i])) { memberDeparted(getDistributionManager(), this.members[i], false); } } } }
protected void preWait() { waiting = true; DistributionManager mgr = getDistributionManager(); statStart = mgr.getStats().startReplyWait(); synchronized (this.members) { Set activeMembers = addListenerAndGetMembers(); processActiveMembers(activeMembers); } }
private void setIfTransactionDistributed(ReplyProcessor21 processor) { if (processor != null) { DistributionManager distributionManager = processor.getDistributionManager(); if (distributionManager != null) { InternalCache cache = distributionManager.getCache(); if (cache != null && cache.getTxManager() != null) { this.isTransactionDistributed = cache.getTxManager().isDistributed(); } } } } }
private void postWait() { waiting = false; removeListener(); final DistributionManager mgr = getDistributionManager(); mgr.getStats().endReplyWait(this.statStart, this.initTime); mgr.getCancelCriterion().checkCancelInProgress(null); }