本文整理汇总了Java中org.neo4j.kernel.impl.util.FileUtils.deleteRecursively方法的典型用法代码示例。如果您正苦于以下问题:Java FileUtils.deleteRecursively方法的具体用法?Java FileUtils.deleteRecursively怎么用?Java FileUtils.deleteRecursively使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.neo4j.kernel.impl.util.FileUtils
的用法示例。
在下文中一共展示了FileUtils.deleteRecursively方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clearDb
import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
public void clearDb() {
long start = System.currentTimeMillis();
maxNG = 0;
try {
if (wroteToDB) {
FileUtils.deleteRecursively(new File(storeDir));
wroteToDB = false;
}
if (tempStorageMatrix != null) {
tempStorageMatrix.clearAll();
}
this.coveredRows.clear();
NGLimit = Double.MAX_VALUE;
timeSpentClearingDB.addAndGet(System.currentTimeMillis() - start);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
示例2: clearDb
import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
public void clearDb() {
long start = System.currentTimeMillis();
maxNG = 0;
try {
if(wroteToDB){
FileUtils.deleteRecursively(new File(storeDir));
wroteToDB = false;
}
if (tempStorageMatrix != null) {
tempStorageMatrix.clearAll();
}
this.coveredRows.clear();
NGLimit = Double.MAX_VALUE;
timeSpentClearingDB.addAndGet(System.currentTimeMillis() - start);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
示例3: ClearDatabase
import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
/**
* Clears all data in the DB and reconnects to it afterwards.
*/
public void ClearDatabase(){
// Shutdown database before erasing it
log.debug("Shutting down the database");
mGraphDb.shutdown();
try
{
log.debug("Erasing the database files");
FileUtils.deleteRecursively( new File( mDbPath ) );
}
catch ( IOException e )
{
throw new RuntimeException( e );
}
// Restart database
log.debug("Reconnecting to database");
mGraphDb = new GraphDatabaseFactory().
newEmbeddedDatabaseBuilder(mDbPath).
setConfig( GraphDatabaseSettings.node_keys_indexable, KEY_HASH ).
setConfig( GraphDatabaseSettings.node_auto_indexing, "true" ).
newGraphDatabase();
registerShutdownHook(mGraphDb);
}
示例4: clearDb
import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
public static void clearDb() {
try {
FileUtils.deleteRecursively(new File(dbURL));
} catch (IOException e) {
throw new RuntimeException(e);
}
}
示例5: createEmbeddedDB
import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
private void createEmbeddedDB() {
storeDir = RECORD_DB_DIR + "gds" + runningNum;
try {
FileUtils.deleteRecursively(new File(storeDir));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
runningNum++;
GDS = new EmbeddedGraphDatabase(storeDir);
registerShutdownHook(GDS);
}
示例6: clearRecordDb
import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
private static void clearRecordDb() {
try {
FileUtils.deleteRecursively(new File(RECORD_DB_PATH));
} catch (IOException e) {
throw new RuntimeException(e);
}
}
示例7: createEmbeddedDB
import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
private void createEmbeddedDB(){
storeDir = RECORD_DB_DIR + "gds" + runningNum;
try {
FileUtils.deleteRecursively(new File(storeDir));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
runningNum++;
GDS = new EmbeddedGraphDatabase(storeDir);
registerShutdownHook(GDS);
}
示例8: shutdown
import org.neo4j.kernel.impl.util.FileUtils; //导入方法依赖的package包/类
public static void shutdown() {
graphDB.shutdown();
try {
if(doShutdown) FileUtils.deleteRecursively(new File(dbPath));
} catch (IOException e) {
e.printStackTrace();
}
}