Package com.ibm.websphere.cache
Interface EntryInfo
- 
 public interface EntryInfoEntryInfo 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: - The template. (set internally by WebSphere)
- The ID. (set internally by WebSphere with the output of the IdGenerator.getId() method)
- The priority.
- The timeLimit and expirationTime options.
- The dataIds option.
- The external cache group to which this entry will be pushed (FragmentInfo)
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intNOT_SHAREDThe entry is kept local to the JVM that executed the entry's JSP or command instead of shared across all JVMs.static intSHARED_PULLDeprecated.Share type PULL should not be used in new code development.static intSHARED_PUSHThe 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 intSHARED_PUSH_PULLThe 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 SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddAlias(java.lang.Object alias)Adds a new alias ID.voidaddDataId(java.lang.String dataId)Adds a new data ID.voidaddTemplate(java.lang.String template)Adds a template.java.util.EnumerationgetAliasList()Returns the alias IDs set on this entry info.intgetCacheType()Returns cache type (CACHE_TYPE_DEFAULT or CACHE_TYPE_JAXRPC)java.util.EnumerationgetDataIds()Returns the data IDs set on this entry info.longgetExpirationTime()Returns the expiration time.java.lang.StringgetId()Returns the string representation of cache ID.java.lang.ObjectgetIdObject()Returns the object representation of cache ID.intgetInactivity()Returns the inactiviy timer.booleangetPersistToDisk()Determine whether persist-to-disk is true.intgetPriority()Returns the priority.intgetSharingPolicy()Returns the sharing policy in the sharingPolicy variable.java.lang.StringgetTemplate()Returns one of the templates set on this entry info.java.util.EnumerationgetTemplates()Returns the templates set on this entry info.intgetTimeLimit()Returns the time limit.java.lang.ObjectgetUserMetaData()Returns the userMetaData.longgetValidatorExpirationTime()Returns the validator expiration time of the entry in the cache The validator expiration time along with the expiration time control the state of the entry in the cache.booleanisBatchEnabled()Deprecated.The updates for Push or Push-Pull sharing policies are always done in an asynchronous batch mode.booleanisNotShared()Determines whether the sharingPolicy is EntryInfo.NOT_SHARED.booleanisSharedPull()Determines whether the sharingPolicy is EntryInfo.SHARED_PULL.booleanisSharedPush()Determines whether the sharingPolicy is EntryInfo.SHARED_PUSH.voidsetBatchEnabled(boolean flag)Deprecated.The updates for Push or Push-Pull sharing policies are always done in an asynchronous batch mode.voidsetExpirationTime(long expirationTime)Assigns new expiration time.voidsetId(java.lang.String id)Sets the cache ID.voidsetInactivity(int inactivity)Assigns the inactivity timer.voidsetPersistToDisk(boolean persistToDisk)Sets the persist-to-disk.voidsetPriority(int priority)Assigns the new priority.voidsetSharingPolicy(int policy)Sets the sharing policy.voidsetTimeLimit(int timeLimit)Assigns the time limit.voidsetUserMetaData(java.lang.Object userMetaData)Assigns the new userMetaData.
 
- 
- 
- 
Field Detail- 
NOT_SHAREDstatic final 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. This option is useful when there is affinity between a client and web application server and the data is only used by that client (e.g., a shopping cart).- See Also:
- Constant Field Values
 
 - 
SHARED_PUSHstatic final 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. Pushing these entries is delayed for a short time (which is configurable) to exploit the efficiency of batching several entries in one message. This option is useful when the entry is very heavily used by all clients (e.g., a popular product display).- See Also:
- Constant Field Values
 
 - 
SHARED_PULLstatic final int SHARED_PULL Deprecated.Share type PULL should not be used in new code development. Use share type PUSH_PULL instead. Share type PULL, if used in existing code, will function like share type PUSH_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. This option is useful when the entry is shared by all clients but is not accessed often enough between invalidations to warrant pushing it to other (e.g., a not-so-popular product display).- See Also:
- Constant Field Values
 
 - 
SHARED_PUSH_PULLstatic final 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. If the actual entry is requested, other JVMs first look to see if the ID has been broadcasted previously before making a remote request for it.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getIdjava.lang.String getId() Returns the string representation of cache ID.- Returns:
- The string representation of cache ID..
 
 - 
getIdObjectjava.lang.Object getIdObject() Returns the object representation of cache ID.- Returns:
- The object representation of cache ID.
 
 - 
setIdvoid setId(java.lang.String id) Sets the cache ID.- Parameters:
- id- The cache ID.
 
 - 
isBatchEnabledboolean isBatchEnabled() Deprecated.The updates for Push or Push-Pull sharing policies are always done in an asynchronous batch mode. It always returns true.Determines whether updates (when sharing is PUSH) are sent immediately or in an asynchronous batch fashion- Returns:
- True if updates are done in a batch
 
 - 
