public void endRead(long start, long end, long bytesRead) { getStats().endRead(start, end, bytesRead); } /**
public void endRead(long start, long end, long bytesRead) { getStats().endRead(start, end, bytesRead); }
public void run() { Cache cache = getCache(); PartitionedRegion region = (PartitionedRegion) cache.getRegion(PR_REGION_NAME); DiskRegion disk = region.getRegionAdvisor().getBucket(bucketId).getDiskRegion(); if(recoveredLocally) { assertEquals(0, disk.getStats().getRemoteInitializations()); assertEquals(1, disk.getStats().getLocalInitializations()); } else { assertEquals(1, disk.getStats().getRemoteInitializations()); assertEquals(0, disk.getStats().getLocalInitializations()); } } });
/** Get the number of entries that have overflowed to disk. * * @returns int The number of entries in this region that have overflowed to disk. */ public static long getNumOverflowOnDisk(Region aRegion) { DiskRegion diskReg = ((LocalRegion)aRegion).getDiskRegion(); if (diskReg == null) // no disk is being used return 0; return diskReg.getStats().getNumOverflowOnDisk(); }
public void run() { Cache cache = getCache(); PartitionedRegion region = (PartitionedRegion) cache.getRegion(regionName); DiskRegion disk = region.getRegionAdvisor().getBucket(bucketId).getDiskRegion(); if(recoveredLocally) { assertEquals(0, disk.getStats().getRemoteInitializations()); assertEquals(1, disk.getStats().getLocalInitializations()); } else { assertEquals(1, disk.getStats().getRemoteInitializations()); assertEquals(0, disk.getStats().getLocalInitializations()); } } });
@Override public void incNumOverflowOnDisk(long delta) { getStats().incNumOverflowOnDisk(delta); super.incNumOverflowOnDisk(delta); }
@Override public void incNumEntriesInVM(long delta) { getStats().incNumEntriesInVM(delta); super.incNumEntriesInVM(delta); }
/** Get the number of entries that have been written to disk. Note: this does * not take removes into consideration. It is the total number of entries that * have been written to disk thus far, not the current number of entries on disk. * * @returns int The number of entries in this region that have been written to disk. */ public static long getNumEntriesWrittenToDisk(Region aRegion) { DiskRegion diskReg = ((LocalRegion)aRegion).getDiskRegion(); if (diskReg == null) // no disk is being used return 0; return diskReg.getStats().getWrites(); }
@Override public void incNumEntriesInVM(long delta) { getStats().incNumEntriesInVM(delta); super.incNumEntriesInVM(delta); }
@Override public void incNumOverflowBytesOnDisk(long delta) { getStats().incNumOverflowBytesOnDisk(delta); super.incNumOverflowBytesOnDisk(delta); }
@Override public void incNumOverflowOnDisk(long delta) { getStats().incNumOverflowOnDisk(delta); super.incNumOverflowOnDisk(delta); }
/** Get the total number of bytes that have been written to disk. * * @returns long The total number of bytes that have been written to disk. */ public static long getBytesWritten(Region aRegion) { DiskRegion diskReg = ((LocalRegion)aRegion).getDiskRegion(); if (diskReg == null) // no disk is being used return 0; return diskReg.getStats().getBytesWritten(); }
/** Get the number of entries that have been removed from disk. * * @returns long The total number of region entries that have been removed from disk. */ public static long getRemoves(Region aRegion) { DiskRegion diskReg = ((LocalRegion)aRegion).getDiskRegion(); if (diskReg == null) // no disk is being used return 0; return diskReg.getStats().getRemoves(); }
private void endAsyncWrite(AsyncDiskEntry ade, DiskRegion dr, long start) { this.pendingAsyncEnqueue.decrementAndGet(); dr.getStats().endWrite(start, this.stats.endWrite(start)); if (!ade.versionOnly) { // for versionOnly = true ade.de will be null long bytesWritten = ade.de.getDiskId().getValueLength(); dr.getStats().incWrittenBytes(bytesWritten); } }
private void endAsyncWrite(AsyncDiskEntry ade, DiskRegion dr, long start) { // logger.info(LocalizedStrings.DEBUG, "DEBUG endAsyncWrite"); this.pendingAsyncEnqueue.decrementAndGet(); dr.getStats().endWrite(start, this.stats.endWrite(start)); if (!ade.versionOnly) { // for versionOnly = true ade.de will be null long bytesWritten = ade.de.getDiskId().getValueLength(); dr.getStats().incWrittenBytes(bytesWritten); } }
/** * Make sure the disk region stats are set to zero when the region is cleared. */ public void testClearAndStats() throws Exception { DiskRegion dr = ((LocalRegion)testRegion).getDiskRegion(); assertEquals(0, dr.getStats().getNumEntriesInVM()); // put a value in the region testRegion.put(new Long(1), new Long(1)); assertEquals(1, dr.getStats().getNumEntriesInVM()); testRegion.clear(); assertEquals(0, dr.getStats().getNumEntriesInVM()); }
public void run() { Cache cache = getCache(); DistributedRegion region = (DistributedRegion) cache.getRegion(REGION_NAME); DiskRegionStats stats = region.getDiskRegion().getStats(); if(localRecovery) { assertEquals(1, stats.getLocalInitializations()); assertEquals(0, stats.getRemoteInitializations()); } else { assertEquals(0, stats.getLocalInitializations()); assertEquals(1, stats.getRemoteInitializations()); } } });
public void run() { Cache cache = getCache(); Region region = cache.getRegion(REGION_NAME); DistributedRegion distributedRegion = (DistributedRegion) region; DiskRegionStats stats = distributedRegion.getDiskRegion().getStats(); if (localRecovery) { assertEquals(1, stats.getLocalInitializations()); assertEquals(0, stats.getRemoteInitializations()); } else { assertEquals(0, stats.getLocalInitializations()); assertEquals(1, stats.getRemoteInitializations()); } } });