}
public Graph getNewGraph() {
graphNumber++;
NodePoolFactory nodePoolFactory = new BdbNodePoolFactory(BDB_HANDLER, graphNumber);
MapFactory factory = new BdbMapFactory(new BdbEnvironmentHandlerImpl(new TempDirectoryHandler()),
"database" + graphNumber);
LongIndex[] indexes = createIndexes(factory);
collectionFactory = new BdbCollectionFactory(BDB_HANDLER, "collection" + graphNumber);
openIndexes.addAll(asList(indexes));
openMapFactories.add(factory);