diff --git a/hibernate-core/src/main/java/org/hibernate/stat/Statistics.java b/hibernate-core/src/main/java/org/hibernate/stat/Statistics.java index bd677512b1..c25e44d937 100644 --- a/hibernate-core/src/main/java/org/hibernate/stat/Statistics.java +++ b/hibernate-core/src/main/java/org/hibernate/stat/Statistics.java @@ -10,13 +10,21 @@ import java.util.Map; import org.checkerframework.checker.nullness.qual.Nullable; /** - * Exposes statistics collected from all sessions belonging to a - * particular {@link org.hibernate.SessionFactory}. + * Exposes statistics collected from all sessions belonging to a given + * {@link org.hibernate.SessionFactory}. + * *

- * Collection of statistics is enabled if the configuration property - * {@value org.hibernate.cfg.AvailableSettings#GENERATE_STATISTICS} is - * set to {@code true}. It may be dynamically enabled or disabled at - * runtime by calling {@link #setStatisticsEnabled(boolean)}. + * A custom statistics collector may be supplied by implementing the + * {@link org.hibernate.stat.spi.StatisticsImplementor} SPI, and + * supplying a {@link org.hibernate.stat.spi.StatisticsFactory} via + * the configuration setting + * {@value org.hibernate.cfg.StatisticsSettings#STATS_BUILDER}. * * @author Emmanuel Bernard */ diff --git a/hibernate-core/src/main/java/org/hibernate/stat/internal/StatisticsInitiator.java b/hibernate-core/src/main/java/org/hibernate/stat/internal/StatisticsInitiator.java index f5b67c6eb5..f10aa1c8a6 100644 --- a/hibernate-core/src/main/java/org/hibernate/stat/internal/StatisticsInitiator.java +++ b/hibernate-core/src/main/java/org/hibernate/stat/internal/StatisticsInitiator.java @@ -38,10 +38,9 @@ public class StatisticsInitiator implements SessionFactoryServiceInitiator + * A custom implementation may be selected via the configuration property + * {@value org.hibernate.cfg.StatisticsSettings#STATS_BUILDER}. * * @author Steve Ebersole */ diff --git a/hibernate-core/src/main/java/org/hibernate/stat/spi/StatisticsImplementor.java b/hibernate-core/src/main/java/org/hibernate/stat/spi/StatisticsImplementor.java index 30b7b2aa49..b3d340e71d 100644 --- a/hibernate-core/src/main/java/org/hibernate/stat/spi/StatisticsImplementor.java +++ b/hibernate-core/src/main/java/org/hibernate/stat/spi/StatisticsImplementor.java @@ -13,7 +13,9 @@ import java.util.Map; import static java.util.Collections.emptyMap; /** - * A service SPI for collecting statistics about various events that occur at runtime. + * A service SPI for collecting statistics about various events occurring at runtime. + *

+ * A custom implementation may be provided via a {@link StatisticsFactory}. * * @author Emmanuel Bernard */