|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.bowstreet.builders.webapp.methods.VariableCache
public abstract class VariableCache
Base class for variable cache implementations. A VariableCache manages a cache of instance values for a particular model/variable (across all profiles). A new VariableCache implementation can be used by setting the property bowstreet.variableCache.implementationClass to the name of a class that extends VariableCache.
| Constructor Summary | |
|---|---|
VariableCache()
|
|
| Method Summary | |
|---|---|
abstract void |
clear()
|
abstract java.lang.Object |
get(WebAppAccess webAppAccess,
java.lang.String variableName)
Get object from cache. |
java.lang.String |
getCacheName()
Get the name of the variable this cache is for. |
int |
getHits()
Get the current number of hits to this cache. |
int |
getMaximumSize()
Get the maximum size for this cache. |
int |
getMisses()
Get the current number of misses to this cache. |
abstract int |
getNumCacheEntries()
Get the current number of entries in this cache. |
void |
incrementCounters(boolean bHit)
Increment hit counts - pass true for hit, false for miss |
void |
initialize(WebApp webApp,
java.lang.String cacheName,
int size)
Initialize this VariableCache instance. |
java.lang.String |
makeInstanceKey(WebAppAccess webAppAccess,
java.lang.String variableName)
Method to generate a key for a WebApp instance. |
abstract void |
put(WebAppAccess webAppAccess,
java.lang.String variableName,
java.lang.Object value)
Store an object in cache. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VariableCache()
| Method Detail |
|---|
public abstract void clear()
public abstract java.lang.Object get(WebAppAccess webAppAccess,
java.lang.String variableName)
webAppAccess - The WebApp session instance.variableName - The name of the variable
public java.lang.String getCacheName()
public int getHits()
public int getMaximumSize()
public int getMisses()
public abstract int getNumCacheEntries()
public void incrementCounters(boolean bHit)
bHit - True if this was a hit; false if a miss.
public void initialize(WebApp webApp,
java.lang.String cacheName,
int size)
webApp - The WebApp associated with this variable.cacheName - The name of the cache.size - The maximum size of the cache.
public java.lang.String makeInstanceKey(WebAppAccess webAppAccess,
java.lang.String variableName)
webAppAccess - The WebApp instance.
public abstract void put(WebAppAccess webAppAccess,
java.lang.String variableName,
java.lang.Object value)
webAppAccess - The WebApp session instance.variableName - Name of the variable we are caching.value - The value to store in cache.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||