Example usage for org.apache.commons.vfs CacheStrategy ON_CALL

List of usage examples for org.apache.commons.vfs CacheStrategy ON_CALL

Introduction

In this page you can find the example usage for org.apache.commons.vfs CacheStrategy ON_CALL.

Prototype

CacheStrategy ON_CALL

To view the source code for org.apache.commons.vfs CacheStrategy ON_CALL.

Click Source Link

Document

Refresh the data every time you call a method on the fileObject.

Usage

From source file:org.jboss.dashboard.filesystem.VfsWrapper.java

public static StandardFileSystemManager getManager() {
    if (instance == null) {
        instance = new StandardFileSystemManager();
        try {/*  w  ww . ja v a 2 s  .c o m*/
            instance.setCacheStrategy(CacheStrategy.ON_CALL);
            instance.init();
        } catch (Exception e) {
            log.error("Error: ", e);
        }
    }
    return instance;
}