ehcache

net.sf.ehcache.config
Class DiskStoreConfiguration

java.lang.Object
  extended by net.sf.ehcache.config.DiskStoreConfiguration

public final class DiskStoreConfiguration
extends Object

A class to represent DiskStore configuration e.g.

Version:
$Id: DiskStoreConfiguration.java 5594 2012-05-07 16:04:31Z cdennis $
Author:
Greg Luck

Constructor Summary
DiskStoreConfiguration()
           
 
Method Summary
static String getDefaultPath()
          The diskStore default path, which is the system environment variable available on all Java virtual machines java.io.tmpdir
 String getOriginalPath()
           
 String getPath()
          The diskStore path
 DiskStoreConfiguration path(String path)
          Builder method to set the disk store path, see setPath(String)
 void setPath(String path)
          Translates and sets the path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiskStoreConfiguration

public DiskStoreConfiguration()
Method Detail

getPath

public final String getPath()
The diskStore path


getDefaultPath

public static String getDefaultPath()
The diskStore default path, which is the system environment variable available on all Java virtual machines java.io.tmpdir


path

public final DiskStoreConfiguration path(String path)
Builder method to set the disk store path, see setPath(String)

Returns:
this configuration instance

setPath

public final void setPath(String path)
Translates and sets the path.

Two forms of path substitution are supported:

  1. 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 directory
    • user.dir - the current working directory
    • java.io.tmpdir - the default temp file path
    • ehcache.disk.store.dir - a system property you would normally specify on the command line, e.g. java -Dehcache.disk.store.dir=/u01/myapp/diskdir
  2. 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

getOriginalPath

public String getOriginalPath()
Returns:
the originalPath

ehcache

Copyright 2001-2015, Terracotta, Inc.