Package org.dataloader.stats
Class DelegatingStatisticsCollector
- java.lang.Object
-
- org.dataloader.stats.DelegatingStatisticsCollector
-
- All Implemented Interfaces:
StatisticsCollector
public class DelegatingStatisticsCollector extends java.lang.Object implements 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.
-
-
Constructor Summary
Constructors Constructor Description DelegatingStatisticsCollector(StatisticsCollector delegateCollector)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Statistics
getDelegateStatistics()
Statistics
getStatistics()
void
incrementBatchLoadCountBy(long delta)
Deprecated.<K> void
incrementBatchLoadCountBy(long delta, IncrementBatchLoadCountByStatisticsContext<K> context)
Called to increment the number of batch loadsvoid
incrementBatchLoadExceptionCount()
Deprecated.<K> void
incrementBatchLoadExceptionCount(IncrementBatchLoadExceptionCountStatisticsContext<K> context)
Called to increment the number of batch loads exceptionsvoid
incrementCacheHitCount()
Deprecated.<K> void
incrementCacheHitCount(IncrementCacheHitCountStatisticsContext<K> context)
Called to increment the number of cache hitsvoid
incrementLoadCount()
Deprecated.<K> void
incrementLoadCount(IncrementLoadCountStatisticsContext<K> context)
Called to increment the number of loadsvoid
incrementLoadErrorCount()
Deprecated.<K> void
incrementLoadErrorCount(IncrementLoadErrorCountStatisticsContext<K> context)
Called to increment the number of loads that resulted in an object deemed in error
-
-
-
Constructor Detail
-
DelegatingStatisticsCollector
public DelegatingStatisticsCollector(StatisticsCollector delegateCollector)
- Parameters:
delegateCollector
- a non null delegate collector
-
-
Method Detail
-
incrementLoadCount
public <K> void incrementLoadCount(IncrementLoadCountStatisticsContext<K> context)
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
-
incrementLoadCount
@Deprecated public void incrementLoadCount()
Deprecated.Description copied from interface:StatisticsCollector
Called to increment the number of loads- Specified by:
incrementLoadCount
in interfaceStatisticsCollector
-
incrementLoadErrorCount
public <K> void incrementLoadErrorCount(IncrementLoadErrorCountStatisticsContext<K> context)
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
-
incrementLoadErrorCount
@Deprecated public void 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
-
incrementBatchLoadCountBy
public <K> void 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
-
incrementBatchLoadCountBy
@Deprecated public void incrementBatchLoadCountBy(long delta)
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
-
incrementBatchLoadExceptionCount
public <K> void 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
-
incrementBatchLoadExceptionCount
@Deprecated public void incrementBatchLoadExceptionCount()
Deprecated.Description copied from interface:StatisticsCollector
Called to increment the number of batch loads exceptions- Specified by:
incrementBatchLoadExceptionCount
in interfaceStatisticsCollector
-
incrementCacheHitCount
public <K> void incrementCacheHitCount(IncrementCacheHitCountStatisticsContext<K> context)
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
-
incrementCacheHitCount
@Deprecated public void incrementCacheHitCount()
Deprecated.Description copied from interface:StatisticsCollector
Called to increment the number of cache hits- Specified by:
incrementCacheHitCount
in interfaceStatisticsCollector
-
getStatistics
public Statistics getStatistics()
- Specified by:
getStatistics
in interfaceStatisticsCollector
- Returns:
- the statistics of the collector (and not its delegate)
-
getDelegateStatistics
public Statistics getDelegateStatistics()
- Returns:
- the statistics of the delegate
-
-