List of usage examples for org.apache.commons.vfs CacheStrategy MANUAL
CacheStrategy MANUAL
To view the source code for org.apache.commons.vfs CacheStrategy MANUAL.
Click Source Link
From source file:net.sf.vfsjfilechooser.utils.VFSUtils.java
/** * Returns the global filesystem manager * @return the global filesystem manager *///from w w w . jav a 2 s .c om public static FileSystemManager getFileSystemManager() { aLock.readLock().lock(); try { if (fileSystemManager == null) { try { StandardFileSystemManager fm = new StandardFileSystemManager(); fm.setCacheStrategy(CacheStrategy.MANUAL); fm.init(); fileSystemManager = fm; } catch (Exception exc) { throw new RuntimeException(exc); } } return fileSystemManager; } finally { aLock.readLock().unlock(); } }
From source file:org.docx4j.extras.vfs.VFSUtils.java
public static FileSystemManager getFileSystemManager() { aLock.readLock().lock();//w w w. j av a 2 s . c o m try { if (fileSystemManager == null) { try { StandardFileSystemManager fm = new StandardFileSystemManager(); fm.setCacheStrategy(CacheStrategy.MANUAL); fm.init(); fileSystemManager = fm; } catch (Exception exc) { throw new RuntimeException(exc); } } return fileSystemManager; } finally { aLock.readLock().unlock(); } }