|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<QueryCache>
org.javalite.activejdbc.cache.QueryCache
public enum QueryCache
This is a main cache facade. It could be architected in the future to add more cache implementations besides OSCache.
| Enum Constant Summary | |
|---|---|
INSTANCE
|
|
| Method Summary | |
|---|---|
void |
addItem(String tableName,
String query,
Object[] params,
Object cache)
Adds an item to cache. |
CacheManager |
getCacheManager()
|
Object |
getItem(String tableName,
String query,
Object[] params)
Returns an item from cache, or null if nothing found. |
static QueryCache |
instance()
This class is a singleton, get an instance with this method. |
void |
purgeTableCache(String tableName)
This method purges (removes) all caches associated with a table, if caching is enabled and a corresponding model is marked cached. |
static QueryCache |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static QueryCache[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final QueryCache INSTANCE
| Method Detail |
|---|
public static QueryCache[] values()
for (QueryCache c : QueryCache.values()) System.out.println(c);
public static QueryCache valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic static QueryCache instance()
public void addItem(String tableName,
String query,
Object[] params,
Object cache)
tableName - - name of table.query - query textparams - - list of parameters for a query.cache - object to cache.
public Object getItem(String tableName,
String query,
Object[] params)
tableName - name of table.query - query text.params - list of query parameters, can be null if no parameters are provided.
public void purgeTableCache(String tableName)
tableName - table name whose caches are to be purged.public CacheManager getCacheManager()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||