org.apache.portals.applications.transform
Interface TransformCache

All Superinterfaces:
Comparator, Observer
All Known Implementing Classes:
MemoryTransformCache

public interface TransformCache
extends Observer, Comparator

TransformCache

Version:
$Id: TransformCache.java 187949 2004-11-15 06:06:42Z taylor $
Author:
David Sean Taylor

Method Summary
 void clearCache()
          Clear the Transform Cache
 String constructKey(String url, String stylesheet)
          Construct the key for the TransformDocumentTreeMap cache
 TransformCacheEntry get(String key)
          Retrieve the unique TransformCacheEntry keyed off with key
 Object getDocument(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(String key, Object document, long timeToLive)
          Put a value in the TransformCache keyed off with the TransformId and the DocumentId.
 Object remove(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

public int getMaxSize()
Get the maximum size of the cache

Returns:
the current maximum size of the cache

setMaxSize

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

Parameters:
maxSize - the maximum size of the cache

getEvictionPercentage

public int getEvictionPercentage()
Get the eviction percentage of the cache

Returns:
the eviction percentage of the cache

isEnabled

public boolean isEnabled()
Find out if TransformCache is enables

Returns:
the enable flag of the cache

put

public void put(String key,
                Object document,
                long timeToLive)
Put a value in the TransformCache keyed off with the TransformId and the DocumentId.

Parameters:
key -
document -

remove

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

Parameters:
key -
Returns:
Object

get

public TransformCacheEntry get(String key)
Retrieve the unique TransformCacheEntry keyed off with key

Parameters:
key -
Returns:
TransformCacheEntry

getDocument

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

Returns:
Object

constructKey

public String constructKey(String url,
                           String stylesheet)
Construct the key for the TransformDocumentTreeMap cache

Returns:
String

clearCache

public void clearCache()
Clear the Transform Cache



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