public interface ContentCache
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String contentUrl)
Check to see if the content - specified by URL - exists in the cache.
|
void |
deleteFile(String url)
Deletes the cached content file for the specified URL.
|
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(String contentUrl)
Retrieve a ContentReader for the cached content specified by URL.
|
org.alfresco.service.cmr.repository.ContentWriter |
getWriter(String url)
Retrieve a ContentWriter to write content to a cache file.
|
boolean |
put(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(String contentUrl)
Remove a cached item from the in-memory lookup table.
|
File getCacheRoot()
boolean contains(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
- Stringorg.alfresco.service.cmr.repository.ContentReader getReader(String contentUrl)
contentUrl
- StringCacheMissException
- If the cache does not contain the specified content.boolean put(String contentUrl, org.alfresco.service.cmr.repository.ContentReader reader)
contentUrl
- Stringreader
- ContentReadervoid remove(String contentUrl)
deleteFile(String)
.contentUrl
- Stringvoid deleteFile(String url)
remove(String)
after calling this method.url
- Stringorg.alfresco.service.cmr.repository.ContentWriter getWriter(String url)
url
- urlCopyright © 2005–2017 Alfresco Software. All rights reserved.