Interface StatisticsCollector
- All Known Implementing Classes:
DelegatingStatisticsCollector, NoOpStatisticsCollector, SimpleStatisticsCollector, ThreadLocalStatisticsCollector
This allows statistics to be collected for
DataLoader operations-
Method Summary
Modifier and TypeMethodDescriptionlongincrementBatchLoadCountBy(long delta) Deprecated.default <K> longincrementBatchLoadCountBy(long delta, IncrementBatchLoadCountByStatisticsContext<K> context) Called to increment the number of batch loadslongdefault <K> longCalled to increment the number of batch loads exceptionslongDeprecated.default <K> longCalled to increment the number of cache hitslongDeprecated.default <K> longCalled to increment the number of loadslongdefault <K> longCalled to increment the number of loads that resulted in an object deemed in error
-
Method Details
-
incrementLoadCount
Called to increment the number of loads- Type Parameters:
K- the class of the key in the data loader- Parameters:
context- the context containing metadata of the data loader invocation- Returns:
- the current value after increment
-
incrementLoadCount
Deprecated.Called to increment the number of loads- Returns:
- the current value after increment
-
incrementLoadErrorCount
Called to increment the number of loads that resulted in an object deemed in error- Type Parameters:
K- the class of the key in the data loader- Parameters:
context- the context containing metadata of the data loader invocation- Returns:
- the current value after increment
-
incrementLoadErrorCount
Called to increment the number of loads that resulted in an object deemed in error- Returns:
- the current value after increment
-
incrementBatchLoadCountBy
default <K> long incrementBatchLoadCountBy(long delta, IncrementBatchLoadCountByStatisticsContext<K> context) Called to increment the number of batch loads- Type Parameters:
K- the class of the key in the data loader- Parameters:
delta- how much to add to the countcontext- the context containing metadata of the data loader invocation- Returns:
- the current value after increment
-
incrementBatchLoadCountBy
Called to increment the number of batch loads- Parameters:
delta- how much to add to the count- Returns:
- the current value after increment
-
incrementBatchLoadExceptionCount
default <K> long incrementBatchLoadExceptionCount(IncrementBatchLoadExceptionCountStatisticsContext<K> context) Called to increment the number of batch loads exceptions- Type Parameters:
K- the class of the key in the data loader- Parameters:
context- the context containing metadata of the data loader invocation- Returns:
- the current value after increment
-
incrementBatchLoadExceptionCount
Called to increment the number of batch loads exceptions- Returns:
- the current value after increment
-
incrementCacheHitCount
Called to increment the number of cache hits- Type Parameters:
K- the class of the key in the data loader- Parameters:
context- the context containing metadata of the data loader invocation- Returns:
- the current value after increment
-
incrementCacheHitCount
Deprecated.Called to increment the number of cache hits- Returns:
- the current value after increment
-
getStatistics
Statistics getStatistics()- Returns:
- the statistics that have been gathered up to this point in time
-
incrementBatchLoadCountBy(long, IncrementBatchLoadCountByStatisticsContext)