rabbit.cache.utils
Class CacheUtils
java.lang.Object
rabbit.cache.utils.CacheUtils
public class CacheUtils
- extends Object
Helper methods for file based caches.
- Author:
- Robert Olofsson
Field Summary |
static int |
FILES_PER_DIR
The maximum number of files per directory |
static String |
TEMPDIR
The name of the temporary cache files directory |
Method Summary |
static File |
getEntryName(File baseDir,
long id,
boolean real,
String extension)
Get the file name for a cache entry. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILES_PER_DIR
public static final int FILES_PER_DIR
- The maximum number of files per directory
- See Also:
- Constant Field Values
TEMPDIR
public static final String TEMPDIR
- The name of the temporary cache files directory
- See Also:
- Constant Field Values
CacheUtils
public CacheUtils()
getEntryName
public static File getEntryName(File baseDir,
long id,
boolean real,
String extension)
- Get the file name for a cache entry.
- Parameters:
baseDir
- the base directory for the cacheid
- the id of the cache entryreal
- false if this is a temporary cache file,
true if it is a realized entry.extension
- the file extension to use
- Returns:
- the file to use for the cached object