// Path: src/main/java/org/dataloader/impl/Assertions.java
// @Internal
// public class Assertions {
// 
//     public static void assertState(boolean state, Supplier<String> message) {
//         if (!state) {
//             throw new DataLoaderAssertionException(message.get());
//         }
//     }
// 
//     public static <T> T nonNull(T t) {
//         return nonNull(t, () -> "nonNull object required");
//     }
// 
//     public static <T> T nonNull(T t, Supplier<String> message) {
//         if (t == null) {
//             throw new NullPointerException(message.get());
//         }
//         return t;
//     }
// 
// }
// 
// Path: src/main/java/org/dataloader/stats/SimpleStatisticsCollector.java
// public class SimpleStatisticsCollector implements StatisticsCollector {
//     private final AtomicLong loadCount = new AtomicLong();
//     private final AtomicLong batchInvokeCount = new AtomicLong();
//     private final AtomicLong batchLoadCount = new AtomicLong();
//     private final AtomicLong cacheHitCount = new AtomicLong();
//     private final AtomicLong batchLoadExceptionCount = new AtomicLong();
//     private final AtomicLong loadErrorCount = new AtomicLong();
// 
//     @Override
//     public long incrementLoadCount() {
//         return loadCount.incrementAndGet();
//     }
// 
// 
//     @Override
//     public long incrementBatchLoadCountBy(long delta) {
//         batchInvokeCount.incrementAndGet();
//         return batchLoadCount.addAndGet(delta);
//     }
// 
//     @Override
//     public long incrementCacheHitCount() {
//         return cacheHitCount.incrementAndGet();
//     }
// 
//     @Override
//     public long incrementLoadErrorCount() {
//         return loadErrorCount.incrementAndGet();
//     }
// 
//     @Override
//     public long incrementBatchLoadExceptionCount() {
//         return batchLoadExceptionCount.incrementAndGet();
//     }
// 
//     @Override
//     public Statistics getStatistics() {
//         return new Statistics(loadCount.get(), loadErrorCount.get(), batchInvokeCount.get(), batchLoadCount.get(), batchLoadExceptionCount.get(), cacheHitCount.get());
//     }
// 
//     @Override
//     public String toString() {
//         return getStatistics().toString();
//     }
// }
// 
// Path: src/main/java/org/dataloader/stats/StatisticsCollector.java
// @PublicSpi
// public interface StatisticsCollector {
// 
//     /**
//      * Called to increment the number of loads
//      *
//      * @return the current value after increment
//      */
//     long incrementLoadCount();
// 
//     /**
//      * Called to increment the number of loads that resulted in an object deemed in error
//      *
//      * @return the current value after increment
//      */
//     long incrementLoadErrorCount();
// 
//     /**
//      * Called to increment the number of batch loads
//      *
//      * @param delta how much to add to the count
//      *
//      * @return the current value after increment
//      */
//     long incrementBatchLoadCountBy(long delta);
// 
//     /**
//      * Called to increment the number of batch loads exceptions
//      *
//      * @return the current value after increment
//      */
//     long incrementBatchLoadExceptionCount();
// 
//     /**
//      * Called to increment the number of cache hits
//      *
//      * @return the current value after increment
//      */
//     long incrementCacheHitCount();
// 
//     /**
//      * @return the statistics that have been gathered up to this point in time
//      */
//     Statistics getStatistics();
// }
// 
// Path: src/main/java/org/dataloader/impl/Assertions.java
// public static <T> T nonNull(T t) {
//     return nonNull(t, () -> "nonNull object required");
// }


