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); } }
OutputToTargetRegistry(File storePath) throws IOException { super(storePath, new IntInlineKeyDescriptor(), DATA_EXTERNALIZER); }