Constructor and Description |
---|
FileCache(String cachePath)
Creates new instance of
FileCache class. |
FileCache(String cachePath,
String cacheSubFolder)
Creates new instance of
FileCache class. |
Modifier and Type | Method and Description |
---|---|
<T> T |
get(String key)
Deserializes data associated with this key if present.
|
String |
getCachePath()
The Relative or absolute path to the cache folder.
|
String |
getCacheSubFolder()
The sub-folder to append to the
getCachePath() . |
List<String> |
getKeys(String filter)
Returns all file names that contains filter in filename.
|
void |
set(String key,
Object value)
Serializes data to the local disk.
|
public FileCache(String cachePath)
Creates new instance of FileCache
class.
cachePath
- Relative or absolute path where document cache will be stored.IllegalArgumentException
- Thrown when cachePath
is null.public FileCache(String cachePath, String cacheSubFolder)
Creates new instance of FileCache
class.
cachePath
- Relative or absolute path where document cache will be stored.cacheSubFolder
- The sub-folder to append to cachePath
.IllegalArgumentException
- Thrown when cachePath
is null.IllegalArgumentException
- Thrown when cacheSubFolder
is null.public final <T> T get(String key)
Deserializes data associated with this key if present.
public final String getCachePath()
public final String getCacheSubFolder()
getCachePath()
.getCachePath()
.public final List<String> getKeys(String filter)
Returns all file names that contains filter in filename.