/** * Returns the set of members that this processor should care about. * @return a Set of the current members * @since 5.7 */ protected Set getDistributionManagerIds() { return getDistributionManager().getDistributionManagerIds(); }
if (!removeMember(sender, false) && warn) { final DM dm = getDistributionManager(); // fix for bug 33253 Set ids = getDistributionManagerIds(); if (ids == null || ids.contains(sender)) {
final Object[] msgArgs = new Object[] {Long.valueOf(timeout + (severeAlert? getSevereAlertThreshold() : 0)), this, getDistributionManager().getId(), activeMembers}; final StringId msg = LocalizedStrings.ReplyProcessor21_0_SEC_HAVE_ELAPSED_WHILE_WAITING_FOR_REPLIES_1_ON_2_WHOSE_CURRENT_MEMBERSHIP_LIST_IS_3; if (severeAlert) { getDistributionManager().getStats().incReplyTimeouts(); getDistributionManager().getMembershipManager() .suspectMembers(suspectMembers, "Failed to respond within ack-wait-threshold");
/** * Unregisters this processor as a membership listener * @since 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 StringId msg = LocalizedStrings.ReplyProcessor21_0_SEC_HAVE_ELAPSED_WHILE_WAITING_FOR_REPLIES_1_ON_2_WHOSE_CURRENT_MEMBERSHIP_LIST_IS_3; if (severeAlert) { getDistributionManager().getStats().incReplyTimeouts(); getDistributionManager().getMembershipManager() .suspectMembers(suspectMembers, "Failed to respond within ack-wait-threshold");
/** * Registers this processor as a membership listener and * returns a set of the current members. * @return a Set of the current members * @since 5.7 */ protected Set addListenerAndGetMembers() { return getDistributionManager() .addMembershipListenerAndGetDistributionManagerIds(this); } /**
if (!removeMember(sender, false) && warn) { final DM 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 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 5.7 */ protected Set getDistributionManagerIds() { return getDistributionManager().getDistributionManagerIds(); }
/** * Unregisters this processor as a membership listener * @since 5.7 */ protected void removeListener() { try { getDistributionManager().removeMembershipListener(this); } catch (DistributedSystemDisconnectedException e) { // ignore } } /**
protected void preWait() { waiting = true; DM mgr = getDistributionManager(); statStart = mgr.getStats().startReplyWait(); synchronized (this.members) { Set activeMembers = addListenerAndGetMembers(); processActiveMembers(activeMembers); } }
protected void postWait() { startedWaiting = false; if (this.listenerAdded) { removeListener(); this.listenerAdded = false; } final DM mgr = getDistributionManager(); mgr.getStats().endReplyWait(this.statStart, this.initTime); checkCancellationInPostWait(mgr); }
protected void postWait() { waiting = false; removeListener(); final DM mgr = getDistributionManager(); mgr.getStats().endReplyWait(this.statStart, this.initTime); // Make sure that a cancellation check occurs. // TODO there may be a more elegant place to put this... mgr.getCancelCriterion().checkCancelInProgress(null); }
protected void preWait() { startedWaiting = true; DM mgr = getDistributionManager(); statStart = mgr.getStats().startReplyWait(); // take lock on "this" first because memberDeparted will take a lock on // "this" leading to lock inversion against other paths that take in reverse // order e.g. toString() calls from any of the "this" synced methods // [sumedh] do we need two locks in this class, or only this should do? synchronized (this) { final InternalDistributedMember[] mbrs = this.members; synchronized (mbrs) { // no need to register with MembershipListener for the case of self // execution only (#47198) if (mbrs.length > 0 && !(mbrs.length == 1 && mbrs[0] != null && mbrs[0] .equals(this.system.getDistributedMember()))) { Set<?> activeMembers = addListenerAndGetMembers(); this.listenerAdded = true; processActiveMembers(activeMembers); } } } }