/** * Task to verify that no eviction happened in the region. * This is used to verify that the regions did not triger eviction, * when they were populated till eviction threshold. * @param aRegion */ protected void verifyNoEviction(PartitionedRegion aRegion) { Set<Map.Entry<Integer, BucketRegion>> bucketList = aRegion.getDataStore() .getAllLocalBuckets(); Iterator iterator = bucketList.iterator(); while (iterator.hasNext()) { Map.Entry entry = (Map.Entry)iterator.next(); BucketRegion bucket = (BucketRegion)entry.getValue(); int bucketId = ((BucketRegion)bucket).getId(); long numEvictionsForBucket = ((BucketRegion)bucket).getEvictions(); totalEvictedEntries += numEvictionsForBucket; } if (totalEvictedEntries != 0) { throw new TestException( "Test issue - Test expects no eviction to be happened when the regions are populated till eviction threshold but region " + aRegion.getName() + " evicted " + totalEvictedEntries + " entries"); }else { hydra.Log.getLogWriter().info("As expected region "+aRegion.getName()+" did not evict"); } } }
/** * Releases resources obtained by this <code>LRUAlgorithm</code> */ public void close() { if (this.stats != null) { if (bucketRegion != null) { this.stats.incEvictions(bucketRegion.getEvictions() * -1); this.stats.decrementCounter(bucketRegion.getCounter()); bucketRegion.close(); } else { this.stats.close(); } } }
Log.getLogWriter().info( "For the bucket " + localBucket.getName() + " evicted entries are " + localBucket.getEvictions()); count += localBucket.getEvictions();
/** * Releases resources obtained by this <code>LRUAlgorithm</code> */ public void close() { if (this.stats != null) { if (bucketRegion != null) { this.stats.incEvictions(bucketRegion.getEvictions() * -1); this.stats.decrementCounter(bucketRegion.getCounter()); bucketRegion.close(); } else { this.stats.close(); } } }
BucketRegion bucket = (BucketRegion)entry.getValue(); int bucketId = ((BucketRegion)bucket).getId(); long numEvictionsForBucket = ((BucketRegion)bucket).getEvictions(); long bucketSize; try {
BucketRegion bucket = (BucketRegion)entry.getValue(); int bucketId = ((BucketRegion)bucket).getId(); long numEvictionsForBucket = ((BucketRegion)bucket).getEvictions(); long bucketSize; try {
BucketRegion bucket = (BucketRegion)entry.getValue(); int bucketId = ((BucketRegion)bucket).getId(); long numEvictionsForBucket = ((BucketRegion)bucket).getEvictions(); totalEvictionsForRegion += numEvictionsForBucket;
BucketRegion bucket = (BucketRegion)entry.getValue(); int bucketId = ((BucketRegion)bucket).getId(); long numEvictionsForBucket = ((BucketRegion)bucket).getEvictions(); totalEvictedEntries += numEvictionsForBucket; + ((BucketRegion)bucket).getNumEntriesInVM() + " and entries evicted " + ((BucketRegion)bucket).getEvictions()); "For the region " + aRegion.getName() + " For the bucket region with id " + bucketId + " entries evicted : " + ((BucketRegion)bucket).getEvictions() + " and bucket size is " + ((BucketRegion)bucket).getSizeForEviction());
BucketRegion bucket = (BucketRegion)entry.getValue(); int bucketId = ((BucketRegion)bucket).getId(); long numEvictionsForBucket = ((BucketRegion)bucket).getEvictions(); totalEvictedEntries += numEvictionsForBucket; + " entries left in vm is " + bucket.entryCount() + " and entries evicted " + ((BucketRegion)bucket).getEvictions());