public class ObjectCache extends Object implements Serializable
| Constructor and Description |
|---|
ObjectCache(String filename)
Create a new cache.
|
ObjectCache(String filename,
boolean persist_always,
boolean persist_single)
Create a new cache.
|
ObjectCache(String filename,
boolean persist_always,
boolean persist_single,
int max)
Create a new cache.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(CachedObject co)
Add a cached object.
|
void |
clear()
Clear the cache.
|
CachedObject |
loadCachedObject(String filename,
long lastmodified)
Load the cached file.
|
static ObjectCache |
loadObjectCache(String filename)
Load the model cache.
|
void |
persist()
Presist the cached object.
|
void |
remove(String filename)
Add a cached object.
|
public ObjectCache(String filename)
public ObjectCache(String filename, boolean persist_always, boolean persist_single)
public ObjectCache(String filename, boolean persist_always, boolean persist_single, int max)
public CachedObject loadCachedObject(String filename, long lastmodified)
filename - The filename of the cached object.lastmodified - The last modified date important for the up-to-date check.
-1 for do not check.public void add(CachedObject co)
co - The new object.public void remove(String filename)
filename - The filename.public void persist()
throws IOException
IOExceptionpublic void clear()
public static ObjectCache loadObjectCache(String filename)
filename - The filename.Copyright © 2012. All Rights Reserved.