org.dataloader.stats.NoOpStatisticsCollector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-dataloader Show documentation
Show all versions of java-dataloader Show documentation
A pure Java 8 port of Facebook Dataloader
package org.dataloader.stats;
import org.dataloader.stats.context.IncrementBatchLoadCountByStatisticsContext;
import org.dataloader.stats.context.IncrementBatchLoadExceptionCountStatisticsContext;
import org.dataloader.stats.context.IncrementCacheHitCountStatisticsContext;
import org.dataloader.stats.context.IncrementLoadCountStatisticsContext;
import org.dataloader.stats.context.IncrementLoadErrorCountStatisticsContext;
/**
* A statistics collector that does nothing
*/
public class NoOpStatisticsCollector implements StatisticsCollector {
private static final Statistics ZERO_STATS = new Statistics();
@Override
public long incrementLoadCount(IncrementLoadCountStatisticsContext context) {
return 0;
}
@Deprecated
@Override
public long incrementLoadCount() {
return incrementLoadCount(null);
}
@Override
public long incrementLoadErrorCount(IncrementLoadErrorCountStatisticsContext context) {
return 0;
}
@Deprecated
@Override
public long incrementLoadErrorCount() {
return incrementLoadErrorCount(null);
}
@Override
public long incrementBatchLoadCountBy(long delta, IncrementBatchLoadCountByStatisticsContext context) {
return 0;
}
@Deprecated
@Override
public long incrementBatchLoadCountBy(long delta) {
return incrementBatchLoadCountBy(delta, null);
}
@Override
public long incrementBatchLoadExceptionCount(IncrementBatchLoadExceptionCountStatisticsContext context) {
return 0;
}
@Deprecated
@Override
public long incrementBatchLoadExceptionCount() {
return incrementBatchLoadExceptionCount(null);
}
@Override
public long incrementCacheHitCount(IncrementCacheHitCountStatisticsContext context) {
return 0;
}
@Deprecated
@Override
public long incrementCacheHitCount() {
return incrementCacheHitCount(null);
}
@Override
public Statistics getStatistics() {
return ZERO_STATS;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy