Examples of SoftRefFilesCache


Examples of org.apache.commons.vfs.cache.SoftRefFilesCache

    public void init() throws FileSystemException
    {
        if (filesCache == null)
        {
            // filesCache = new DefaultFilesCache();
            filesCache = new SoftRefFilesCache();
        }
        if (fileContentInfoFactory == null)
        {
            fileContentInfoFactory = new FileContentInfoFilenameFactory();
        }
View Full Code Here

Examples of org.apache.commons.vfs.cache.SoftRefFilesCache

    public FilesCache getFilesCache()
    {
        if (cache == null)
        {
            // cache = new DefaultFilesCache();
            cache = new SoftRefFilesCache();
        }

        return cache;
    }
View Full Code Here

Examples of org.apache.commons.vfs.cache.SoftRefFilesCache

  public void init() throws FileSystemException
  {
    if (filesCache == null)
    {
      // filesCache = new DefaultFilesCache();
      filesCache = new SoftRefFilesCache();
    }
    if (fileContentInfoFactory == null)
    {
      fileContentInfoFactory = new FileContentInfoFilenameFactory();
    }
View Full Code Here

Examples of org.apache.commons.vfs.cache.SoftRefFilesCache

    public FilesCache getFilesCache()
    {
        if (cache == null)
        {
            // cache = new DefaultFilesCache();
            cache = new SoftRefFilesCache();
        }

        return cache;
    }
View Full Code Here

Examples of org.apache.commons.vfs2.cache.SoftRefFilesCache

    public FilesCache getFilesCache()
    {
        if (cache == null)
        {
            // cache = new DefaultFilesCache();
            cache = new SoftRefFilesCache();
        }

        return cache;
    }
View Full Code Here

Examples of org.apache.commons.vfs2.cache.SoftRefFilesCache

  @Override
public void setUp() throws Exception {
    manager = new DefaultFileSystemManager();

    manager.setFilesCache(new SoftRefFilesCache());
    manager.setCacheStrategy(CacheStrategy.ON_RESOLVE);

    manager.addProvider("file", new DefaultLocalFileProvider());
    manager.addProvider("tgz", new TarFileProvider());
    manager.addProvider("tar", new TarFileProvider());
View Full Code Here

Examples of org.apache.commons.vfs2.cache.SoftRefFilesCache

      vfs.addExtensionMap("bz2", "bz2");
      vfs.addMimeTypeMap("application/x-tar", "tar");
      vfs.addMimeTypeMap("application/x-gzip", "gz");
      vfs.addMimeTypeMap("application/zip", "zip");
      vfs.setFileContentInfoFactory(new FileContentInfoFilenameFactory());
      vfs.setFilesCache(new SoftRefFilesCache());
      vfs.setReplicator(new DefaultFileReplicator(new File(System.getProperty("java.io.tmpdir"), "accumulo-vfs-cache-"
          + System.getProperty("user.name", "nouser"))));
      vfs.setCacheStrategy(CacheStrategy.ON_RESOLVE);
      vfs.init();
    } catch (FileSystemException e) {
View Full Code Here

Examples of org.apache.commons.vfs2.cache.SoftRefFilesCache

    vfs.addExtensionMap("bz2", "bz2");
    vfs.addMimeTypeMap("application/x-tar", "tar");
    vfs.addMimeTypeMap("application/x-gzip", "gz");
    vfs.addMimeTypeMap("application/zip", "zip");
    vfs.setFileContentInfoFactory(new FileContentInfoFilenameFactory());
    vfs.setFilesCache(new SoftRefFilesCache());
    String cacheDirPath = AccumuloClassLoader.getAccumuloString(VFS_CACHE_DIR, "");
    String procName = ManagementFactory.getRuntimeMXBean().getName();
    File cacheDir = new File(System.getProperty("java.io.tmpdir"), "accumulo-vfs-cache-" + procName + "-" + System.getProperty("user.name", "nouser"));
    if (!cacheDirPath.isEmpty())
      cacheDir = new File(cacheDirPath);
View Full Code Here

Examples of org.apache.commons.vfs2.cache.SoftRefFilesCache

    public void init() throws FileSystemException
    {
        if (filesCache == null)
        {
            // filesCache = new DefaultFilesCache();
            filesCache = new SoftRefFilesCache();
        }
        if (fileContentInfoFactory == null)
        {
            fileContentInfoFactory = new FileContentInfoFilenameFactory();
        }
View Full Code Here

Examples of org.apache.commons.vfs2.cache.SoftRefFilesCache

    vfs.addExtensionMap("bz2", "bz2");
    vfs.addMimeTypeMap("application/x-tar", "tar");
    vfs.addMimeTypeMap("application/x-gzip", "gz");
    vfs.addMimeTypeMap("application/zip", "zip");
    vfs.setFileContentInfoFactory(new FileContentInfoFilenameFactory());
    vfs.setFilesCache(new SoftRefFilesCache());
    String cacheDirPath = AccumuloClassLoader.getAccumuloString(VFS_CACHE_DIR, "");
    File cacheDir = new File(System.getProperty("java.io.tmpdir"), "accumulo-vfs-cache-" + System.getProperty("user.name", "nouser"));
    if (!("".equals(cacheDirPath)))
      cacheDir = new File(cacheDirPath);
    vfs.setReplicator(new UniqueFileReplicator(cacheDir));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.