class ResourceLimitCache implements Cache<K, V> {

  public ResourceLimitCache(java.util.concurrent.ConcurrentMap<K, V> map,
      BiFunction<K, V, int[]> permitsSupplier, int... limits) {
    Objects.requireNonNull(map);
    Objects.requireNonNull(permitsSupplier);
    Objects.requireNonNull(limits);
    this.map = map;
    this.group = new ResourceSemaphore.Group(limits);
    this.permitsSupplier = permitsSupplier;
  }

  public  ResourceLimitCache(java.util.concurrent.ConcurrentMap<K, V> map,
      BiFunction<K, V, int[]> permitsSupplier, int... limits);

}