Java 类com.intellij.util.io.IntInlineKeyDescriptor 实例源码

项目:tools-idea    文件:IntObjectPersistentMaplet.java   
public IntObjectPersistentMaplet(final File file, final DataExternalizer<V> externalizer) {
  try {
    myMap = new PersistentHashMap<Integer, V>(file, new IntInlineKeyDescriptor(), externalizer);
    myCache = new SLRUCache<Integer, Object>(CACHE_SIZE, CACHE_SIZE) {
      @NotNull
      @Override
      public Object createValue(Integer key) {
        try {
          final V v1 = myMap.get(key);
          return v1 == null? NULL_OBJ : v1;
        }
        catch (IOException e) {
          throw new RuntimeException(e);
        }
      }
    };
  }
  catch (IOException e) {
    throw new RuntimeException(e);
  }
}
项目:intellij-ce-playground    文件:OutputToTargetRegistry.java   
OutputToTargetRegistry(File storePath) throws IOException {
  super(storePath, new IntInlineKeyDescriptor(), DATA_EXTERNALIZER);
}