|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPageCacheManager
Provides page cache operations.
lumis.portal.page.cache
Nested Class Summary | |
---|---|
static class |
IPageCacheManager.GenerationOutcome
Indicates the outcome of a page generation. |
Field Summary | |
---|---|
static int |
CLEAR_CACHE_CHANGE_TYPE_DELETE
|
static int |
CLEAR_CACHE_CHANGE_TYPE_UPDATE
|
static int |
PAGE_CACHE_GEN_STATE_DISABLED
|
static int |
PAGE_CACHE_GEN_STATE_ENABLED
|
Method Summary | |
---|---|
String |
add(SessionConfig sessionConfig,
PageCacheConfig pageCacheConfig,
ITransaction transaction)
Adds a Page Cache Config object. |
void |
addOrUpdate(SessionConfig sessionConfig,
PageCacheConfig pageCacheConfig,
ITransaction transaction)
If the Page Cache Config exists, it is updated, else it is added. |
void |
clearAllHTMLCache(ITransaction transaction)
Clears all page HTML cache. |
void |
clearCacheByChannelIds(SessionConfig sessionConfig,
Collection<String> channelIds,
Parameters parameters,
int changeType,
boolean clearImmediately,
ITransaction transaction)
Clear the cache of the pages within the specified channels recursively. |
void |
clearCacheByPagesIds(SessionConfig sessionConfig,
Collection<String> pagesIds,
Parameters parameters,
int changeType,
boolean clearImmediately,
ITransaction transaction)
Deprecated. Since 4.1.0 replaced by #clearCacheByPagesIds(SessionConfig,Collection . |
void |
clearCacheByPagesIds(SessionConfig sessionConfig,
Collection<String> pagesIds,
Parameters parameters,
int changeType,
ITransaction transaction)
Deprecated. Since 4.0.11 replaced by #clearCacheByPagesIds(SessionConfig,Collection . |
void |
clearCacheByPagesIds(SessionConfig sessionConfig,
Collection<String> pagesIds,
Parameters parameters,
Locale locale,
int changeType,
boolean clearImmediately,
ITransaction transaction)
Clear the cache of the specified pages. |
void |
clearCacheByServiceInterfaceInstances(SessionConfig sessionConfig,
Collection<ServiceInterfaceInstanceConfig> serviceInterfaceInstances,
Parameters parameters,
int changeType,
ITransaction transaction)
Deprecated. Since 4.1.0 removed without replacement. Consider using clearCacheByPagesIds(SessionConfig, Collection, Parameters, Locale, int, boolean, ITransaction)
instead. |
void |
clearCacheByServiceInterfaceInstancesIds(SessionConfig sessionConfig,
Collection<String> serviceInterfaceInstanceIds,
Parameters parameters,
int changeType,
ITransaction transaction)
Deprecated. Since 4.0.11 removed without replacement. Consider using clearCacheByPagesIds(SessionConfig, Collection, Parameters, Locale, int, boolean, ITransaction)
instead. |
String |
convertMainUrl(SessionConfig sessionConfig,
String mainUrl,
ITransaction transaction)
Converts a url to main.jsp to a url to the cached page html url. |
void |
delete(SessionConfig sessionConfig,
String pageCacheId,
ITransaction transaction)
Delete a page cache. |
PageCacheConfig |
generateNextPage(boolean forImmediateUseOnly)
Generates next outdated page cache, according to its priority. |
PageCacheConfig |
generatePage(String pageCacheId)
Generates a page cache. |
PageCacheConfig |
get(SessionConfig sessionConfig,
String pageCacheId,
ITransaction transaction)
Returns a page cache config given its id. |
PageCacheConfig |
getByCachedPageProperties(SessionConfig sessionConfig,
PageCacheConfig cachedPageProperties,
ITransaction transaction)
Given the url and language, this method returns the appropriate page cache config. |
String |
getCachedPageId(SessionConfig sessionConfig,
PageCacheConfig pageCacheConfig)
Get the Id of the Page's cache. |
int |
getPageCacheGenerationState(SessionConfig sessionConfig,
ITransaction transaction)
Returns whether page cache generation is enabled or not |
String |
getPageCacheRelativePath(PageConfig pageConfig,
String cachedPageId)
Returns the path, relative to the web application root, where a page cached HTML is stored. |
String |
getPageCacheRelativePath(String pageCacheId,
ITransaction transaction)
Returns the path, relative to the web application root, where a page cached HTML is stored. |
String |
getPageUrl(PageCacheConfig pageCacheConfig,
ITransaction transaction)
Get the Page's URL. |
void |
pageCacheMissed(String pageCacheId,
boolean forImmediateUse)
Indicates a miss in the page cache occurred. |
String |
parseHTMLContent(SessionConfig sessionConfig,
String htmlContent,
String cachedPageId,
int cacheType,
ITransaction transaction)
Processes the HTML content correcting relative paths. |
String |
processHtmlReferencesToCachedPages(SessionConfig sessionConfig,
String html,
ITransaction transaction)
Finds in the given html dynamic references to cached pages, adding PageCacheConfig when a proper one does not already exist. |
void |
setPageCacheGenerationState(SessionConfig sessionConfig,
int state,
ITransaction transaction)
Sets the page cache generation state |
void |
update(SessionConfig sessionConfig,
PageCacheConfig pageCacheConfig,
ITransaction transaction)
Updates a Page Cache Config Object. |
void |
updateCachedFilesLastModifiedDate(SessionConfig sessionConfig,
PageConfig pageConfig,
Locale locale,
Date lastModifiedDate,
ITransaction transaction)
Updates the last modified date of the cached files that match the given pageId and locale. |
String |
waitForGeneration(String pageCacheId,
long timeout)
Waits for the generation of a page cache. |
void |
waitForPagesReadyToGenerate(long timeout,
boolean forImmediateUseOnly)
Waits for new pages to be ready to be generated. |
Field Detail |
---|
static final int PAGE_CACHE_GEN_STATE_ENABLED
static final int PAGE_CACHE_GEN_STATE_DISABLED
static final int CLEAR_CACHE_CHANGE_TYPE_UPDATE
static final int CLEAR_CACHE_CHANGE_TYPE_DELETE
Method Detail |
---|
PageCacheConfig get(SessionConfig sessionConfig, String pageCacheId, ITransaction transaction) throws ManagerException, PortalException
sessionConfig
- pageCacheId
- transaction
-
ManagerException
PortalException
String add(SessionConfig sessionConfig, PageCacheConfig pageCacheConfig, ITransaction transaction) throws ManagerException, PortalException
sessionConfig
- pageCacheConfig
- transaction
-
ManagerException
PortalException
void update(SessionConfig sessionConfig, PageCacheConfig pageCacheConfig, ITransaction transaction) throws ManagerException, PortalException
sessionConfig
- pageCacheConfig
- transaction
-
ManagerException
PortalException
void addOrUpdate(SessionConfig sessionConfig, PageCacheConfig pageCacheConfig, ITransaction transaction) throws ManagerException, PortalException
sessionConfig
- pageCacheConfig
- transaction
-
ManagerException
PortalException
void delete(SessionConfig sessionConfig, String pageCacheId, ITransaction transaction) throws ManagerException, PortalException
sessionConfig
- pageCacheId
- transaction
-
ManagerException
PortalException
PageCacheConfig generatePage(String pageCacheId) throws PortalException
pageCacheId
- the page cache identifier.
PortalException
PageCacheConfig generateNextPage(boolean forImmediateUseOnly) throws PortalException
forImmediateUseOnly
- if true, only pages whose priority is higher
than PageCacheConfig.MAX_INITIAL_PRIORITY
are taken in account.
PortalException
String getPageUrl(PageCacheConfig pageCacheConfig, ITransaction transaction) throws ManagerException, PortalException
pageCacheConfig
- transaction
-
ManagerException
PortalException
String getCachedPageId(SessionConfig sessionConfig, PageCacheConfig pageCacheConfig) throws ManagerException, PortalException
sessionConfig
- TODOpageCacheConfig
-
ManagerException
PortalException
@Deprecated void clearCacheByServiceInterfaceInstancesIds(SessionConfig sessionConfig, Collection<String> serviceInterfaceInstanceIds, Parameters parameters, int changeType, ITransaction transaction) throws ManagerException, PortalException
clearCacheByPagesIds(SessionConfig, Collection, Parameters, Locale, int, boolean, ITransaction)
instead.
sessionConfig
- serviceInterfaceInstanceIds
- parameters
- changeType
- transaction
-
ManagerException
PortalException
@Deprecated void clearCacheByServiceInterfaceInstances(SessionConfig sessionConfig, Collection<ServiceInterfaceInstanceConfig> serviceInterfaceInstances, Parameters parameters, int changeType, ITransaction transaction) throws ManagerException, PortalException
clearCacheByPagesIds(SessionConfig, Collection, Parameters, Locale, int, boolean, ITransaction)
instead.
sessionConfig
- serviceInterfaceInstances
- parameters
- changeType
- transaction
-
ManagerException
PortalException
@Deprecated void clearCacheByPagesIds(SessionConfig sessionConfig, Collection<String> pagesIds, Parameters parameters, int changeType, ITransaction transaction) throws ManagerException, PortalException
#clearCacheByPagesIds(SessionConfig,Collection,Parameters,int,boolean,ITransaction)
.
sessionConfig
- pagesIds
- parameters
- changeType
- transaction
-
ManagerException
PortalException
@Deprecated void clearCacheByPagesIds(SessionConfig sessionConfig, Collection<String> pagesIds, Parameters parameters, int changeType, boolean clearImmediately, ITransaction transaction) throws PortalException
#clearCacheByPagesIds(SessionConfig,Collection,Parameters,Locale,int,boolean,ITransaction)
.
clearImmediately
is set to true
,
it will also clear the specified pages cache immediately, synchronously.
sessionConfig
- the user session information.pagesIds
- a collection of the pages identifiers.parameters
- the page parameters.changeType
- the cause of the cache clear. Must be one of the
CLEAR_CACHE_CHANGE_TYPE_* constants.clearImmediately
- if the cache clearing is also to be executed
immediately.transaction
- the transaction for persistence access.
PortalException
void clearCacheByPagesIds(SessionConfig sessionConfig, Collection<String> pagesIds, Parameters parameters, Locale locale, int changeType, boolean clearImmediately, ITransaction transaction) throws PortalException
clearImmediately
is set to true
,
it will also clear the specified pages cache immediately, synchronously.
sessionConfig
- the user session information.pagesIds
- a collection of the pages identifiers.parameters
- the page parameters.locale
- specifies the locale to which the cache clearing is to
be applied. May be null to indicate any locale.changeType
- the cause of the cache clear. Must be one of the
CLEAR_CACHE_CHANGE_TYPE_* constants.clearImmediately
- if the cache clearing is also to be executed
immediately.transaction
- the transaction for persistence access.
PortalException
void clearCacheByChannelIds(SessionConfig sessionConfig, Collection<String> channelIds, Parameters parameters, int changeType, boolean clearImmediately, ITransaction transaction) throws PortalException
clearImmediately
is set to true
,
it will also clear the specified pages cache immediately, synchronously.
sessionConfig
- the user session information.pagesIds
- a collection of the pages identifiers.parameters
- the page parameters.changeType
- the cause of the cache clear. Must be one of the
CLEAR_CACHE_CHANGE_TYPE_* constants.clearImmediately
- if the cache clearing is also to be executed
immediately.transaction
- the transaction for persistence access.
PortalException
void clearAllHTMLCache(ITransaction transaction) throws PortalException
transaction
- the transaction for persistence access.
PortalException
String parseHTMLContent(SessionConfig sessionConfig, String htmlContent, String cachedPageId, int cacheType, ITransaction transaction) throws ManagerException, PortalException
sessionConfig
- htmlContent
- cachedPageId
- cacheType
- transaction
-
ManagerException
PortalException
int getPageCacheGenerationState(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
sessionConfig
- transaction
-
PortalException
void setPageCacheGenerationState(SessionConfig sessionConfig, int state, ITransaction transaction) throws PortalException
sessionConfig
- state
- transaction
-
PortalException
PageCacheConfig getByCachedPageProperties(SessionConfig sessionConfig, PageCacheConfig cachedPageProperties, ITransaction transaction) throws ManagerException, PortalException
If no config is found, a PortalObjectNotFound exception is thrown.
sessionConfig
- cachedPageProperties
- transaction
-
ManagerException
PortalException
void updateCachedFilesLastModifiedDate(SessionConfig sessionConfig, PageConfig pageConfig, Locale locale, Date lastModifiedDate, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.pageConfig
- the portal page.locale
- locale for which the cached files needs to be modified.lastModifiedDate
- date to which the matched files must be modified to.transaction
- the transaction for persistence access.
PortalException
String waitForGeneration(String pageCacheId, long timeout) throws PortalException, InterruptedException
pageCacheId
- the page cache identifier.timeout
- maximum time to wait.
InterruptedException
- if the thread was interrupted.
PortalException
void waitForPagesReadyToGenerate(long timeout, boolean forImmediateUseOnly) throws PortalException, InterruptedException
timeout
- maximum time to wait.forImmediateUseOnly
- if true, wait until a page for
immediate use is ready to generate. If false, wait until any page is
ready to generate.
InterruptedException
- if the thread was interrupted.
PortalException
void pageCacheMissed(String pageCacheId, boolean forImmediateUse) throws PortalException
pageCacheId
- the page cache identifier.forImmediateUse
- if true, indicates that the missed page cache
is required for immediate use. This will greater boost the priority to
generate the corresponding page cache.
IllegalStateException
- if the specified page cache cannot be
generated due to its current state or the page cache framework's state.
PortalException
String getPageCacheRelativePath(PageConfig pageConfig, String cachedPageId) throws PortalException
pageConfig
- the page that is cached.pageCacheId
- the page cache identifier.
PortalException
String getPageCacheRelativePath(String pageCacheId, ITransaction transaction) throws PortalException
This method may access the database. Consider using
getPageCacheRelativePath(PageConfig, String)
for better performance if the corresponding PageConfig
is already available.
pageCacheId
- the page cache identifier.transaction
- the transaction for persistence access.
PortalException
String processHtmlReferencesToCachedPages(SessionConfig sessionConfig, String html, ITransaction transaction) throws PortalException
PageCacheConfig
when a proper one does not already exist. The
dynamic references are replaced by static references.
sessionConfig
- user session information.html
- the html.transaction
- transaction for persistence access.
PortalException
String convertMainUrl(SessionConfig sessionConfig, String mainUrl, ITransaction transaction) throws PortalException
PageCacheConfig
if necessary and appropriated.
sessionConfig
- the user session information.mainUrl
- the url to main.jsp. Must start with main.jsp.transaction
- the transaction for persistence access.
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |