Class DiskStoreConfiguration


  • public final class DiskStoreConfiguration
    extends java.lang.Object
    A class to represent DiskStore configuration e.g. <diskStore path="${java.io.tmpdir}" />
    Version:
    $Id$
    Author:
    Greg Luck
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getDefaultPath()
      The diskStore default path, which is the system environment variable available on all Java virtual machines java.io.tmpdir
      java.lang.String getOriginalPath()  
      java.lang.String getPath()
      The diskStore path
      DiskStoreConfiguration path​(java.lang.String path)
      Builder method to set the disk store path, see setPath(String)
      void setPath​(java.lang.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 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 machines java.io.tmpdir
      • setPath

        public final void setPath​(java.lang.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 java.lang.String getOriginalPath()
        Returns:
        the originalPath