/** returns the JGroupMembershipManager for the given distributed system */ public static MembershipManager getMembershipManager(DistributedSystem sys) { InternalDistributedSystem isys = (InternalDistributedSystem) sys; ClusterDistributionManager dm = (ClusterDistributionManager) isys.getDM(); return dm.getMembershipManager(); }
List<InternalDistributedMember> getElderCandidates() { List<InternalDistributedMember> theMembers = clusterDistributionManager.getViewMembers(); return theMembers.stream() .filter(member -> member.getVmKind() != ClusterDistributionManager.ADMIN_ONLY_DM_TYPE) .filter( member -> !clusterDistributionManager.getMembershipManager().isSurpriseMember(member)) .collect(Collectors.toList()); }
@Before public void before() { member0 = mock(InternalDistributedMember.class); clusterDistributionManager = mock(ClusterDistributionManager.class); cancelCriterion = mock(CancelCriterion.class); system = mock(InternalDistributedSystem.class); systemCancelCriterion = mock(CancelCriterion.class); memberManager = mock(MembershipManager.class); when(clusterDistributionManager.getCancelCriterion()).thenReturn(cancelCriterion); when(clusterDistributionManager.getSystem()).thenReturn(system); when(system.getCancelCriterion()).thenReturn(systemCancelCriterion); when(clusterDistributionManager.getMembershipManager()).thenReturn(memberManager); }
public static void send(ClusterDistributionManager dm) throws InterruptedException { long viewId = dm.getMembershipManager().getView().getViewId(); ReplyProcessor21 rp = new ReplyProcessor21(dm, dm.getOtherDistributionManagerIds()); rp.enableSevereAlertProcessing(); dm.putOutgoing(new WaitForViewInstallation(viewId, rp.getProcessorId())); try { rp.waitForReplies(); } catch (ReplyException e) { if (e.getCause() != null && !(e.getCause() instanceof CancelException)) { if (logger.isDebugEnabled()) { logger.debug("Reply to WaitForViewInstallation received odd exception", e.getCause()); } } } // this isn't necessary for TXFailoverCommand, which is the only use of this // message right now. TXFailoverCommand performs messaging to all servers, // which will force us to wait for the view containing the crash of another // server to be processed. // dm.waitForViewInstallation(viewId); }
boolean interrupted = Thread.interrupted(); try { dm.getMembershipManager().waitForMessageState(getSender(), channelState); break; } catch (InterruptedException ignore) {
if (distributionManager.getMembershipManager().verifyMember(m, "member is using the name of " + id)) { throw new IncompatibleSystemException("Member " + id
dm.getMembershipManager().startupMessageFailed(getSender(), rejectionMessage);
if (initialized) { Map channelStates = dm.getMembershipManager().getMessageState(relayRecipient, useMulticast); if (gr.channelState != null) { gr.channelState.putAll(channelStates);
dm.getMembershipManager().waitForDeparture(this.lostMemberID); RegionVersionHolder rvh = rgn.getVersionVector().getHolderForMember(this.lostMemberVersionID);