public Set<InternalDistributedMember> adviseDataStore() { return this.adviseDataStore(false); }
public Set<InternalDistributedMember> adviseDataStore() { return this.adviseDataStore(false); }
public Set adviseBucketProfileExchange() { return adviseDataStore(); }
public int getNumDataStores() { final int numProfs = getNumProfiles(); if (this.lastActiveProfiles != numProfs) { this.numDataStores = adviseDataStore().size(); this.lastActiveProfiles = numProfs; } return this.numDataStores; }
public int getNumDataStores() { final int numProfs = getNumProfiles(); if (this.lastActiveProfiles != numProfs) { this.numDataStores = adviseDataStore().size(); this.lastActiveProfiles = numProfs; } return this.numDataStores; }
private Set<InternalDistributedMember> getAllRecipients( GemFireCacheImpl cache, Map map) { Set recipients = new THashSet(); for (Object pr : map.keySet()) { recipients.addAll(((PartitionedRegion)(cache.getRegion((String)pr))) .getRegionAdvisor().adviseDataStore()); } return recipients; }
/** * Clean up locally created bucket and tell other VMs to * attempt recovering redundancy * @param buck the bucket identifier */ private void cleanUpBucket(int buck) { Set dataStores = this.prRegion.getRegionAdvisor().adviseDataStore(); BucketBackupMessage.send(dataStores, this.prRegion, buck); }
private Set<InternalDistributedMember> getAllRecipients( GemFireCacheImpl cache, Map map) { Set recipients = new ObjectOpenHashSet(); for (Object pr : map.keySet()) { recipients.addAll(((PartitionedRegion)(cache.getRegion((String)pr))) .getRegionAdvisor().adviseDataStore()); } return recipients; }
/** * Clean up locally created bucket and tell other VMs to * attempt recovering redundancy * @param buck the bucket identifier */ private void cleanUpBucket(int buck) { Set dataStores = this.prRegion.getRegionAdvisor().adviseDataStore(); BucketBackupMessage.send(dataStores, this.prRegion, buck); }
private byte hasRemoteFPAttrs() { List<FixedPartitionAttributesImpl> fpaList = this.getRegionAdvisor() .adviseAllFixedPartitionAttributes(); Set<InternalDistributedMember> remoteDataStores = this.getRegionAdvisor() .adviseDataStore(); if (!fpaList.isEmpty() || (this.fixedPAttrs != null && !this.fixedPAttrs.isEmpty()) ) { return 1; } if (isDataStore() || !remoteDataStores.isEmpty()) { return 2; } // This is an accessor and we need to wait for a datastore to see if there //are any fixed PRs. return 0; }
private byte hasRemoteFPAttrs() { List<FixedPartitionAttributesImpl> fpaList = this.getRegionAdvisor() .adviseAllFixedPartitionAttributes(); Set<InternalDistributedMember> remoteDataStores = this.getRegionAdvisor() .adviseDataStore(); if (!fpaList.isEmpty() || (this.fixedPAttrs != null && !this.fixedPAttrs.isEmpty()) ) { return 1; } if (isDataStore() || !remoteDataStores.isEmpty()) { return 2; } // This is an accessor and we need to wait for a datastore to see if there //are any fixed PRs. return 0; }
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; }
/** * Test Method: Get all {@link InternalDistributedMember}s known by this * instance of the PartitionedRegion. Note: A member is recognized as such * when it partiticpates as a "data store". * * @return a <code>HashSet</code> of {@link InternalDistributedMember}s or * an empty <code>HashSet</code> */ public Set<InternalDistributedMember> getAllNodes() { Set<InternalDistributedMember> result = getRegionAdvisor().adviseDataStore(true); if(this.isDataStore()) { result.add(getDistributionManager().getId()); } return result; }
/** * Test Method: Get all {@link InternalDistributedMember}s known by this * instance of the PartitionedRegion. Note: A member is recognized as such * when it partiticpates as a "data store". * * @return a <code>HashSet</code> of {@link InternalDistributedMember}s or * an empty <code>HashSet</code> */ public Set<InternalDistributedMember> getAllNodes() { Set<InternalDistributedMember> result = getRegionAdvisor().adviseDataStore(true); if(this.isDataStore()) { result.add(getDistributionManager().getId()); } return result; }
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 static InternalDistributedMember dataStoreCheck( final DistributedMember target, final PartitionedRegion pr) { final InternalDistributedMember idmTarget = (InternalDistributedMember)target; final boolean localIsDatastore = pr.isDataStore() && pr.getCache().getDistributedSystem().getDistributedMember().equals( target); if (!(localIsDatastore || pr.getRegionAdvisor().adviseDataStore().contains( idmTarget))) { throw new IllegalArgumentException( LocalizedStrings.PartitionManager_PROVIDED_MEMBER_0_NO_PR_OR_NO_DATASTORE .toLocalizedString(target)); } return idmTarget; }
/** * Send a message to all PartitionedRegion participants, telling each member * of the PartitionedRegion with a datastore to dump just the bucket names to * the system.log * * @throws ReplyException * @see #validateAllBuckets() */ public void dumpJustBuckets() throws ReplyException { PartitionResponse response = DumpBucketsMessage.send(getRegionAdvisor() .adviseDataStore(), this, false /* only validate */, true); response.waitForRepliesUninterruptibly(); if (this.dataStore != null) { this.dataStore.dumpBuckets(); } }
/** * Send a message to all PartitionedRegion participants, telling each member * of the PartitionedRegion with a datastore to dump just the bucket names to * the system.log * * @throws ReplyException * @see #validateAllBuckets() */ public void dumpJustBuckets() throws ReplyException { PartitionResponse response = DumpBucketsMessage.send(getRegionAdvisor() .adviseDataStore(), this, false /* only validate */, true); response.waitForRepliesUninterruptibly(); if (this.dataStore != null) { this.dataStore.dumpBuckets(); } }
public static VersionTag findVersionTag(LocalRegion r, EventID eventId, boolean isPutAll) { DM dm = r.getDistributionManager(); Set recipients; if (r instanceof DistributedRegion) { recipients = ((DistributedRegion)r).getDistributionAdvisor().adviseCacheOp(); } else { recipients = ((PartitionedRegion)r).getRegionAdvisor().adviseDataStore(); } ResultReplyProcessor processor = new ResultReplyProcessor(dm, recipients); FindVersionTagMessage msg = new FindVersionTagMessage(recipients, processor.getProcessorId(), r.getFullPath(), eventId, isPutAll); dm.putOutgoing(msg); try { processor.waitForReplies(); } catch (InterruptedException e) { dm.getCancelCriterion().checkCancelInProgress(e); Thread.currentThread().interrupt(); return null; } return processor.getVersionTag(); }
public static VersionTag findVersionTag(LocalRegion r, EventID eventId, boolean isBulkOp) { DM dm = r.getDistributionManager(); Set recipients; if (r instanceof DistributedRegion) { recipients = ((DistributedRegion)r).getDistributionAdvisor().adviseCacheOp(); } else { recipients = ((PartitionedRegion)r).getRegionAdvisor().adviseDataStore(); } ResultReplyProcessor processor = new ResultReplyProcessor(dm, recipients); FindVersionTagMessage msg = new FindVersionTagMessage(recipients, processor.getProcessorId(), r.getFullPath(), eventId, isBulkOp); dm.putOutgoing(msg); try { processor.waitForReplies(); } catch (InterruptedException e) { dm.getCancelCriterion().checkCancelInProgress(e); Thread.currentThread().interrupt(); return null; } return processor.getVersionTag(); }