Package org.dataloader.stats
Class DelegatingStatisticsCollector
java.lang.Object
org.dataloader.stats.DelegatingStatisticsCollector
- All Implemented Interfaces:
StatisticsCollector
This statistics collector keeps dataloader statistics AND also calls the delegate
collector at the same time. This allows you to keep a specific set of statistics
and also delegate the calls onto another collector.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StatisticsCollector
private final StatisticsCollector
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
incrementBatchLoadCountBy
(long delta) Deprecated.<K> long
incrementBatchLoadCountBy
(long delta, IncrementBatchLoadCountByStatisticsContext<K> context) Called to increment the number of batch loadslong
Deprecated.<K> long
Called to increment the number of batch loads exceptionslong
Deprecated.<K> long
Called to increment the number of cache hitslong
Deprecated.<K> long
Called to increment the number of loadslong
Deprecated.<K> long
Called to increment the number of loads that resulted in an object deemed in error
-
Field Details
-
collector
-
delegateCollector
-
-
Constructor Details
-
DelegatingStatisticsCollector
- Parameters:
delegateCollector
- a non null delegate collector
-
-
Method Details
-
incrementLoadCount
Description copied from interface:StatisticsCollector
Called to increment the number of loads- Specified by:
incrementLoadCount
in interfaceStatisticsCollector
- 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.Description copied from interface:StatisticsCollector
Called to increment the number of loads- Specified by:
incrementLoadCount
in interfaceStatisticsCollector
- Returns:
- the current value after increment
-
incrementLoadErrorCount
Description copied from interface:StatisticsCollector
Called to increment the number of loads that resulted in an object deemed in error- Specified by:
incrementLoadErrorCount
in interfaceStatisticsCollector
- 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
Deprecated.Description copied from interface:StatisticsCollector
Called to increment the number of loads that resulted in an object deemed in error- Specified by:
incrementLoadErrorCount
in interfaceStatisticsCollector
- Returns:
- the current value after increment
-
incrementBatchLoadCountBy
public <K> long incrementBatchLoadCountBy(long delta, IncrementBatchLoadCountByStatisticsContext<K> context) Description copied from interface:StatisticsCollector
Called to increment the number of batch loads- Specified by:
incrementBatchLoadCountBy
in interfaceStatisticsCollector
- 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
Deprecated.Description copied from interface:StatisticsCollector
Called to increment the number of batch loads- Specified by:
incrementBatchLoadCountBy
in interfaceStatisticsCollector
- Parameters:
delta
- how much to add to the count- Returns:
- the current value after increment
-
incrementBatchLoadExceptionCount
public <K> long incrementBatchLoadExceptionCount(IncrementBatchLoadExceptionCountStatisticsContext<K> context) Description copied from interface:StatisticsCollector
Called to increment the number of batch loads exceptions- Specified by:
incrementBatchLoadExceptionCount
in interfaceStatisticsCollector
- 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
Deprecated.Description copied from interface:StatisticsCollector
Called to increment the number of batch loads exceptions- Specified by:
incrementBatchLoadExceptionCount
in interfaceStatisticsCollector
- Returns:
- the current value after increment
-
incrementCacheHitCount
Description copied from interface:StatisticsCollector
Called to increment the number of cache hits- Specified by:
incrementCacheHitCount
in interfaceStatisticsCollector
- 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.Description copied from interface:StatisticsCollector
Called to increment the number of cache hits- Specified by:
incrementCacheHitCount
in interfaceStatisticsCollector
- Returns:
- the current value after increment
-
getStatistics
- Specified by:
getStatistics
in interfaceStatisticsCollector
- Returns:
- the statistics of the this collector (and not its delegate)
-
getDelegateStatistics
- Returns:
- the statistics of the delegate
-