@Override public AttributesMutator getAttributesMutator() { checkReadiness(); return this; }
@Override public AttributesMutator getAttributesMutator() { checkReadiness(); return this; }
@Override public Set keySet(boolean allowTombstones) { checkReadiness(); return Collections.unmodifiableSet(new KeysSet(allowTombstones)); }
/** * This method returns collection of all the values of this * PartitionedRegion(locally or remotely). * * @return collection of all the values of this PartitionedRegion */ @Override public Collection values() { checkReadiness(); return Collections.unmodifiableSet(new ValuesSet()); }
/** * This method returns collection of all the values of this * PartitionedRegion(locally or remotely). * * @return collection of all the values of this PartitionedRegion */ @Override public Collection values() { checkReadiness(); return Collections.unmodifiableSet(new ValuesSet()); }
/** * This method returns set of all the keys of this PartitionedRegion(locally * or remotely). * * @return set of all the keys of this PartitionedRegion * * OVERRIDES */ @Override public Set keys() { checkReadiness(); return Collections.unmodifiableSet(new KeysSet()); }
@Override public Set keySet(boolean allowTombstones) { checkReadiness(); return Collections.unmodifiableSet(new KeysSet(allowTombstones, getTXState())); }
public Set keysWithoutCreatesForTests() { checkReadiness(); Set<Integer> availableBuckets = new HashSet<Integer>(); for(int i =0; i < getTotalNumberOfBuckets(); i++) { if(distAdvisor.isStorageAssignedForBucket(i)) { availableBuckets.add(Integer.valueOf(i)); } } return Collections.unmodifiableSet(new KeysSet(availableBuckets)); }
public Set keysWithoutCreatesForTests() { checkReadiness(); Set<Integer> availableBuckets = new HashSet<Integer>(); for(int i =0; i < getTotalNumberOfBuckets(); i++) { if(distAdvisor.isStorageAssignedForBucket(i)) { availableBuckets.add(Integer.valueOf(i)); } } return Collections.unmodifiableSet(new KeysSet(availableBuckets, getTXState())); }
/** * Check for region closure, region destruction, cache closure as well as * distributed system disconnect. As of 6/21/2007, there were at least four * volatile variables reads and one synchonrization performed upon completion * of this method. */ private void checkShutdown() { checkReadiness(); this.cache.getCancelCriterion().checkCancelInProgress(null); }
public KeysSetIterator(Set<Integer> bucketSet, boolean allowTombstones) { PartitionedRegion.this.checkReadiness(); this.bucketSetI = createBucketSetI(bucketSet); this.allowTombstones = allowTombstones; this.currentBucketI = getNextBucketIter(false /* no throw */); }
/** * Throw a ForceReattemptException if bucket has been moved out of this data store. */ private void checkIfBucketMoved(BucketRegion br) throws ForceReattemptException { if (br.isBucketDestroyed()) { this.partitionedRegion.checkReadiness(); throw new ForceReattemptException("bucket moved to other member during read op"); } }
/** * Throw a ForceReattemptException if bucket has been moved out of this data store. */ private void checkIfBucketMoved(BucketRegion br) throws ForceReattemptException { if (br.isBucketDestroyed()) { this.partitionedRegion.checkReadiness(); throw new ForceReattemptException("bucket moved to other member during read op"); } }
/** * Check for region closure, region destruction, cache closure as well as * distributed system disconnect. As of 6/21/2007, there were at least four * volatile variables reads and one synchonrization performed upon completion * of this method. */ private void checkShutdown() { checkReadiness(); this.cache.getCancelCriterion().checkCancelInProgress(null); }
@Override public final boolean containsKey(Object key, Object callbackArg) { checkReadiness(); validateKey(key); return getDataView().containsKey(key, callbackArg, this); }
protected void checkInterruptedByShutdownAll() { // when ShutdownAll is on-going, break all the GII for BR if (proxyBucket.getCache().isCacheAtShutdownAll()) { throw new CacheClosedException("Cache is being closed by ShutdownAll"); } proxyBucket.getPartitionedRegion().checkReadiness(); }
protected void checkInterruptedByShutdownAll() { // when ShutdownAll is on-going, break all the GII for BR if (proxyBucket.getCache().isCacheAtShutdownAll()) { throw new CacheClosedException("Cache is being closed by ShutdownAll"); } proxyBucket.getPartitionedRegion().checkReadiness(); }
@Override public boolean containsKey(Object key) { checkReadiness(); validateKey(key); return getDataView().containsKey(getKeyInfo(key), this); }
public void checkForPrimary() { final boolean isp = getBucketAdvisor().isPrimary(); if (! isp){ this.partitionedRegion.checkReadiness(); checkReadiness(); InternalDistributedMember primaryHolder = getBucketAdvisor().basicGetPrimaryMember(); throw new PrimaryBucketException("Bucket " + getName() + " is not primary. Current primary holder is "+primaryHolder); } }
public void checkForPrimary() { final boolean isp = getBucketAdvisor().isPrimary(); if (! isp){ this.partitionedRegion.checkReadiness(); checkReadiness(); InternalDistributedMember primaryHolder = getBucketAdvisor().basicGetPrimaryMember(); throw new PrimaryBucketException("Bucket " + getName() + " is not primary. Current primary holder is "+primaryHolder); } }