public interface ContentCache
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.String contentUrl)
Check to see if the content - specified by URL - exists in the cache.
|
void |
deleteFile(java.lang.String url)
Deletes the cached content file for the specified URL.
|
java.io.File |
getCacheRoot()
Returns the location where cache files will be written (cacheRoot) - implementation
dependant and may be null.
|
org.alfresco.service.cmr.repository.ContentReader |
getReader(java.lang.String contentUrl)
Retrieve a ContentReader for the cached content specified by URL.
|
org.alfresco.service.cmr.repository.ContentWriter |
getWriter(java.lang.String url)
Retrieve a ContentWriter to write content to a cache file.
|
boolean |
put(java.lang.String contentUrl,
org.alfresco.service.cmr.repository.ContentReader reader)
Put an item into cache - this will populate both a disk file (with content) and
the in-memory lookup table (with the URL and cache file location).
|
void |
remove(java.lang.String contentUrl)
Remove a cached item from the in-memory lookup table.
|
java.io.File getCacheRoot()
boolean contains(java.lang.String contentUrl)
Note that just because the in-memory cache has a record of the content item having been placed into the cache, it does not mean that the disk item is guaranteed to be there. The temp file clean-up process, for example, may have removed it.
contentUrl
- org.alfresco.service.cmr.repository.ContentReader getReader(java.lang.String contentUrl)
contentUrl
- CacheMissException
- If the cache does not contain the specified content.boolean put(java.lang.String contentUrl, org.alfresco.service.cmr.repository.ContentReader reader)
contentUrl
- reader
- void remove(java.lang.String contentUrl)
ContentCache.deleteFile(String)
.contentUrl
- void deleteFile(java.lang.String url)
ContentCache.remove(String)
after calling this method.url
- org.alfresco.service.cmr.repository.ContentWriter getWriter(java.lang.String url)
context
- Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.