import org.dataloader.annotations.PublicApi;
import org.dataloader.impl.Assertions;
import org.dataloader.stats.SimpleStatisticsCollector;
import org.dataloader.stats.StatisticsCollector;
import java.util.Optional;
import java.util.function.Supplier;
import static org.dataloader.impl.Assertions.nonNull;
        return Optional.ofNullable(valueCache);
    }

    /**
     * Sets the value cache implementation to use for caching values, if caching is enabled.
     *
     * @param valueCache the value cache instance
     *
     * @return the data loader options for fluent coding
     */
    public DataLoaderOptions setValueCache(ValueCache<?, ?> valueCache) {
        this.valueCache = valueCache;
        return this;
    }

    /**
     * @return the {@link ValueCacheOptions} that control how the {@link ValueCache} will be used
     */
    public ValueCacheOptions getValueCacheOptions() {
        return valueCacheOptions;
    }

    /**
     * Sets the {@link ValueCacheOptions} that control how the {@link ValueCache} will be used
     *
     * @param valueCacheOptions the value cache options
     *
     * @return the data loader options for fluent coding
     */
    public DataLoaderOptions setValueCacheOptions(ValueCacheOptions valueCacheOptions) {
// Path: src/main/java/org/dataloader/impl/Assertions.java
// @Internal
// public class Assertions {
// 
//     public static void assertState(boolean state, Supplier<String> message) {
//         if (!state) {
//             throw new DataLoaderAssertionException(message.get());
//         }
//     }
// 
//     public static <T> T nonNull(T t) {
//         return nonNull(t, () -> "nonNull object required");
//     }
// 
//     public static <T> T nonNull(T t, Supplier<String> message) {
//         if (t == null) {
//             throw new NullPointerException(message.get());
//         }
//         return t;
//     }
// 
// }
// 
// Path: src/main/java/org/dataloader/stats/SimpleStatisticsCollector.java
// public class SimpleStatisticsCollector implements StatisticsCollector {
//     private final AtomicLong loadCount = new AtomicLong();
//     private final AtomicLong batchInvokeCount = new AtomicLong();
//     private final AtomicLong batchLoadCount = new AtomicLong();
//     private final AtomicLong cacheHitCount = new AtomicLong();
//     private final AtomicLong batchLoadExceptionCount = new AtomicLong();
//     private final AtomicLong loadErrorCount = new AtomicLong();
// 
//     @Override
//     public long incrementLoadCount() {
//         return loadCount.incrementAndGet();
//     }
// 
// 
//     @Override
//     public long incrementBatchLoadCountBy(long delta) {
//         batchInvokeCount.incrementAndGet();
//         return batchLoadCount.addAndGet(delta);
//     }
// 
//     @Override
//     public long incrementCacheHitCount() {
//         return cacheHitCount.incrementAndGet();
//     }
// 
//     @Override
//     public long incrementLoadErrorCount() {
//         return loadErrorCount.incrementAndGet();
//     }
// 
//     @Override
//     public long incrementBatchLoadExceptionCount() {
//         return batchLoadExceptionCount.incrementAndGet();
//     }
// 
//     @Override
//     public Statistics getStatistics() {
//         return new Statistics(loadCount.get(), loadErrorCount.get(), batchInvokeCount.get(), batchLoadCount.get(), batchLoadExceptionCount.get(), cacheHitCount.get());
//     }
// 
//     @Override
//     public String toString() {
//         return getStatistics().toString();
//     }
// }
// 
// Path: src/main/java/org/dataloader/stats/StatisticsCollector.java
// @PublicSpi
// public interface StatisticsCollector {
// 
//     /**
//      * Called to increment the number of loads
//      *
//      * @return the current value after increment
//      */
//     long incrementLoadCount();
// 
//     /**
//      * Called to increment the number of loads that resulted in an object deemed in error
//      *
//      * @return the current value after increment
//      */
//     long incrementLoadErrorCount();
// 
//     /**
//      * Called to increment the number of batch loads
//      *
//      * @param delta how much to add to the count
//      *
//      * @return the current value after increment
//      */
//     long incrementBatchLoadCountBy(long delta);
// 
//     /**
//      * Called to increment the number of batch loads exceptions
//      *
//      * @return the current value after increment
//      */
//     long incrementBatchLoadExceptionCount();
// 
//     /**
//      * Called to increment the number of cache hits
//      *
//      * @return the current value after increment
//      */
//     long incrementCacheHitCount();
// 
//     /**
//      * @return the statistics that have been gathered up to this point in time
//      */
//     Statistics getStatistics();
// }
// 
// Path: src/main/java/org/dataloader/impl/Assertions.java
// public static <T> T nonNull(T t) {
//     return nonNull(t, () -> "nonNull object required");
// }


// Path: src/main/java/org/dataloader/DataLoaderOptions.java
import org.dataloader.annotations.PublicApi;
import org.dataloader.impl.Assertions;
import org.dataloader.stats.SimpleStatisticsCollector;
import org.dataloader.stats.StatisticsCollector;
import java.util.Optional;
import java.util.function.Supplier;
import static org.dataloader.impl.Assertions.nonNull;

        return Optional.ofNullable(valueCache);
    }

    /**
     * Sets the value cache implementation to use for caching values, if caching is enabled.
     *
     * @param valueCache the value cache instance
     *
     * @return the data loader options for fluent coding
     */
    public DataLoaderOptions setValueCache(ValueCache<?, ?> valueCache) {
        this.valueCache = valueCache;
        return this;
    }

    /**
     * @return the {@link ValueCacheOptions} that control how the {@link ValueCache} will be used
     */
    public ValueCacheOptions getValueCacheOptions() {
        return valueCacheOptions;
    }

    /**
     * Sets the {@link ValueCacheOptions} that control how the {@link ValueCache} will be used
     *
     * @param valueCacheOptions the value cache options
     *
     * @return the data loader options for fluent coding
     */
    public DataLoaderOptions setValueCacheOptions(ValueCacheOptions valueCacheOptions) {
        this.valueCacheOptions = Assertions.nonNull(valueCacheOptions);