use of org.apache.geode.distributed.internal.ReplyProcessor21 in project geode by apache.
the class UpdateAttributesProcessor method sendProfileUpdate.
public void sendProfileUpdate(boolean exchangeProfiles) {
DM mgr = this.advisee.getDistributionManager();
DistributionAdvisor advisor = this.advisee.getDistributionAdvisor();
this.profileExchange = exchangeProfiles;
if (!exchangeProfiles) {
if (this.removeProfile) {
if (!advisor.isInitialized()) {
// never got initialized.
return;
}
} else if (advisor.initializationGate()) {
// it just did the profile exchange so we are done
return;
}
}
final Set recipients;
if (this.removeProfile) {
recipients = advisor.adviseProfileRemove();
} else if (exchangeProfiles) {
recipients = advisor.adviseProfileExchange();
} else {
recipients = advisor.adviseProfileUpdate();
}
if (recipients.isEmpty()) {
return;
}
ReplyProcessor21 processor = null;
// Scope scope = this.region.scope;
// always require an ack to prevent misordering of messages
InternalDistributedSystem system = this.advisee.getSystem();
processor = new UpdateAttributesReplyProcessor(system, recipients);
UpdateAttributesMessage message = getUpdateAttributesMessage(processor, recipients);
mgr.putOutgoing(message);
this.processor = processor;
}
use of org.apache.geode.distributed.internal.ReplyProcessor21 in project geode by apache.
the class PrepareNewPersistentMemberMessage method send.
public static void send(Set<InternalDistributedMember> members, DM dm, String regionPath, PersistentMemberID oldId, PersistentMemberID newId) throws ReplyException {
ReplyProcessor21 processor = new ReplyProcessor21(dm, members);
PrepareNewPersistentMemberMessage msg = new PrepareNewPersistentMemberMessage(regionPath, oldId, newId, processor.getProcessorId());
msg.setRecipients(members);
dm.putOutgoing(msg);
processor.waitForRepliesUninterruptibly();
}
use of org.apache.geode.distributed.internal.ReplyProcessor21 in project geode by apache.
the class RemovePersistentMemberMessage method send.
public static void send(Set<InternalDistributedMember> members, DM dm, String regionPath, PersistentMemberID id, PersistentMemberID initializingId) throws ReplyException {
if (id == null && initializingId == null) {
// no need to do anything
return;
}
ReplyProcessor21 processor = new ReplyProcessor21(dm, members);
RemovePersistentMemberMessage msg = new RemovePersistentMemberMessage(regionPath, id, initializingId, processor.getProcessorId());
msg.setRecipients(members);
dm.putOutgoing(msg);
processor.waitForRepliesUninterruptibly();
}
Aggregations