// Path: src/main/java/org/dataloader/impl/CompletableFutureKit.java
// @Internal
// public class CompletableFutureKit {
// 
//     public static <V> CompletableFuture<V> failedFuture(Exception e) {
//         CompletableFuture<V> future = new CompletableFuture<>();
//         future.completeExceptionally(e);
//         return future;
//     }
// 
//     public static <V> Throwable cause(CompletableFuture<V> completableFuture) {
//         if (!completableFuture.isCompletedExceptionally()) {
//             return null;
//         }
//         try {
//             completableFuture.get();
//             return null;
//         } catch (InterruptedException e) {
//             Thread.currentThread().interrupt();
//             return e;
//         } catch (ExecutionException e) {
//             Throwable cause = e.getCause();
//             if (cause != null) {
//                 return cause;
//             }
//             return e;
//         }
//     }
// 
//     public static <V> boolean succeeded(CompletableFuture<V> future) {
//         return future.isDone() && !future.isCompletedExceptionally();
//     }
// 
//     public static <V> boolean failed(CompletableFuture<V> future) {
//         return future.isDone() && future.isCompletedExceptionally();
//     }
// 
//     public static <T> CompletableFuture<List<T>> allOf(List<CompletableFuture<T>> cfs) {
//         return CompletableFuture.allOf(cfs.toArray(new CompletableFuture[0]))
//                 .thenApply(v -> cfs.stream()
//                         .map(CompletableFuture::join)
//                         .collect(toList())
//                 );
//     }
// }
// 
// Path: src/main/java/org/dataloader/impl/NoOpValueCache.java
// @Internal
// public class NoOpValueCache<K, V> implements ValueCache<K, V> {
// 
//     /**
//      * a no op value cache instance
//      */
//     public static final NoOpValueCache<?, ?> NOOP = new NoOpValueCache<>();
// 
//     // avoid object allocation by using a final field
//     private final ValueCachingNotSupported NOT_SUPPORTED = new ValueCachingNotSupported();
//     private final CompletableFuture<V> NOT_SUPPORTED_CF = CompletableFutureKit.failedFuture(NOT_SUPPORTED);
//     private final CompletableFuture<Void> NOT_SUPPORTED_VOID_CF = CompletableFuture.completedFuture(null);
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public CompletableFuture<V> get(K key) {
//         return NOT_SUPPORTED_CF;
//     }
// 
//     @Override
//     public CompletableFuture<List<Try<V>>> getValues(List<K> keys) throws ValueCachingNotSupported {
//         throw NOT_SUPPORTED;
//     }
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public CompletableFuture<V> set(K key, V value) {
//         return NOT_SUPPORTED_CF;
//     }
// 
//     @Override
//     public CompletableFuture<List<V>> setValues(List<K> keys, List<V> values) throws ValueCachingNotSupported {
//         throw NOT_SUPPORTED;
//     }
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public CompletableFuture<Void> delete(K key) {
//         return NOT_SUPPORTED_VOID_CF;
//     }
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public CompletableFuture<Void> clear() {
//         return NOT_SUPPORTED_VOID_CF;
//     }
// }


import org.dataloader.annotations.PublicSpi;
import org.dataloader.impl.CompletableFutureKit;
import org.dataloader.impl.NoOpValueCache;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
    }

    /**
     * Deletes the entry with the specified key from the value cache, if it exists.
     * <p>
     * NOTE: Your implementation MUST not throw exceptions, rather it should return a CompletableFuture that has completed exceptionally.  Failure
     * to do this may cause the {@link DataLoader} code to not run properly.
     *
     * @param key the key to delete
     *
     * @return a void future for error handling and fluent composition
     */
    CompletableFuture<Void> delete(K key);

    /**
     * Clears all entries from the value cache.
     * <p>
     * NOTE: Your implementation MUST not throw exceptions, rather it should return a CompletableFuture that has completed exceptionally.  Failure
     * to do this may cause the {@link DataLoader} code to not run properly.
     *
     * @return a void future for error handling and fluent composition
     */
    CompletableFuture<Void> clear();


    /**
     * This special exception can be used to short-circuit a caching method
     */
    class ValueCachingNotSupported extends UnsupportedOperationException {
        @Override
// Path: src/main/java/org/dataloader/impl/CompletableFutureKit.java
// @Internal
// public class CompletableFutureKit {
// 
//     public static <V> CompletableFuture<V> failedFuture(Exception e) {
//         CompletableFuture<V> future = new CompletableFuture<>();
//         future.completeExceptionally(e);
//         return future;
//     }
// 
//     public static <V> Throwable cause(CompletableFuture<V> completableFuture) {
//         if (!completableFuture.isCompletedExceptionally()) {
//             return null;
//         }
//         try {
//             completableFuture.get();
//             return null;
//         } catch (InterruptedException e) {
//             Thread.currentThread().interrupt();
//             return e;
//         } catch (ExecutionException e) {
//             Throwable cause = e.getCause();
//             if (cause != null) {
//                 return cause;
//             }
//             return e;
//         }
//     }
// 
//     public static <V> boolean succeeded(CompletableFuture<V> future) {
//         return future.isDone() && !future.isCompletedExceptionally();
//     }
// 
//     public static <V> boolean failed(CompletableFuture<V> future) {
//         return future.isDone() && future.isCompletedExceptionally();
//     }
// 
//     public static <T> CompletableFuture<List<T>> allOf(List<CompletableFuture<T>> cfs) {
//         return CompletableFuture.allOf(cfs.toArray(new CompletableFuture[0]))
//                 .thenApply(v -> cfs.stream()
//                         .map(CompletableFuture::join)
//                         .collect(toList())
//                 );
//     }
// }
// 
// Path: src/main/java/org/dataloader/impl/NoOpValueCache.java
// @Internal
// public class NoOpValueCache<K, V> implements ValueCache<K, V> {
// 
//     /**
//      * a no op value cache instance
//      */
//     public static final NoOpValueCache<?, ?> NOOP = new NoOpValueCache<>();
// 
//     // avoid object allocation by using a final field
//     private final ValueCachingNotSupported NOT_SUPPORTED = new ValueCachingNotSupported();
//     private final CompletableFuture<V> NOT_SUPPORTED_CF = CompletableFutureKit.failedFuture(NOT_SUPPORTED);
//     private final CompletableFuture<Void> NOT_SUPPORTED_VOID_CF = CompletableFuture.completedFuture(null);
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public CompletableFuture<V> get(K key) {
//         return NOT_SUPPORTED_CF;
//     }
// 
//     @Override
//     public CompletableFuture<List<Try<V>>> getValues(List<K> keys) throws ValueCachingNotSupported {
//         throw NOT_SUPPORTED;
//     }
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public CompletableFuture<V> set(K key, V value) {
//         return NOT_SUPPORTED_CF;
//     }
// 
//     @Override
//     public CompletableFuture<List<V>> setValues(List<K> keys, List<V> values) throws ValueCachingNotSupported {
//         throw NOT_SUPPORTED;
//     }
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public CompletableFuture<Void> delete(K key) {
//         return NOT_SUPPORTED_VOID_CF;
//     }
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public CompletableFuture<Void> clear() {
//         return NOT_SUPPORTED_VOID_CF;
//     }
// }


// Path: src/main/java/org/dataloader/ValueCache.java
import org.dataloader.annotations.PublicSpi;
import org.dataloader.impl.CompletableFutureKit;
import org.dataloader.impl.NoOpValueCache;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;

    }

    /**
     * Deletes the entry with the specified key from the value cache, if it exists.
     * <p>
     * NOTE: Your implementation MUST not throw exceptions, rather it should return a CompletableFuture that has completed exceptionally.  Failure
     * to do this may cause the {@link DataLoader} code to not run properly.
     *
     * @param key the key to delete
     *
     * @return a void future for error handling and fluent composition
     */
    CompletableFuture<Void> delete(K key);

    /**
     * Clears all entries from the value cache.
     * <p>
     * NOTE: Your implementation MUST not throw exceptions, rather it should return a CompletableFuture that has completed exceptionally.  Failure
     * to do this may cause the {@link DataLoader} code to not run properly.
     *
     * @return a void future for error handling and fluent composition
     */
    CompletableFuture<Void> clear();


    /**
     * This special exception can be used to short-circuit a caching method
     */
    class ValueCachingNotSupported extends UnsupportedOperationException {
        @Override
        public Throwable fillInStackTrace() {