org.apache.portals.applications.transform
Interface TransformCache

All Superinterfaces:
java.util.Comparator, java.util.Observer
All Known Implementing Classes:
MemoryTransformCache

public interface TransformCache
extends java.util.Observer, java.util.Comparator

TransformCache

Version:
$Id: TransformCache.java 516448 2007-03-09 16:25:47Z ate $
Author:
David Sean Taylor

Method Summary
 void clearCache()
          Clear the Transform Cache
 java.lang.String constructKey(java.lang.String url, java.lang.String stylesheet)
          Construct the key for the TransformDocumentTreeMap cache
 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
 
Methods inherited from interface java.util.Observer
update
 
Methods inherited from interface java.util.Comparator
compare, equals
 

Method Detail

getMaxSize

int getMaxSize()
Get the maximum size of the cache

Returns:
the current maximum size of the cache

setMaxSize

void setMaxSize(int maxSize)
Set the new maximum size of the cache

Parameters:
maxSize - the maximum size of the cache

getEvictionPercentage

int getEvictionPercentage()
Get the eviction percentage of the cache

Returns:
the eviction percentage of the cache

isEnabled

boolean isEnabled()
Find out if TransformCache is enables

Returns:
the enable flag of the cache

put

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.

Parameters:
key -
document -

remove

java.lang.Object remove(java.lang.String key)
Remove a unique value keyed off with the TransformId and DocumentId from the cache.

Parameters:
key -
Returns:
Object

get

TransformCacheEntry get(java.lang.String key)
Retrieve the unique TransformCacheEntry keyed off with key

Parameters:
key -
Returns:
TransformCacheEntry

getDocument

java.lang.Object getDocument(java.lang.String key)
Retrieve the byte[] storing the transformed content for the transfomId and the documentId combination.

Parameters:
transformId -
documentId -
Returns:
Object

constructKey

java.lang.String constructKey(java.lang.String url,
                              java.lang.String stylesheet)
Construct the key for the TransformDocumentTreeMap cache

Returns:
String

clearCache

void clearCache()
Clear the Transform Cache



Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.