setBatchEnabledvoid setBatchEnabled(boolean flag) Deprecated.The updates for Push or Push-Pull sharing policies are always done in an asynchronous batch mode. Calling setBatchEnabled(false) has no effect on cache replication.Sets whether updates (when sharing is PUSH) are sent immediately or in an asynchronous batch fashion- Parameters:
- flag- true to enable batch updates, false otherwise.
 
 - 
getSharingPolicyint getSharingPolicy() Returns the sharing policy in the sharingPolicy variable.- Returns:
- The sharing policy.
- See Also:
- EntryInfo
 
 - 
getPersistToDiskboolean getPersistToDisk() Determine whether persist-to-disk is true.- Returns:
- True if this entry persists to disk.
 
 - 
setSharingPolicyvoid setSharingPolicy(int policy) Sets the sharing policy.- Parameters:
- policy- The sharing policy.
- See Also:
- EntryInfo
 
 - 
setPersistToDiskvoid setPersistToDisk(boolean persistToDisk) Sets the persist-to-disk. If disk cache offload is enabled and persist-to-disk is true, the entry will be offloaded to the disk.- Parameters:
- persistToDisk- The persist-to-disk.
 
 - 
isNotSharedboolean isNotShared() Determines whether the sharingPolicy is EntryInfo.NOT_SHARED.- Returns:
- True indicates that the sharingPolicy is EntryInfo.NOT_SHARED.
 
 - 
isSharedPushboolean isSharedPush() Determines whether the sharingPolicy is EntryInfo.SHARED_PUSH.- Returns:
- True indicates that the sharingPolicy is EntryInfo.SHARED_PUSH or EntryInfo.SHARED_PUSH_PULL.
 
 - 
isSharedPullboolean isSharedPull() Determines whether the sharingPolicy is EntryInfo.SHARED_PULL.- Returns:
- True indicates that the sharingPolicy is EntryInfo.SHARED_PULL or EntryInfo.SHARED_PUSH_PULL.
 
 - 
getTimeLimitint getTimeLimit() Returns the time limit.- Returns:
- The time limit.
 
 - 
setTimeLimitvoid setTimeLimit(int timeLimit) Assigns the time limit. Once an entry is cached, it will remain in the cache for this many seconds- Parameters:
- timeLimit- The time limit.
 
 - 
getInactivityint getInactivity() Returns the inactiviy timer.- Returns:
- The inactivity timer.
 
 - 
setInactivityvoid setInactivity(int inactivity) Assigns the inactivity timer. Once an entry is cached, it will remain in the cache for this many seconds if not accessed.- Parameters:
- inactivity- This inactivity timer.
 
 - 
getExpirationTimelong getExpirationTime() Returns the expiration time.- Returns:
- The expiration time.
 
 - 
setExpirationTimevoid setExpirationTime(long expirationTime) Assigns new expiration time.- Parameters:
- expirationTime- The new expiration time.
 
 - 
getPriorityint getPriority() Returns the priority.- Returns:
- The priority.
 
 - 
setPriorityvoid setPriority(int priority) Assigns the new priority.- Parameters:
- priority- The new priority.
 
 - 
getTemplatesjava.util.Enumeration getTemplates() Returns the templates set on this entry info.- Returns:
- An Enumeration of the template names.
 
 - 
getTemplatejava.lang.String getTemplate() Returns one of the templates set on this entry info.- Returns:
- A template name.
 
 - 
addTemplatevoid addTemplate(java.lang.String template) Adds a template.- Parameters:
- template- The new Template name.
 
 - 
getDataIdsjava.util.Enumeration getDataIds() Returns the data IDs set on this entry info.- Returns:
- The Enumeration of data IDs.
 
 - 
addDataIdvoid addDataId(java.lang.String dataId) Adds a new data ID.- Parameters:
- dataId- The new data ID.
 
 - 
getAliasListjava.util.Enumeration getAliasList() Returns the alias IDs set on this entry info.- Returns:
- The Enumeration of alias IDs.
 
 - 
addAliasvoid addAlias(java.lang.Object alias) Adds a new alias ID.- Parameters:
- alias- The new alias ID.
 
 - 
getUserMetaDatajava.lang.Object getUserMetaData() Returns the userMetaData.- Returns:
- The userMetaData.
 
 - 
setUserMetaDatavoid setUserMetaData(java.lang.Object userMetaData) Assigns the new userMetaData.- Parameters:
- userMetaData- The new userMetaData.
 
 - 
getValidatorExpirationTimelong getValidatorExpirationTime() Returns the validator expiration time of the entry in the cache The validator expiration time along with the expiration time control the state of the entry in the cache.- Returns:
- long the current validator expiration time in milliseconds
 
 - 
getCacheTypeint getCacheType() Returns cache type (CACHE_TYPE_DEFAULT or CACHE_TYPE_JAXRPC)- Returns:
- cache type
 
 
- 
 
-