public class ParamsCache extends Object
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
qidPattern |
| Constructor and Description |
|---|
ParamsCache() |
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteOldParamFiles()
delete save params cache objects that are older than MAX_FILE_AGE.
|
static ParamsCacheObject |
get(long key)
Retrive search parameter object
|
static long |
getLargestCacheableSize() |
static long |
getMaxCacheSize() |
static long |
getMaxFileAge() |
static long |
getMinCacheSize() |
static ParamsCacheObject |
getParamCacheObjectFromQuery(String query)
Retrieves the ParamsCacheObject based on the supplied query string.
|
static String |
getTempFilePath() |
static long |
put(String q,
String displayQ,
String wkt,
double[] bbox,
String[] fqs)
Store search params and return key.
|
static void |
setLargestCacheableSize(long sizeInBytes) |
static void |
setMaxCacheSize(long sizeInBytes) |
static void |
setMaxFileAge(long ageInMs) |
static void |
setMinCacheSize(long sizeInBytes) |
static void |
setTempFilePath(String path) |
public static Pattern qidPattern
public static long put(String q, String displayQ, String wkt, double[] bbox, String[] fqs) throws ParamsCacheSizeException
q - Search parameter q to store.displayQ - Search display q to store.ParamsCacheSizeExceptionpublic static ParamsCacheObject get(long key) throws ParamsCacheMissingException
key - id returned by put as long.ParamsCacheMissingExceptionpublic static ParamsCacheObject getParamCacheObjectFromQuery(String query) throws ParamsCacheMissingException
query - ExceptionParamsCacheMissingExceptionpublic static void deleteOldParamFiles()
public static void setMaxCacheSize(long sizeInBytes)
public static long getMaxCacheSize()
public static void setMinCacheSize(long sizeInBytes)
public static long getMinCacheSize()
public static void setLargestCacheableSize(long sizeInBytes)
public static long getLargestCacheableSize()
public static void setTempFilePath(String path)
public static String getTempFilePath()
public static void setMaxFileAge(long ageInMs)
public static long getMaxFileAge()
Copyright © 2014. All rights reserved.