Package lumis.portal.page.cache
Class PageCacheConfig
- java.lang.Object
-
- lumis.portal.page.cache.PageCacheConfig
-
public class PageCacheConfig extends java.lang.Object
Stores information about the caching of a page.- Since:
- 4.0.0
- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_INITIAL_PRIORITY
Maximum priority value forgetInitialPriority()
.static int
MIN_INITIAL_PRIORITY
Minimum priority value forgetInitialPriority()
.static int
STATUS_DISABLED
Status that indicates the cache is disabled.static int
STATUS_GENERATING
Status that indicates the cache being generated.static int
STATUS_GENERATING_OUTDATED
Status that indicates the cache is being generated, but the generation result will be outdated, because something changed after the generation started.static int
STATUS_NOT_PUBLISHED
Status that indicates the target page is not published (its target content is not published).static int
STATUS_OUTDATED
Status that indicates the cache is outdated.static int
STATUS_OUTDATED_WITH_ERROR
Status that indicates the cache is outdated and has quit generating due to errors.static int
STATUS_UPDATED
Status that indicates the cache is updated.
-
Constructor Summary
Constructors Constructor Description PageCacheConfig(WebResource webResource)
Creates aPageCacheConfig
for a web resource.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
getExpirationPriority()
Returns the priority value that is calculated and updated during the expiration of this page cache.java.lang.String
getFilePath()
Returns the path to the cache file, relative to the portal application web root.java.lang.String
getId()
int
getInitialPriority()
Returns the initial priority value for this page cache.java.lang.String
getLanguageId()
Deprecated.java.util.Date
getNextGenerationDate()
Returns the date-time of the next generation of this page cache.int
getNumErrors()
Returns the number of consecutive generation errors for this page cache.java.lang.String
getPageId()
Deprecated.java.lang.String
getPageUrl()
Deprecated.int
getPriority()
Returns the current priority value for this page cache.int
getResourcePriority()
Returns the priority for generating the cache for the resource this cache is of.java.lang.String
getServerId()
Returns the identifier of the server that last generated this page cache.int
getStatus()
WebResource
getWebResource()
void
setFilePath(java.lang.String filePath)
Sets the path to the cache file, relative to the portal application web root.void
setInitialPriority(int initialPriority)
Sets the initial priority value for this page cache.void
setStatus(int status)
java.lang.String
toString()
-
-
-
Field Detail
-
MIN_INITIAL_PRIORITY
public static final int MIN_INITIAL_PRIORITY
Minimum priority value forgetInitialPriority()
.- Since:
- 4.1.0
- See Also:
- Constant Field Values
-
MAX_INITIAL_PRIORITY
public static final int MAX_INITIAL_PRIORITY
Maximum priority value forgetInitialPriority()
.- Since:
- 4.1.0
- See Also:
- Constant Field Values
-
STATUS_OUTDATED
public static final int STATUS_OUTDATED
Status that indicates the cache is outdated.- Since:
- 4.1.0
- See Also:
- Constant Field Values
-
STATUS_GENERATING
public static final int STATUS_GENERATING
Status that indicates the cache being generated.- Since:
- 4.1.0
- See Also:
- Constant Field Values
-
STATUS_GENERATING_OUTDATED
public static final int STATUS_GENERATING_OUTDATED
Status that indicates the cache is being generated, but the generation result will be outdated, because something changed after the generation started.- Since:
- 4.1.0
- See Also:
- Constant Field Values
-
STATUS_UPDATED
public static final int STATUS_UPDATED
Status that indicates the cache is updated.- Since:
- 4.1.0
- See Also:
- Constant Field Values
-
STATUS_OUTDATED_WITH_ERROR
public static final int STATUS_OUTDATED_WITH_ERROR
Status that indicates the cache is outdated and has quit generating due to errors.- Since:
- 4.1.0
- See Also:
- Constant Field Values
-
STATUS_DISABLED
public static final int STATUS_DISABLED
Status that indicates the cache is disabled.- Since:
- 4.1.0
- See Also:
- Constant Field Values
-
STATUS_NOT_PUBLISHED
public static final int STATUS_NOT_PUBLISHED
Status that indicates the target page is not published (its target content is not published).- Since:
- 10.2.0
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PageCacheConfig
public PageCacheConfig(WebResource webResource)
Creates aPageCacheConfig
for a web resource. The relationship on the this PageCacheConfig is set by this constructor, but not on the web resource side.- Parameters:
webResource
- the web resource.- Since:
- 5.0.0
-
-
Method Detail
-
getId
public java.lang.String getId()
-
getWebResource
public WebResource getWebResource()
-
getPageUrl
@Deprecated public java.lang.String getPageUrl()
Deprecated.
-
getLanguageId
@Deprecated public java.lang.String getLanguageId()
Deprecated.
-
getPageId
@Deprecated public java.lang.String getPageId()
Deprecated.
-
getStatus
public int getStatus()
-
setStatus
public void setStatus(int status)
-
getInitialPriority
public int getInitialPriority()
Returns the initial priority value for this page cache.- Returns:
- the initial priority value.
- Since:
- 4.1.0
-
setInitialPriority
public void setInitialPriority(int initialPriority)
Sets the initial priority value for this page cache.- Parameters:
initialPriority
- the value to set.- Since:
- 4.1.0
-
getPriority
public int getPriority()
Returns the current priority value for this page cache.- Returns:
- the current priority value.
- Since:
- 4.1.0
-
getResourcePriority
public int getResourcePriority()
Returns the priority for generating the cache for the resource this cache is of. This is used to choose between caches with the samepriority
.- Returns:
- the number of parameters.
- Since:
- 5.0.0
-
getExpirationPriority
public int getExpirationPriority()
Returns the priority value that is calculated and updated during the expiration of this page cache. This priority is used to choose next cache to generate between caches with the same priority and resource priority.- Returns:
- the priority, higher value has more priority.
- Since:
- 15.0.4
-
getNumErrors
public int getNumErrors()
Returns the number of consecutive generation errors for this page cache.- Returns:
- the the number of consecutive generation errors for this page cache.
- Since:
- 4.1.0
-
getFilePath
public java.lang.String getFilePath()
Returns the path to the cache file, relative to the portal application web root.- Returns:
- the path, starting with '/'.
- Since:
- 5.0.0
-
setFilePath
public void setFilePath(java.lang.String filePath)
Sets the path to the cache file, relative to the portal application web root.- Parameters:
filePath
- the path, starting with '/'.- Since:
- 5.0.0
-
getServerId
public java.lang.String getServerId()
Returns the identifier of the server that last generated this page cache.- Returns:
- the server identifier.
- Since:
- 6.0.0
-
getNextGenerationDate
public java.util.Date getNextGenerationDate()
Returns the date-time of the next generation of this page cache. If the value isnull
, the next generation doesn't have a fixed time to be started.- Returns:
- the date-time of the next generation of this page cache.
- Since:
- 6.2.0
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-