HHH-12966 Do not include loggers in statistics beans
This way, you don't need to add the JBoss logging dependencies.
This commit is contained in:
parent
8293d6dce3
commit
90b71f6895
|
@ -12,14 +12,10 @@ import java.util.function.Supplier;
|
|||
import org.hibernate.cache.spi.Region;
|
||||
import org.hibernate.stat.CacheableDataStatistics;
|
||||
|
||||
import org.jboss.logging.Logger;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public abstract class AbstractCacheableDataStatistics implements CacheableDataStatistics {
|
||||
private static final Logger log = Logger.getLogger( AbstractCacheableDataStatistics.class );
|
||||
|
||||
private final String cacheRegionName;
|
||||
private final LongAdder cacheHitCount;
|
||||
private final LongAdder cacheMissCount;
|
||||
|
|
|
@ -14,8 +14,6 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
|
|||
|
||||
import org.hibernate.stat.QueryStatistics;
|
||||
|
||||
import org.jboss.logging.Logger;
|
||||
|
||||
/**
|
||||
* Query statistics (HQL and SQL)
|
||||
* <p/>
|
||||
|
@ -24,8 +22,6 @@ import org.jboss.logging.Logger;
|
|||
* @author Alex Snaps
|
||||
*/
|
||||
public class QueryStatisticsImpl implements QueryStatistics {
|
||||
private static final Logger log = Logger.getLogger( QueryStatisticsImpl.class );
|
||||
|
||||
private final String query;
|
||||
|
||||
private final LongAdder cacheHitCount = new LongAdder();
|
||||
|
@ -164,8 +160,6 @@ public class QueryStatisticsImpl implements QueryStatistics {
|
|||
* @param time time taken
|
||||
*/
|
||||
void executed(long rows, long time) {
|
||||
log.tracef( "QueryStatistics - query executed : %s", query );
|
||||
|
||||
// read lock is enough, concurrent updates are supported by the underlying type AtomicLong
|
||||
// this only guards executed(long, long) to be called, when another thread is executing getExecutionAvgTime()
|
||||
readLock.lock();
|
||||
|
@ -193,20 +187,14 @@ public class QueryStatisticsImpl implements QueryStatistics {
|
|||
}
|
||||
|
||||
void incrementCacheHitCount() {
|
||||
log.tracef( "QueryStatistics - cache hit : %s", query );
|
||||
|
||||
cacheHitCount.increment();
|
||||
}
|
||||
|
||||
void incrementCacheMissCount() {
|
||||
log.tracef( "QueryStatistics - cache miss : %s", query );
|
||||
|
||||
cacheMissCount.increment();
|
||||
}
|
||||
|
||||
void incrementCachePutCount() {
|
||||
log.tracef( "QueryStatistics - cache put : %s", query );
|
||||
|
||||
cachePutCount.increment();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue