|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.outerj.daisy.cache.impl.DocumentCacheImpl
Implementation of DocumentCache
that uses a LRUMap with a configurable
limit. JMX manageable.
Constructor Summary | |
DocumentCacheImpl()
|
Method Summary | |
void |
clear()
Clears the entire cache. |
void |
clearCache()
|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
|
org.outerj.daisy.repository.commonimpl.DocumentImpl |
get(long documentId,
long branchId,
long languageId)
Returns the cached Document, or null if it is not in the cache. |
int |
getAvailableVariantCacheCurrentSize()
|
int |
getAvailableVariantCacheMaxSize()
|
org.outerj.daisy.repository.AvailableVariants |
getAvailableVariants(long documentId)
|
int |
getDocumentCacheCurrentSize()
|
int |
getDocumentCacheMaxSize()
|
void |
initialize()
|
void |
put(long documentId,
org.outerj.daisy.repository.AvailableVariants availableVariants)
|
void |
put(long documentId,
long branchId,
long languageId,
org.outerj.daisy.repository.commonimpl.DocumentImpl document)
|
void |
remove(long documentId)
Removes all cached variants of the document. |
void |
remove(long documentId,
long branchId,
long languageId)
Removes a cached Document, or does nothing if it is not in the cache. |
void |
removeAvailableVariants(long documentId)
|
void |
service(org.apache.avalon.framework.service.ServiceManager serviceManager)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DocumentCacheImpl()
Method Detail |
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
org.apache.avalon.framework.configuration.ConfigurationException
public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException
service
in interface org.apache.avalon.framework.service.Serviceable
org.apache.avalon.framework.service.ServiceException
public void initialize() throws java.lang.Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
java.lang.Exception
public void clear()
DocumentCache
clear
in interface DocumentCache
public void put(long documentId, long branchId, long languageId, org.outerj.daisy.repository.commonimpl.DocumentImpl document)
put
in interface DocumentCache
public org.outerj.daisy.repository.commonimpl.DocumentImpl get(long documentId, long branchId, long languageId)
DocumentCache
get
in interface DocumentCache
public void remove(long documentId)
DocumentCache
remove
in interface DocumentCache
public void remove(long documentId, long branchId, long languageId)
DocumentCache
remove
in interface DocumentCache
public void put(long documentId, org.outerj.daisy.repository.AvailableVariants availableVariants)
put
in interface DocumentCache
public org.outerj.daisy.repository.AvailableVariants getAvailableVariants(long documentId)
getAvailableVariants
in interface DocumentCache
public void removeAvailableVariants(long documentId)
removeAvailableVariants
in interface DocumentCache
public int getDocumentCacheMaxSize()
getDocumentCacheMaxSize
in interface DocumentCacheImplMBean
public int getDocumentCacheCurrentSize()
getDocumentCacheCurrentSize
in interface DocumentCacheImplMBean
public int getAvailableVariantCacheMaxSize()
getAvailableVariantCacheMaxSize
in interface DocumentCacheImplMBean
public int getAvailableVariantCacheCurrentSize()
getAvailableVariantCacheCurrentSize
in interface DocumentCacheImplMBean
public void clearCache()
clearCache
in interface DocumentCacheImplMBean
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |