| java.lang.Object org.sakaiproject.site.impl.SiteCacheImpl
SiteCacheImpl | public class SiteCacheImpl implements DerivedCache(Code) | |
SiteCacheImpl is a cache tuned for Site (and page / tool) access.
|
Field Summary | |
protected Cache | m_cache The base cache. | protected Map | m_groups Map of a group id to a cached site's Group instance. | protected Map | m_pages Map of a page id to a cached site's SitePage instance. | protected Map | m_tools Map of a tool id to a cached site's tool configuration instance. |
m_groups | protected Map m_groups(Code) | | Map of a group id to a cached site's Group instance.
|
m_pages | protected Map m_pages(Code) | | Map of a page id to a cached site's SitePage instance.
|
m_tools | protected Map m_tools(Code) | | Map of a tool id to a cached site's tool configuration instance.
|
SiteCacheImpl | public SiteCacheImpl(MemoryService memoryService, long sleep, String pattern)(Code) | | Construct the Cache. No automatic refresh: expire only, from time and events.
Parameters: sleep - The number of seconds to sleep between expiration checks. Parameters: pattern - The "startsWith()" string for all resources that may be in this cache - if null, don't watch events for updates. |
clear | public void clear()(Code) | | Clear all entries.
|
containsKey | public boolean containsKey(Object key)(Code) | | Test for a non expired entry in the cache.
Parameters: key - The cache key. true if the key maps to a non-expired cache entry, false if not. |
get | public Object get(Object key)(Code) | | Get the non expired entry, or null if not there (or expired)
Parameters: key - The cache key. The payload, or null if the payload is null, the key is not found, or the entry has expired (Note: use containsKey() to remove this ambiguity). |
getGroup | public Group getGroup(String groupId)(Code) | | Access the group that is part of a cached site, by group Id.
Parameters: id - The group id. The Group that has this id, from a cached site. |
getPage | public SitePage getPage(String pageId)(Code) | | Access the page that is part of a cached site, by page Id.
Parameters: pageId - The page's id. The SitePage that has this id, from a cached site. |
getTool | public ToolConfiguration getTool(String toolId)(Code) | | Access the tool that is part of a cached site, by tool Id.
Parameters: toolId - The tool's id. The ToolConfiguration that has this id, from a cached site. |
notifyCacheClear | public void notifyCacheClear()(Code) | | |
put | public void put(Object key, Object payload, int duration)(Code) | | Cache an object
Parameters: key - The key with which to find the object. Parameters: payload - The object to cache. Parameters: duration - The time to cache the object (seconds). |
remove | public void remove(Object key)(Code) | | Remove this entry from the cache.
Parameters: key - The cache key. |
|
|