/** * wait for the current operations being sent on views prior to the joining of the given member * to be placed on communication channels before returning * * @since GemFire 5.1 */ void waitForCurrentOperations() { long timeout = 1000L * distributionAdvisor.getDistributionManager().getSystem().getConfig() .getAckWaitThreshold(); waitForCurrentOperations(logger, timeout, timeout * 2L); }
/** * Like getDistributionManager but does not check * that the DistributedSystem is still connected */ private DistributionManager getDistributionManagerWithNoCheck() { return getAdvisee().getSystem().getDM(); }
/** * Return true if the memberId on the specified Profile is a current member of the distributed * system. * * @since GemFire 5.7 */ protected boolean isCurrentMember(Profile p) { return getDistributionManager().isCurrentMember(p.getDistributedMember()); }
public HighPriorityAckedMessage() { super(); InternalDistributedSystem ds = InternalDistributedSystem.getAnyInstance(); if (ds != null) { this.originDm = (ClusterDistributionManager) ds.getDistributionManager(); } if (this.originDm != null) { this.id = this.originDm.getDistributionManagerId(); } }
/** * Sends a message and does not wait for a response. * * <p> * Actually, it's the message implementation that determines if it's sync or async, not this call. */ private void sendAsync(DistributionMessage msg) { if (system != null) { system.getDistributionManager().putOutgoing(msg); } }
/** * Return the time in sec to wait before sending an alert while waiting for ack replies. Note that * the ack wait threshold may change at runtime, so we have to consult the system every time. */ protected int getAckWaitThreshold() { return this.system.getConfig().getAckWaitThreshold(); }
/** Creates the current distribution profile for this member */ public Profile createProfile() { Profile newProfile = instantiateProfile(getDistributionManager().getId(), incrementAndGetVersion()); getAdvisee().fillInProfile(newProfile); return newProfile; }
/** * check to see if the distributed system is closing * * @return true if the distributed system is closing */ private boolean checkDSClosing(ClusterDistributionManager dm) { InternalDistributedSystem ds = dm.getSystem(); return (ds == null || ds.isDisconnecting()); }
protected void preWait() { waiting = true; DistributionManager mgr = getDistributionManager(); statStart = mgr.getStats().startReplyWait(); synchronized (this.members) { Set activeMembers = addListenerAndGetMembers(); processActiveMembers(activeMembers); } }
/** 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(); }
@Override protected void handleEvent(ClusterDistributionManager manager, MembershipListener listener) { listener.memberDeparted(manager, getId(), false); } }
@Override protected void handleEvent(ClusterDistributionManager manager, MembershipListener listener) { listener.memberSuspect(manager, getId(), whoSuspected(), reason); } }
/** * Unregisters this processor as a membership listener * * @since GemFire 5.7 */ protected void removeListener() { try { getDistributionManager().removeMembershipListener(this); } catch (DistributedSystemDisconnectedException e) { // ignore } }
private static void endSerialization(long start, int bytes) { DMStats stats = InternalDistributedSystem.getDMStats(); if (stats != null) { stats.endSerialization(start, bytes); } }
private static long startDeserialization() { long result = 0; DMStats stats = InternalDistributedSystem.getDMStats(); if (stats != null) { result = stats.startDeserialization(); } return result; }
@Override protected void handleEvent(ClusterDistributionManager manager, MembershipListener listener) { listener.memberJoined(manager, getId()); } }
/** * Sends a message and does not wait for a response */ void sendAsync(DistributionMessage msg) { if (system != null) { system.getDistributionManager().putOutgoing(msg); } }
/** * check to see if the distributed system is closing * * @return true if the distributed system is closing */ public boolean checkDSClosing(ClusterDistributionManager dm) { InternalDistributedSystem ds = dm.getSystem(); return (ds == null || ds.isDisconnecting()); }
/** * Returns true if this DM or the DistributedSystem owned by it is closing or is closed. */ protected boolean isCloseInProgress() { if (closeInProgress) { return true; } InternalDistributedSystem ds = getSystem(); return ds != null && ds.isDisconnecting(); }