org.apache.jetspeed.cache.impl
Class JetspeedCacheKeyGenerator

java.lang.Object
  extended by org.apache.jetspeed.cache.impl.JetspeedCacheKeyGenerator
All Implemented Interfaces:
ContentCacheKeyGenerator

public class JetspeedCacheKeyGenerator
extends java.lang.Object
implements ContentCacheKeyGenerator

Wrapper around actual cache implementation

Version:
$Id: $
Author:
David Sean Taylor

Constructor Summary
JetspeedCacheKeyGenerator(java.util.List segments)
           
 
Method Summary
 ContentCacheKey createCacheKey(RequestContext context, java.lang.String windowId)
          Normalized and pluggable cache key generator
 ContentCacheKey createSessionCacheKey(java.lang.String sessionId, java.lang.String pipeline, java.lang.String windowId)
          Create a cache key without request context information, but by providing required parameters sessinid and windowid
 ContentCacheKey createUserCacheKey(java.lang.String username, java.lang.String pipeline, java.lang.String windowId)
          Create a cache key without request context information, but by providing required parameters username and windowid
 boolean isCacheBySessionId()
          return true if caching is by session id, not username
 boolean isCacheByUsername()
          return true if caching is by username, not sessionid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JetspeedCacheKeyGenerator

public JetspeedCacheKeyGenerator(java.util.List segments)
Method Detail

createCacheKey

public ContentCacheKey createCacheKey(RequestContext context,
                                      java.lang.String windowId)
Description copied from interface: ContentCacheKeyGenerator
Normalized and pluggable cache key generator

Specified by:
createCacheKey in interface ContentCacheKeyGenerator
windowId - The window id of the portlet to be cached.
Returns:

createUserCacheKey

public ContentCacheKey createUserCacheKey(java.lang.String username,
                                          java.lang.String pipeline,
                                          java.lang.String windowId)
Description copied from interface: ContentCacheKeyGenerator
Create a cache key without request context information, but by providing required parameters username and windowid

Specified by:
createUserCacheKey in interface ContentCacheKeyGenerator
pipeline - "desktop" or "portal"
Returns:

createSessionCacheKey

public ContentCacheKey createSessionCacheKey(java.lang.String sessionId,
                                             java.lang.String pipeline,
                                             java.lang.String windowId)
Description copied from interface: ContentCacheKeyGenerator
Create a cache key without request context information, but by providing required parameters sessinid and windowid

Specified by:
createSessionCacheKey in interface ContentCacheKeyGenerator
pipeline - "desktop" or "portal"
Returns:

isCacheBySessionId

public boolean isCacheBySessionId()
Description copied from interface: ContentCacheKeyGenerator
return true if caching is by session id, not username

Specified by:
isCacheBySessionId in interface ContentCacheKeyGenerator
Returns:

isCacheByUsername

public boolean isCacheByUsername()
Description copied from interface: ContentCacheKeyGenerator
return true if caching is by username, not sessionid

Specified by:
isCacheByUsername in interface ContentCacheKeyGenerator
Returns:


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