/** Create a GTFS feed in a temp file */ public GTFSFeed () { // calls to this must be first operation in constructor - why, Java? this(DBMaker.newTempFileDB() .transactionDisable() .mmapFileEnable() .asyncWriteEnable() .deleteFilesAfterClose() .compressionEnable() // .cacheSize(1024 * 1024) this bloats memory consumption .make()); // TODO db.close(); }
m = DBMaker.newTempFileDB().deleteFilesAfterClose();
public LocalLinkSet() { this.db = DBMaker .newTempFileDB() .mmapFileEnable() .transactionDisable() .asyncWriteEnable() .asyncWriteFlushDelay(100) .make(); this.setMaker = db.createTreeSet("linkHashes"); long heapMaxSize = Runtime.getRuntime().maxMemory(); int presortMem = (int) Math.min(Integer.MAX_VALUE, Math.max(MIN_SORT_MEMORY, heapMaxSize / 20)); setMaker.pumpIgnoreDuplicates(); setMaker.pumpPresort(presortMem / LONG_MEMORY_BYTES); worker = new Thread() { @Override public void run() { setMaker.pumpSource(new LinkHashIterator()); set = setMaker.makeLongSet(); } }; worker.start(); }
public LocalLinkSet() { this.db = DBMaker .newTempFileDB() .mmapFileEnable() .transactionDisable() .asyncWriteEnable() .asyncWriteFlushDelay(100) .make(); this.setMaker = db.createTreeSet("linkHashes"); long heapMaxSize = Runtime.getRuntime().maxMemory(); int presortMem = (int) Math.min(Integer.MAX_VALUE, Math.max(MIN_SORT_MEMORY, heapMaxSize / 20)); setMaker.pumpIgnoreDuplicates(); setMaker.pumpPresort(presortMem / LONG_MEMORY_BYTES); worker = new Thread() { @Override public void run() { setMaker.pumpSource(new LinkHashIterator()); set = setMaker.makeLongSet(); } }; worker.start(); }
/** Create a GTFS feed in a temp file */ public GTFSFeed () { // calls to this must be first operation in constructor - why, Java? this(DBMaker.newTempFileDB() .transactionDisable() .mmapFileEnable() .asyncWriteEnable() .deleteFilesAfterClose() .compressionEnable() // .cacheSize(1024 * 1024) this bloats memory consumption .make()); // TODO db.close(); }
/** * Constructs Sorter with optional limit and optional distinct filtering * @param limit long limit, where Long.MAXLONG means no limit * @param distinct optional boolean switch to do not preserve multiple equal elements */ public Sorter(long limit, boolean distinct) { this.db = DBMaker.newTempFileDB().deleteFilesAfterClose().closeOnJvmShutdown().transactionDisable().make(); this.map = db.createTreeMap(MAP_NAME).make(); this.limit = limit; this.distinct = distinct; }
public MapDbCachingIndexProvider(LuceneBatchInserterIndexProvider luceneIndex) { this.luceneIndex = luceneIndex; db = DBMaker.newTempFileDB(). asyncFlushDelay(1000). cacheSize(1024 * 1024). closeOnJvmShutdown(). deleteFilesAfterClose(). syncOnCommitDisable(). writeAheadLogDisable(). make(); }
if (diskPath == null) { LOG.info("OSM will be stored in a temporary file."); dbMaker = DBMaker.newTempFileDB().deleteFilesAfterClose(); } else { if (diskPath.equals("__MEMORY__")) {