public LogWriterI18n getLogWriter() { return getDistributionManager().getLoggerI18n(); }
/** * Bypass the distribution manager and ask the membership manager directly * if a given member is still in the view. * * We need this because we're asking membership questions from within * listeners, and we don't know whether the DM's membership listener * fires before or after our own. * * @param id member we are asking about * @return true if we are still in the JGroups view * (must return false if id == null) */ protected boolean stillInView(ProfileId id) { if (id instanceof InternalDistributedMember) { InternalDistributedMember memberId = (InternalDistributedMember)id; return this.getDistributionManager().getViewMembers().contains(memberId); } else { // if id is not a InternalDistributedMember then return false return false; } }
/** * Free up resources used by this advisor once it is no longer being used. * @since 3.5 */ public void close() { try { synchronized(this) { this.membershipClosed = true; this.previousVersionOpCount.set(0); this.currentVersionOpCount = 0; } getDistributionManager().removeMembershipListener(this.ml); } catch (CancelException e) { // if distribution has stopped, above is a no-op. } catch (IllegalArgumentException ignore) { // this is thrown if the listener is no longer registered } }
/** * Returns a set of the members this advisor should distribute to by default * @since 5.7 */ @SuppressWarnings("unchecked") protected final Set<InternalDistributedMember> getDefaultDistributionMembers() { if (!useAdminMembersForDefault()) { return getDistributionManager().getOtherDistributionManagerIds(); } else { return getDistributionManager().getAllOtherMembers(); } }
/** * Returns a set of the members this advisor should distribute to by default * @since 5.7 */ @SuppressWarnings("unchecked") protected final Set<InternalDistributedMember> getDefaultDistributionMembers() { if (!useAdminMembersForDefault()) { return getDistributionManager().getOtherDistributionManagerIds(); } else { return getDistributionManager().getAllOtherMembers(); } }
/** * Free up resources used by this advisor once it is no longer being used. * @since 3.5 */ public void close() { try { synchronized(this) { this.membershipClosed = true; synchronized(this.opCountLock) { this.previousVersionOpCount = 0; this.currentVersionOpCount = 0; } } getDistributionManager().removeMembershipListener(this.ml); } catch (CancelException e) { // if distribution has stopped, above is a no-op. } catch (IllegalArgumentException ignore) { // this is thrown if the listener is no longer registered } }
/** * Bypass the distribution manager and ask the membership manager directly * if a given member is still in the view. * * We need this because we're asking membership questions from within * listeners, and we don't know whether the DM's membership listener * fires before or after our own. * * @param id member we are asking about * @return true if we are still in the JGroups view * (must return false if id == null) */ protected boolean stillInView(ProfileId id) { if (id instanceof InternalDistributedMember) { InternalDistributedMember memberId = (InternalDistributedMember)id; return this.getDistributionManager().getViewMembers().contains(memberId); } else { // if id is not a InternalDistributedMember then return false return false; } }
protected final void initialize() { subInit(); getDistributionManager().addMembershipListener(this.ml); }
/** * Return true if the memberId on the specified Profile is a current * member of the distributed system. * @since 5.7 */ protected boolean isCurrentMember(Profile p) { return getDistributionManager().isCurrentMember(p.getDistributedMember()); }
/** * Return true if the memberId on the specified Profile is a current * member of the distributed system. * @since 5.7 */ protected boolean isCurrentMember(Profile p) { return getDistributionManager().isCurrentMember(p.getDistributedMember()); }
protected final void initialize() { subInit(); getDistributionManager().addMembershipListener(this.ml); }
public void waitForCurrentOperations() { long timeout = 1000L * this.getDistributionManager().getSystem() .getConfig().getAckWaitThreshold(); waitForCurrentOperations(timeout); }
public void waitForCurrentOperations(LogWriterI18n logger) { long timeout = 1000L * this.getDistributionManager().getSystem() .getConfig().getAckWaitThreshold(); waitForCurrentOperations(logger, timeout); }
/** Creates the current distribution profile for this member */ public Profile createProfile() { Profile newProfile = instantiateProfile( getDistributionManager().getId(), incrementAndGetVersion()); getAdvisee().fillInProfile(newProfile); return newProfile; }
/** Creates the current distribution profile for this member */ public Profile createProfile() { Profile newProfile = instantiateProfile( getDistributionManager().getId(), incrementAndGetVersion()); getAdvisee().fillInProfile(newProfile); return newProfile; }