static void sendInterestChange(DM dm, ClientProxyMembershipID clientID, ClientInterestMessageImpl msg) { ServerInterestRegistrationMessage smsg = new ServerInterestRegistrationMessage( clientID, msg); Set recipients = dm.getOtherDistributionManagerIds(); smsg.setRecipients(recipients); ReplyProcessor21 rp = new ReplyProcessor21(dm, recipients); smsg.processorId = rp.getProcessorId(); dm.putOutgoing(smsg); try { rp.waitForReplies(); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); } }
public static ReplyProcessor21 send(final InternalDistributedSystem system, final DM dm, final TXStateInterface txState, final Set<DistributedMember> recipients, final LocalRegion dataRegion, final Object regionKey, final byte originalOp, final byte originalDestroy, final boolean originalBulkOp, final Object originalValue, final Delta originalDelta) { final ReplyProcessor21 response = new ReplyProcessor21(system, recipients); final TXCleanupEntryMessage msg = new TXCleanupEntryMessage(txState, response, dataRegion.getFullPath(), regionKey, originalOp, originalDestroy, originalBulkOp, originalValue, originalDelta); msg.setRecipients(recipients); dm.putOutgoing(msg); return response; }
private void sendFilterProfileOperation(OperationMessage msg) { Set recipients = ((CacheDistributionAdvisee)this.region).getDistributionAdvisor() .adviseProfileUpdate(); msg.setRecipients(recipients); ReplyProcessor21 rp = new ReplyProcessor21(this.region.getDistributionManager(), recipients); msg.processorId = rp.getProcessorId(); this.region.getDistributionManager().putOutgoing(msg); try { rp.waitForReplies(); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); } }
public static void send( Set<InternalDistributedMember> recipients, DM dm, String regionPath) throws ReplyException { ReplyProcessor21 processor = new ReplyProcessor21(dm, recipients); MembershipFlushRequest msg = new MembershipFlushRequest(regionPath, processor.getProcessorId()); msg.setRecipients(recipients); dm.putOutgoing(msg); processor.waitForRepliesUninterruptibly(); }
public static void send( Set<InternalDistributedMember> members, DM dm, String regionPath) throws ReplyException { ReplyProcessor21 processor = new ReplyProcessor21(dm, members); ReleaseClearLockMessage msg = new ReleaseClearLockMessage(regionPath, processor.getProcessorId()); msg.setRecipients(members); dm.putOutgoing(msg); processor.waitForRepliesUninterruptibly(); }
private void sendFilterProfileOperation(OperationMessage msg) { Set recipients = ((CacheDistributionAdvisee)this.region).getDistributionAdvisor() .adviseProfileUpdate(); msg.setRecipients(recipients); ReplyProcessor21 rp = new ReplyProcessor21(this.region.getDistributionManager(), recipients); msg.processorId = rp.getProcessorId(); this.region.getDistributionManager().putOutgoing(msg); try { rp.waitForReplies(); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); } }
public static void send( InternalDistributedMember members, DM dm, String regionPath) throws ReplyException { ReplyProcessor21 processor = new ReplyProcessor21(dm, members); SnapshotBucketLockReleaseMessage msg = new SnapshotBucketLockReleaseMessage(regionPath, processor.getProcessorId()); msg.setRecipient(members); dm.putOutgoing(msg); processor.waitForRepliesUninterruptibly(); }
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(); }
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(); }
public static void send( Set<InternalDistributedMember> members, DM dm, String regionPath) throws ReplyException { ReplyProcessor21 processor = new ReplyProcessor21(dm, members); ReleaseClearLockMessage msg = new ReleaseClearLockMessage(regionPath, processor.getProcessorId()); msg.setRecipients(members); dm.putOutgoing(msg); processor.waitForRepliesUninterruptibly(); }
public static void send( Set<InternalDistributedMember> recipients, DM dm, String regionPath) throws ReplyException { ReplyProcessor21 processor = new ReplyProcessor21(dm, recipients); MembershipFlushRequest msg = new MembershipFlushRequest(regionPath, processor.getProcessorId()); msg.setRecipients(recipients); dm.putOutgoing(msg); processor.waitForRepliesUninterruptibly(); }
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(); }
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(); }
public static ReplyProcessor21 send(Set recipients, PartitionedRegion r, RegionEventImpl event) { ReplyProcessor21 response = new ReplyProcessor21(r.getSystem(), recipients); InvalidatePartitionedRegionMessage msg = new InvalidatePartitionedRegionMessage(recipients, event.getCallbackArgument(), r, response); r.getSystem().getDistributionManager().putOutgoing(msg); return response; }
public static ReplyProcessor21 send(Set recipients, PartitionedRegion r, RegionEventImpl event) { ReplyProcessor21 response = new ReplyProcessor21(r.getSystem(), recipients); InvalidatePartitionedRegionMessage msg = new InvalidatePartitionedRegionMessage(recipients, event.getCallbackArgument(), r, response); r.getSystem().getDistributionManager().putOutgoing(msg); return response; }
/** * Send this message to the bucket primary, after the {@link ReplyProcessor21#waitForRepliesUninterruptibly()} returns, all updates * from the primary should be complete. Use this from a host of a backup bucket (aka secondary) when the update * operations originating from the primary {@link Scope#DISTRIBUTED_NO_ACK do not require an acknowldgement} * @param primary * @param p * @param bucketId * @return a processor on which to wait for the flush operation to complete */ public static ReplyProcessor21 send(InternalDistributedMember primary, PartitionedRegion p, int bucketId) { ReplyProcessor21 reply = new ReplyProcessor21(p.getDistributionManager(), primary); FlushMessage fm = new FlushMessage(p.getPRId(), bucketId, reply.getProcessorId(), primary); p.getDistributionManager().putOutgoing(fm); return reply; }
/** * Send this message to the bucket primary, after the {@link ReplyProcessor21#waitForRepliesUninterruptibly()} returns, all updates * from the primary should be complete. Use this from a host of a backup bucket (aka secondary) when the update * operations originating from the primary {@link Scope#DISTRIBUTED_NO_ACK do not require an acknowldgement} * @param primary * @param p * @param bucketId * @return a processor on which to wait for the flush operation to complete */ public static ReplyProcessor21 send(InternalDistributedMember primary, PartitionedRegion p, int bucketId) { ReplyProcessor21 reply = new ReplyProcessor21(p.getDistributionManager(), primary); FlushMessage fm = new FlushMessage(p.getPRId(), bucketId, reply.getProcessorId(), primary); p.getDistributionManager().putOutgoing(fm); return reply; }
/** * Sends a DestroyRegionOnDataStoreMessage requesting that another VM destroy an existing * region * */ public static void send(InternalDistributedMember recipient, PartitionedRegion r, Object callbackArg) { DM dm = r.getDistributionManager(); ReplyProcessor21 rp = new ReplyProcessor21(dm, recipient); int procId = rp.getProcessorId(); DestroyRegionOnDataStoreMessage m = new DestroyRegionOnDataStoreMessage(recipient, r.getPRId(), rp, callbackArg); r.getDistributionManager().putOutgoing(m); rp.waitForRepliesUninterruptibly(); }
/** * Sends a DestroyRegionOnDataStoreMessage requesting that another VM destroy an existing * region * */ public static void send(InternalDistributedMember recipient, PartitionedRegion r, Object callbackArg) { DM dm = r.getDistributionManager(); ReplyProcessor21 rp = new ReplyProcessor21(dm, recipient); int procId = rp.getProcessorId(); DestroyRegionOnDataStoreMessage m = new DestroyRegionOnDataStoreMessage(recipient, r.getPRId(), rp, callbackArg); r.getDistributionManager().putOutgoing(m); rp.waitForRepliesUninterruptibly(); }
public void run() { DM dm = getSystem().getDistributionManager(); OnlyGFDMReply message = new OnlyGFDMReply(); ReplyProcessor21 processor = new ReplyProcessor21(getSystem(), dm.getOtherNormalDistributionManagerIds()); message.processorId = processor.getProcessorId(); dm.putOutgoing(message); try { processor.waitForReplies(); } catch (Exception ex) { fail("While waiting for replies", ex); } } });