/** Provide recipients for profile update. */ public Set adviseProfileUpdate() { return adviseGeneric(); }
/** Provide recipients for profile update. */ public Set adviseProfileUpdate() { return adviseGeneric(); }
/** * Provide recipients for profile remove. * @since 5.7 */ public Set adviseProfileRemove() { return adviseGeneric(); }
/** * Provide recipients for profile remove. * @since 5.7 */ public Set adviseProfileRemove() { return adviseGeneric(); }
/** * Atomically add listener to the list to receive notification when a * *new* profile is added or a profile is removed, and return adviseGeneric(). * This ensures that no membership listener calls are missed, but there is no guarantee * that there won't be redundant listener calls. */ public Set addMembershipListenerAndAdviseGeneric(MembershipListener listener) { initializationGate(); // exchange profiles before acquiring lock on membershipListeners membershipListeners.putIfAbsent(listener, Boolean.TRUE); return adviseGeneric(); }
/** * Atomically add listener to the list to receive notification when a * *new* profile is added or a profile is removed, and return adviseGeneric(). * This ensures that no membership listener calls are missed, but there is no guarantee * that there won't be redundant listener calls. */ public Set addMembershipListenerAndAdviseGeneric(MembershipListener listener) { initializationGate(); // exchange profiles before acquiring lock on membershipListeners membershipListeners.putIfAbsent(listener, Boolean.TRUE); return adviseGeneric(); }
public void testGenericAdvice() { Set expected = new HashSet(); for (int i = 0; i < profiles.length; i++) { expected.add(profiles[i].getDistributedMember()); } assertEquals(expected, advisor.adviseGeneric()); } }
private Set getAdvice() { if (this.newRegion instanceof BucketRegion) { return ((BucketRegion)this.newRegion).getBucketAdvisor().adviseProfileExchange(); } else { DistributionAdvisee rgn = this.newRegion.getParentAdvisee(); DistributionAdvisor advisor = rgn.getDistributionAdvisor(); return advisor.adviseGeneric(); } }
private Set getAdvice() { if (this.newRegion instanceof BucketRegion) { return ((BucketRegion)this.newRegion).getBucketAdvisor().adviseProfileExchange(); } else { DistributionAdvisee rgn = this.newRegion.getParentAdvisee(); DistributionAdvisor advisor = rgn.getDistributionAdvisor(); return advisor.adviseGeneric(); } }
while (System.currentTimeMillis() < waitEnd && adv.adviseGeneric().isEmpty()) { try {Thread.sleep(1000);} catch (InterruptedException e) { return; } if (adv.adviseGeneric().isEmpty()) { fail("other member never came on line");