@Override public String toString() { return "Bucket id = " + bucketId + " from local member = " + getDistributionManager().getDistributionManagerId() + ": " + super.toString(); } };
@Override public String toString() { return "Bucket id = " + bucketId + " from local member = " + getDistributionManager().getDistributionManagerId() + ": " + super.toString(); } };
/** * Initializes the Node for this Map. */ private Node initializeNode() { return new Node(getDistributionManager().getId(), SERIAL_NUMBER_GENERATOR.getAndIncrement()); }
public Set<InternalDistributedMember> getBucketOwners() { Set<InternalDistributedMember> s = this.advisor.adviseInitialized(); if (s == Collections.<InternalDistributedMember>emptySet()) { s = new HashSet<InternalDistributedMember>(); } if (isHosting()) { s.add(this.partitionedRegion.getDistributionManager().getId()); } return s; }
/** * Initializes the Node for this Map. */ private Node initializeNode() { return new Node(getDistributionManager().getId(), SERIAL_NUMBER_GENERATOR.getAndIncrement()); }
@SuppressWarnings("unchecked") public Set<InternalDistributedMember> getBucketOwners() { Set<InternalDistributedMember> s = getOtherBucketOwners(); if (s == Collections.<InternalDistributedMember> emptySet()) { s = new THashSet(); } if (isHosting()) { s.add(this.partitionedRegion.getDistributionManager().getId()); } return s; }
/** * 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(); }
private Set<InternalDistributedMember> getAllStores(String partitionName) { if(partitionName != null){ return getFixedPartitionStores(partitionName); } final Set<InternalDistributedMember> allStores = this.prRegion.getRegionAdvisor().adviseDataStore(true); PartitionedRegionDataStore myDS = this.prRegion.getDataStore(); if (myDS != null) { allStores.add(this.prRegion.getDistributionManager().getId()); } return allStores; }
private Set<InternalDistributedMember> getAllStores(String partitionName) { if(partitionName != null){ return getFixedPartitionStores(partitionName); } final Set<InternalDistributedMember> allStores = this.prRegion.getRegionAdvisor().adviseDataStore(true); PartitionedRegionDataStore myDS = this.prRegion.getDataStore(); if (myDS != null) { allStores.add(this.prRegion.getDistributionManager().getId()); } return allStores; }
/** * Sends a BucketBackupMessage requesting that another VM backup an existing * bucket * * @param recipients * the member that the contains keys/value message is sent to * @param r * the PartitionedRegion that contains the bucket */ public static void send(Set recipients, PartitionedRegion r, int bucketId) { Assert.assertTrue(recipients != null, "BucketBackupMessage NULL sender list"); BucketBackupMessage m = new BucketBackupMessage(recipients, r.getPRId(), bucketId); r.getDistributionManager().putOutgoing(m); }
public static PartitionResponse send(Set recipients, PartitionedRegion r, final boolean validateOnly, final boolean onlyBuckets) { PartitionResponse p = new PartitionResponse(r.getSystem(), recipients); DumpBucketsMessage m = new DumpBucketsMessage(recipients, r.getPRId(), p, validateOnly, onlyBuckets); /*Set failures =*/ r.getDistributionManager().putOutgoing(m); // if (failures != null && failures.size() > 0) { // throw new PartitionedRegionCommunicationException("Failed sending ", m); // } return p; }
public static DumpB2NResponse send(Set recipients, PartitionedRegion r, int bId, boolean justPrimaryInfo) { DumpB2NResponse p = new DumpB2NResponse(r.getSystem(), recipients); DumpB2NRegion m = new DumpB2NRegion(recipients, r.getPRId(), p, bId, justPrimaryInfo); r.getDistributionManager().putOutgoing(m); return p; }
public static PartitionResponse send(Set recipients, PartitionedRegion r) { PartitionResponse p = new PartitionResponse(r.getSystem(), recipients); DumpAllPRConfigMessage m = new DumpAllPRConfigMessage(recipients, r.getPRId(), p); /*Set failures = */r.getDistributionManager().putOutgoing(m); // if (failures != null && failures.size() > 0) { // throw new PartitionedRegionCommunicationException("Failed sending ", m); // } return p; }
public static UpdateEntryVersionResponse send( InternalDistributedMember recipient, PartitionedRegion r, EntryEventImpl event) throws ForceReattemptException { Set recipients = Collections.singleton(recipient); UpdateEntryVersionResponse p = new UpdateEntryVersionResponse( r.getSystem(), recipient, event.getKey()); PRUpdateEntryVersionMessage m = new PRUpdateEntryVersionMessage(recipients, r.getPRId(), p, event); Set failures = r.getDistributionManager().putOutgoing(m); if (failures != null && failures.size() > 0) { throw new ForceReattemptException( LocalizedStrings.UpdateEntryVersionMessage_FAILED_SENDING_0 .toLocalizedString(m)); } return p; } }
public static UpdateEntryVersionResponse send( InternalDistributedMember recipient, PartitionedRegion r, EntryEventImpl event) throws ForceReattemptException { Set recipients = Collections.singleton(recipient); UpdateEntryVersionResponse p = new UpdateEntryVersionResponse( r.getSystem(), recipient, event.getKey()); PRUpdateEntryVersionMessage m = new PRUpdateEntryVersionMessage(recipients, r.getPRId(), p, event); Set failures = r.getDistributionManager().putOutgoing(m); if (failures != null && failures.size() > 0) { throw new ForceReattemptException( LocalizedStrings.UpdateEntryVersionMessage_FAILED_SENDING_0 .toLocalizedString(m)); } return p; } }
public static PartitionResponse send(Set recipients, PartitionedRegion r) { final TXStateInterface tx = r.getTXState(); PartitionResponse p = new PartitionResponse(r.getSystem(), recipients, tx); DumpAllPRConfigMessage m = new DumpAllPRConfigMessage(recipients, r.getPRId(), p, tx); /*Set failures = */r.getDistributionManager().putOutgoing(m); // if (failures != null && failures.size() > 0) { // throw new PartitionedRegionCommunicationException("Failed sending ", m); // } return p; }
public static DumpB2NResponse send(Set recipients, PartitionedRegion r, int bId, boolean justPrimaryInfo) { final TXStateInterface tx = r.getTXState(); DumpB2NResponse p = new DumpB2NResponse(r.getSystem(), recipients, tx); DumpB2NRegion m = new DumpB2NRegion(recipients, r.getPRId(), p, bId, justPrimaryInfo, tx); r.getDistributionManager().putOutgoing(m); return p; }
public static PartitionResponse send(Set recipients, PartitionedRegion r, final boolean validateOnly, final boolean onlyBuckets) { final TXStateInterface tx = r.getTXState(); PartitionResponse p = new PartitionResponse(r.getSystem(), recipients, tx); DumpBucketsMessage m = new DumpBucketsMessage(recipients, r.getPRId(), p, validateOnly, onlyBuckets, tx); /*Set failures =*/ r.getDistributionManager().putOutgoing(m); // if (failures != null && failures.size() > 0) { // throw new PartitionedRegionCommunicationException("Failed sending ", m); // } return p; }