|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.portals.applications.transform.impl.MemoryTransformCache
public class MemoryTransformCache
TransformCacheComponent
Constructor Summary | |
---|---|
MemoryTransformCache(Transform transform,
int maxSize,
int evictionPercentage,
boolean enable,
boolean debug)
Spring constructor injection |
Method Summary | |
---|---|
void |
clearCache()
Clear the Transform Cache |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
|
java.lang.String |
constructKey(java.lang.String url,
java.lang.String stylesheet)
Construct the key for the TransformDocumentTreeMap cache |
protected void |
evict()
The eviction policy will keep n items in the cache, and then start evicting x items ordered-by least used first. |
TransformCacheEntry |
get(java.lang.String key)
Retrieve the unique TransformCacheEntry keyed off with key |
java.lang.Object |
getDocument(java.lang.String key)
Retrieve the byte[] storing the transformed content for the transfomId and the documentId combination. |
int |
getEvictionPercentage()
Get the eviction percentage of the cache |
int |
getMaxSize()
Get the maximum size of the cache |
boolean |
isEnabled()
Find out if TransformCache is enables |
void |
put(java.lang.String key,
java.lang.Object document,
long timeToLive)
Put a value in the TransformCache keyed off with the TransformId and the DocumentId. |
java.lang.Object |
remove(java.lang.String key)
Remove a unique value keyed off with the TransformId and DocumentId from the cache. |
void |
setMaxSize(int maxSize)
Set the new maximum size of the cache |
void |
update(java.util.Observable o,
java.lang.Object arg)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public MemoryTransformCache(Transform transform, int maxSize, int evictionPercentage, boolean enable, boolean debug)
Method Detail |
---|
public int getMaxSize()
TransformCache
getMaxSize
in interface TransformCache
public void setMaxSize(int maxSize)
TransformCache
setMaxSize
in interface TransformCache
maxSize
- the maximum size of the cachepublic int getEvictionPercentage()
TransformCache
getEvictionPercentage
in interface TransformCache
public boolean isEnabled()
TransformCache
isEnabled
in interface TransformCache
public void put(java.lang.String key, java.lang.Object document, long timeToLive)
TransformCache
put
in interface TransformCache
protected void evict()
public java.lang.Object remove(java.lang.String key)
TransformCache
remove
in interface TransformCache
public TransformCacheEntry get(java.lang.String key)
TransformCache
get
in interface TransformCache
public java.lang.Object getDocument(java.lang.String key)
TransformCache
getDocument
in interface TransformCache
public int compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
public java.lang.String constructKey(java.lang.String url, java.lang.String stylesheet)
TransformCache
constructKey
in interface TransformCache
public void clearCache()
TransformCache
clearCache
in interface TransformCache
public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |