List of usage examples for org.apache.commons.vfs.cache WeakRefFilesCache WeakRefFilesCache
WeakRefFilesCache
From source file:org.pentaho.di.core.vfs.KettleVFS.java
private KettleVFS() { fsm = new StandardFileSystemManager(); try {//from www . jav a 2 s .c o m fsm.setFilesCache(new WeakRefFilesCache()); fsm.init(); } catch (FileSystemException e) { e.printStackTrace(); } // Install a shutdown hook to make sure that the file system manager is closed // This will clean up temporary files in vfs_cache Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { @Override public void run() { if (fsm != null) { fsm.close(); } } })); }