{
private final Map<Database<?, ?>, Entity[]> m_dbFiles = new HashMap<Database<?, ?>, Entity[]>();
private ShadowCopyTransactionalDatabase<Integer, Long, KeyAndValue<Integer, Long>> createDatabaseUsingFile(Directory dir, EFile f)
{
LogAdapterHolder lah = new LogAdapterHolder(new StdOutLogAdapter());
FileBackedNodeRepositoryBuilder<Integer, Long> fbnrb = new FileBackedNodeRepositoryBuilder<Integer, Long>().setInternalPointerSize(4).setKeySerializer(IntegerNullSerializer.INSTANCE).setValueSerializer(LongSerializer.INSTANCE).setLeafNodeHasPointersToAdjacentNodes(true).setLogAdapterHolder(lah).setNodeSizeStrategy(new NumberOfRecordsNodeSizeStrategy(2));
LruCacheNodeRepositoryBuilder<Integer, Long> nrb = new LruCacheNodeRepositoryBuilder<Integer, Long>().setProxiedBuilder(fbnrb).setMaxCacheSize(10);
ConstantRecordSizeBPlusTreeBackendFactory<Integer, Long> bf = new ConstantRecordSizeBPlusTreeBackendFactory<Integer, Long>(nrb, lah);
ShadowCopyTransactionalDatabase<Integer, Long, KeyAndValue<Integer, Long>> res = new ShadowCopyTransactionalDatabase<Integer, Long, KeyAndValue<Integer, Long>>(new SingleFileManager(f, dir), bf, false, lah);
m_dbFiles.put(res, new Entity[] { dir, f });