|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
EntryInfo and FragmentInfo objects contain metadata for caching and are attached to each cache entry. IdGenerators and MetaDataGenerators use these interfaces to define the caching metadata for an entry.
Typically a Id/MetaDataGenerator will get an entry's FragmentInfo object from the ServletCacheRequest, and use the object's set methods to configure that entry.
The following is a summary of the caching metadata for a CacheEntry:
Field Summary | |
---|---|
static int |
NOT_SHARED
The entry is kept local to the JVM that executed the entry's JSP or command instead of shared across all JVMs. |
static int |
SHARED_PULL
The entry is shared across multiple JVMs; other JVMs get it by pulling it when needed and then storing it in its local cache for further requests. |
static int |
SHARED_PUSH
The entry is shared across multiple JVMs; the entry is pushed to all JVMs after its JSP or command is executed instead of waiting for the JVMs to pull it. |
static int |
SHARED_PUSH_PULL
The entry is shared across multiple JVMs; the id of the entry is pushed on initial creation (execution of JSP/Servlet or command) and stored in the other JVMs. |
Method Summary | |
---|---|
void |
addDataId(java.lang.String dataId)
This unions a new data id into the dataIds variable. |
void |
addTemplate(java.lang.String template)
This adds a template to the templates variable. |
java.util.Enumeration |
getDataIds()
This gets the data ids from the dataIds variable. |
long |
getExpirationTime()
This gets the expiration time from the expirationTime variable. |
java.lang.String |
getId()
This gets the id variable. |
java.lang.Object |
getIdObject()
This gets the id variable as an java.lang.Object. |
boolean |
getPersistToDisk()
This gets the value of the persist to disk boolean variable. |
int |
getPriority()
This gets the priority in the priority variable. |
int |
getSharingPolicy()
This gets the sharing policy in the sharingPolicy variable. |
java.lang.String |
getTemplate()
This gets one of the templates set on this entry info. |
java.util.Enumeration |
getTemplates()
This gets the templates in the templates variable. |
int |
getTimeLimit()
This gets the time limit on this cache entry. |
boolean |
isBatchEnabled()
This determines whether updates (when sharing is PUSH) are sent immediately or in an asynchronous batch fashion |
boolean |
isNotShared()
This determines whether the sharingPolicy is NOT_SHARED. |
boolean |
isSharedPull()
This determines whether the sharingPolicy is SHARED_PULL. |
boolean |
isSharedPush()
This determines whether the sharingPolicy is SHARED_PUSH. |
void |
setBatchEnabled(boolean flag)
This sets whether updates (when sharing is PUSH) are sent immediately or in an asynchronous batch fashion |
void |
setExpirationTime(long expirationTime)
This sets the expirationTime variable. |
void |
setId(java.lang.String id)
This sets the id variable. |
void |
setPersistToDisk(boolean persistToDisk)
This sets the persist-to-disk property in the persistToDisk variable. |
void |
setPriority(int priority)
This assigns the new priority to the priority variable. |
void |
setSharingPolicy(int policy)
This sets the sharing policy in the sharingPolicy variable. |
void |
setTimeLimit(int timeLimit)
This sets the time limit in the timeLimit variable. |
Field Detail |
public static final int NOT_SHARED
public static final int SHARED_PUSH
public static final int SHARED_PULL
public static final int SHARED_PUSH_PULL
Method Detail |
public java.lang.String getId()
public java.lang.Object getIdObject()
public void setId(java.lang.String id)
public boolean isBatchEnabled()
public void setBatchEnabled(boolean flag)
flag
- true to enable batch updates, false otherwise.public int getSharingPolicy()
public boolean getPersistToDisk()
public void setSharingPolicy(int policy)
public void setPersistToDisk(boolean persistToDisk)
public boolean isNotShared()
public boolean isSharedPush()
public boolean isSharedPull()
public int getTimeLimit()
public void setTimeLimit(int timeLimit)
timeLimit
- The time limit.public long getExpirationTime()
public void setExpirationTime(long expirationTime)
public int getPriority()
public void setPriority(int priority)
priority
- The new priority.public java.util.Enumeration getTemplates()
public java.lang.String getTemplate()
public void addTemplate(java.lang.String template)
template
- The new Template name.public java.util.Enumeration getDataIds()
public void addDataId(java.lang.String dataId)
dataId
- The new data id.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |