// Path: core/src/main/java/com/github/jeluard/stone/helper/Loggers.java
// public final class Loggers {
// 
//   private Loggers() {
//   }
// 
//   private static final String BASE_LOGGER_NAME = "com.github.jeluard.stone";
//   public static final Logger BASE_LOGGER = Logger.getLogger(Loggers.BASE_LOGGER_NAME);
// 
//   /**
//    * @param suffix
//    * @return a configured {@link Logger}
//    */
//   public static Logger create(final String suffix) {
//     Preconditions.checkNotNull(suffix, "null suffix");
// 
//     return Logger.getLogger(Loggers.BASE_LOGGER_NAME+"."+suffix);
//   }
// 
// }


import com.github.jeluard.guayaba.annotation.Idempotent;
import com.github.jeluard.guayaba.util.concurrent.ConcurrentMaps;
import com.github.jeluard.stone.helper.Loggers;
import com.google.common.base.Preconditions;
import com.google.common.base.Supplier;
import java.io.Closeable;
import java.io.IOException;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.logging.Level;
import javax.annotation.concurrent.ThreadSafe;
    });
  }

  /**
   * @param id
   * @param maximumSize
   * @return an initialized {@link Storage} unique for this {@code id}
   * @throws IOException 
   */
  protected abstract T create(String id, int maximumSize) throws IOException;

  /**
   * @return all currently created {@link Storage}s
   */
  protected final Iterable<T> getStorages() {
    return this.cache.values();
  }

  /**
   * {@inheritDoc}
   */
  @Idempotent
  @Override
  public final void close() throws IOException {
    cleanup();

    for (final T storage : this.cache.values()) {
      try {
        close(storage);
      } catch (IOException e) {
// Path: core/src/main/java/com/github/jeluard/stone/helper/Loggers.java
// public final class Loggers {
// 
//   private Loggers() {
//   }
// 
//   private static final String BASE_LOGGER_NAME = "com.github.jeluard.stone";
//   public static final Logger BASE_LOGGER = Logger.getLogger(Loggers.BASE_LOGGER_NAME);
// 
//   /**
//    * @param suffix
//    * @return a configured {@link Logger}
//    */
//   public static Logger create(final String suffix) {
//     Preconditions.checkNotNull(suffix, "null suffix");
// 
//     return Logger.getLogger(Loggers.BASE_LOGGER_NAME+"."+suffix);
//   }
// 
// }


// Path: core/src/main/java/com/github/jeluard/stone/spi/StorageFactory.java
import com.github.jeluard.guayaba.annotation.Idempotent;
import com.github.jeluard.guayaba.util.concurrent.ConcurrentMaps;
import com.github.jeluard.stone.helper.Loggers;
import com.google.common.base.Preconditions;
import com.google.common.base.Supplier;
import java.io.Closeable;
import java.io.IOException;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.logging.Level;
import javax.annotation.concurrent.ThreadSafe;

    });
  }

  /**
   * @param id
   * @param maximumSize
   * @return an initialized {@link Storage} unique for this {@code id}
   * @throws IOException 
   */
  protected abstract T create(String id, int maximumSize) throws IOException;

  /**
   * @return all currently created {@link Storage}s
   */
  protected final Iterable<T> getStorages() {
    return this.cache.values();
  }

  /**
   * {@inheritDoc}
   */
  @Idempotent
  @Override
  public final void close() throws IOException {
    cleanup();

    for (final T storage : this.cache.values()) {
      try {
        close(storage);
      } catch (IOException e) {
        if (Loggers.BASE_LOGGER.isLoggable(Level.WARNING)) {