// Path: cacheio-core/src/main/java/com/mobilejazz/cacheio/FutureCache.java
// public interface FutureCache<K, V> {
// 
//   Future<V> get(K key);
// 
//   Future<V> put(K key, V value, long expiry, TimeUnit unit);
// 
//   Future<K> remove(K key);
// 
//   Future<Map<K, V>> getAll(Collection<K> keys);
// 
//   Future<Map<K, V>> putAll(Map<K, V> map, long expiry, TimeUnit unit);
// 
//   Future<Collection<K>> removeAll(Collection<K> keys);
// 
// }
// 
// Path: cacheio-core/src/main/java/com/mobilejazz/cacheio/SyncCache.java
// public interface SyncCache<K, V> {
// 
//   V get(K key);
// 
//   V put(K key, V value, long expiry, TimeUnit unit);
// 
//   K remove(K key);
// 
//   Map<K, V> getAll(Collection<K> keys);
// 
//   Map<K, V> putAll(Map<K, V> map, long expiry, TimeUnit unit);
// 
//   Collection<K> removeAll(Collection<K> keys);
// 
// }
// 
// Path: cacheio-core/src/main/java/com/mobilejazz/cacheio/helper/Preconditions.java
// public static <T> T checkArgument(T object, String message) {
//   if (object == null) {
//     throw new IllegalArgumentException(message);
//   }
// 
//   return object;
// }


import com.mobilejazz.cacheio.FutureCache;
import com.mobilejazz.cacheio.SyncCache;
import java.util.*;
import java.util.concurrent.*;
import static com.mobilejazz.cacheio.helper.Preconditions.checkArgument;
  @Override public V get(K key) {
    return blocking(config.delegate.get(key));
  }

  @Override public V put(K key, V value, long expiry, TimeUnit unit) {
    return blocking(config.delegate.put(key, value, expiry, unit));
  }

  @Override public K remove(K key) {
    return blocking(config.delegate.remove(key));
  }

  @Override public Map<K, V> getAll(Collection<K> keys) {
    return blocking(config.delegate.getAll(keys));
  }

  @Override public Map<K, V> putAll(Map<K, V> map, long expiry, TimeUnit unit) {
    return blocking(config.delegate.putAll(map, expiry, unit));
  }

  @Override public Collection<K> removeAll(Collection<K> keys) {
    return blocking(config.delegate.removeAll(keys));
  }

  public static <K, V> Builder<K, V> newBuilder(Class<K> keyType, Class<V> valueType) {
    return new Builder<K, V>().setKeyType(keyType).setValueType(valueType);
  }

  public static final class Builder<K, V> {

// Path: cacheio-core/src/main/java/com/mobilejazz/cacheio/FutureCache.java
// public interface FutureCache<K, V> {
// 
//   Future<V> get(K key);
// 
//   Future<V> put(K key, V value, long expiry, TimeUnit unit);
// 
//   Future<K> remove(K key);
// 
//   Future<Map<K, V>> getAll(Collection<K> keys);
// 
//   Future<Map<K, V>> putAll(Map<K, V> map, long expiry, TimeUnit unit);
// 
//   Future<Collection<K>> removeAll(Collection<K> keys);
// 
// }
// 
// Path: cacheio-core/src/main/java/com/mobilejazz/cacheio/SyncCache.java
// public interface SyncCache<K, V> {
// 
//   V get(K key);
// 
//   V put(K key, V value, long expiry, TimeUnit unit);
// 
//   K remove(K key);
// 
//   Map<K, V> getAll(Collection<K> keys);
// 
//   Map<K, V> putAll(Map<K, V> map, long expiry, TimeUnit unit);
// 
//   Collection<K> removeAll(Collection<K> keys);
// 
// }
// 
// Path: cacheio-core/src/main/java/com/mobilejazz/cacheio/helper/Preconditions.java
// public static <T> T checkArgument(T object, String message) {
//   if (object == null) {
//     throw new IllegalArgumentException(message);
//   }
// 
//   return object;
// }


// Path: cacheio-core/src/main/java/com/mobilejazz/cacheio/wrappers/SyncCacheWrapper.java
import com.mobilejazz.cacheio.FutureCache;
import com.mobilejazz.cacheio.SyncCache;
import java.util.*;
import java.util.concurrent.*;
import static com.mobilejazz.cacheio.helper.Preconditions.checkArgument;

  @Override public V get(K key) {
    return blocking(config.delegate.get(key));
  }

  @Override public V put(K key, V value, long expiry, TimeUnit unit) {
    return blocking(config.delegate.put(key, value, expiry, unit));
  }

  @Override public K remove(K key) {
    return blocking(config.delegate.remove(key));
  }

  @Override public Map<K, V> getAll(Collection<K> keys) {
    return blocking(config.delegate.getAll(keys));
  }

  @Override public Map<K, V> putAll(Map<K, V> map, long expiry, TimeUnit unit) {
    return blocking(config.delegate.putAll(map, expiry, unit));
  }

  @Override public Collection<K> removeAll(Collection<K> keys) {
    return blocking(config.delegate.removeAll(keys));
  }

  public static <K, V> Builder<K, V> newBuilder(Class<K> keyType, Class<V> valueType) {
    return new Builder<K, V>().setKeyType(keyType).setValueType(valueType);
  }

  public static final class Builder<K, V> {

    private FutureCache<K, V> delegate;