use of org.hibernate.cache.spi.ExtendedStatisticsSupport in project hibernate-orm by hibernate.
the class DeprecatedNaturalIdCacheStatisticsImpl method getElementCountOnDisk.
@Override
public long getElementCountOnDisk() {
long count = 0;
HashSet<Region> processedRegions = null;
for (NaturalIdDataAccess accessStrategy : accessStrategies) {
final DomainDataRegion region = accessStrategy.getRegion();
if (ExtendedStatisticsSupport.class.isInstance(region)) {
}
if (region instanceof ExtendedStatisticsSupport) {
if (processedRegions == null) {
processedRegions = new HashSet<>();
}
if (processedRegions.add(region)) {
count += ((ExtendedStatisticsSupport) region).getElementCountOnDisk();
}
}
}
if (count == 0) {
return NO_EXTENDED_STAT_SUPPORT_RETURN;
}
return count;
}
use of org.hibernate.cache.spi.ExtendedStatisticsSupport in project hibernate-orm by hibernate.
the class DeprecatedNaturalIdCacheStatisticsImpl method getSizeInMemory.
@Override
public long getSizeInMemory() {
long count = 0;
HashSet<Region> processedRegions = null;
for (NaturalIdDataAccess accessStrategy : accessStrategies) {
final DomainDataRegion region = accessStrategy.getRegion();
if (ExtendedStatisticsSupport.class.isInstance(region)) {
}
if (region instanceof ExtendedStatisticsSupport) {
if (processedRegions == null) {
processedRegions = new HashSet<>();
}
if (processedRegions.add(region)) {
count += ((ExtendedStatisticsSupport) region).getElementCountOnDisk();
}
}
}
if (count == 0) {
return NO_EXTENDED_STAT_SUPPORT_RETURN;
}
return count;
}
use of org.hibernate.cache.spi.ExtendedStatisticsSupport in project hibernate-orm by hibernate.
the class DeprecatedNaturalIdCacheStatisticsImpl method getElementCountInMemory.
@Override
public long getElementCountInMemory() {
long count = 0;
HashSet<Region> processedRegions = null;
for (NaturalIdDataAccess accessStrategy : accessStrategies) {
final DomainDataRegion region = accessStrategy.getRegion();
if (ExtendedStatisticsSupport.class.isInstance(region)) {
}
if (region instanceof ExtendedStatisticsSupport) {
if (processedRegions == null) {
processedRegions = new HashSet<>();
}
if (processedRegions.add(region)) {
count += ((ExtendedStatisticsSupport) region).getElementCountInMemory();
}
}
}
if (count == 0) {
return NO_EXTENDED_STAT_SUPPORT_RETURN;
}
return count;
}
Aggregations