Package net.sf.ehcache.config
Class DiskStoreConfiguration
- java.lang.Object
-
- net.sf.ehcache.config.DiskStoreConfiguration
-
public final class DiskStoreConfiguration extends java.lang.ObjectA class to represent DiskStore configuration e.g.<diskStore path="${java.io.tmpdir}" />- Version:
- $Id$
- Author:
- Greg Luck
-
-
Constructor Summary
Constructors Constructor Description DiskStoreConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetDefaultPath()The diskStore default path, which is the system environment variable available on all Java virtual machinesjava.io.tmpdirjava.lang.StringgetOriginalPath()java.lang.StringgetPath()The diskStore pathDiskStoreConfigurationpath(java.lang.String path)Builder method to set the disk store path, seesetPath(String)voidsetPath(java.lang.String path)Translates and sets the path.
-
-
-
Method Detail
-
getPath
public final java.lang.String getPath()
The diskStore path
-
getDefaultPath
public static java.lang.String getDefaultPath()
The diskStore default path, which is the system environment variable available on all Java virtual machinesjava.io.tmpdir
-
path
public final DiskStoreConfiguration path(java.lang.String path)
Builder method to set the disk store path, seesetPath(String)- Returns:
- this configuration instance
-
setPath
public final void setPath(java.lang.String path)
Translates and sets the path.Two forms of path substitution are supported:
- To support legacy configurations, four explicit string tokens are replaced with their associated Java system property values.
This substitution happens for the first matching token only (e.g.
java.io.tmpdir/ehcache/java.io.tmpdir→/var/tmp/ehcache/java.io.tmpdir).user.home- the user's home directoryuser.dir- the current working directoryjava.io.tmpdir- the default temp file pathehcache.disk.store.dir- a system property you would normally specify on the command line, e.g.java -Dehcache.disk.store.dir=/u01/myapp/diskdir
- These, and all other system properties can also be substituted using the familiar syntax:
${property-name}. Using this syntax all token instances are replaced (e.g.${java.io.tmpdir}/ehcache/${java.io.tmpdir}→/var/tmp/ehcache/var/tmp).
- Parameters:
path- disk store path
- To support legacy configurations, four explicit string tokens are replaced with their associated Java system property values.
This substitution happens for the first matching token only (e.g.
-
getOriginalPath
public java.lang.String getOriginalPath()
- Returns:
- the originalPath
-
-