com.ibm.websphere.cache
Interface EntryInfo
All known subinterfaces:
- public interface EntryInfo
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 Summary
Modifier and Type | Field and Description |
---|---|
|
NOT_SHARED
The entry is kept local to the JVM that executed the entry's JSP
or command instead of shared across all JVMs.
|
|
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.
|
|
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.
|
|
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
Modifier and Type | Method and Description |
---|---|
|
addAlias(java.lang.Object alias)
Adds a new alias ID.
|
|
addDataId(java.lang.String dataId)
Adds a new data ID.
|
|
addTemplate(java.lang.String template)
Adds a template.
|
|
getAliasList()
Returns the alias IDs set on this entry info.
|
|
getCacheType()
Returns cache type (CACHE_TYPE_DEFAULT or CACHE_TYPE_JAXRPC)
|
|
getDataIds()
Returns the data IDs set on this entry info.
|
|
getExpirationTime()
Returns the expiration time.
|
|
getId()
Returns the string representation of cache ID.
|
|
getIdObject()
Returns the object representation of cache ID.
|
|
getInactivity()
Returns the inactiviy timer.
|
|
getPersistToDisk()
Determine whether persist-to-disk is true.
|
|
getPriority()
Returns the priority.
|
|
getSharingPolicy()
Returns the sharing policy in the sharingPolicy variable.
|
|
getTemplate()
Returns one of the templates set on this entry info.
|
|
getTemplates()
Returns the templates set on this entry info.
|
|
getTimeLimit()
Returns the time limit.
|
|
getUserMetaData()
Returns the userMetaData.
|
|
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.
|
|
isBatchEnabled()
Deprecated. The updates for Push or Push-Pull sharing policies are
always done in an asynchronous batch mode. It always
returns true.
|
|
isNotShared()
Determines whether the sharingPolicy is EntryInfo.NOT_SHARED.
|
|
isSharedPull()
Determines whether the sharingPolicy is EntryInfo.SHARED_PULL.
|
|
isSharedPush()
Determines whether the sharingPolicy is EntryInfo.SHARED_PUSH.
|
|
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.
|
|
setExpirationTime(long expirationTime)
Assigns new expiration time.
|
|
setId(java.lang.String id)
Sets the cache ID.
|
|
setInactivity(int inactivity)
Assigns the inactivity timer.
|
|
setPersistToDisk(boolean persistToDisk)
Sets the persist-to-disk.
|
|
setPriority(int priority)
Assigns the new priority.
|
|
setSharingPolicy(int policy)
Sets the sharing policy.
|
|
setTimeLimit(int timeLimit)
Assigns the time limit.
|
|
setUserMetaData(java.lang.Object userMetaData)
Assigns the new userMetaData.
|
Field Detail
NOT_SHARED
- static 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:
SHARED_PUSH
- static 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:
SHARED_PULL
- static 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:
SHARED_PUSH_PULL
- static 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:
Method Detail
getId
- java.lang.String getId()
Returns the string representation of cache ID.
Returns:
The string representation of cache ID..
getIdObject
- java.lang.Object getIdObject()
Returns the object representation of cache ID.
Returns:
The object representation of cache ID.
setId
- void setId(java.lang.String id)
Sets the cache ID.
Parameters:
id
- The cache ID. isBatchEnabled
- boolean 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
setBatchEnabled
- void 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. getSharingPolicy
- int getSharingPolicy()
Returns the sharing policy in the sharingPolicy variable.
getPersistToDisk
- boolean getPersistToDisk()
Determine whether persist-to-disk is true.
Returns:
True if this entry persists to disk.
setSharingPolicy
- void setSharingPolicy(int policy)
Sets the sharing policy.
setPersistToDisk
- void 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. isNotShared
- boolean isNotShared()
Determines whether the sharingPolicy is EntryInfo.NOT_SHARED.
Returns:
True indicates that the sharingPolicy is EntryInfo.NOT_SHARED.
isSharedPush
- boolean isSharedPush()
Determines whether the sharingPolicy is EntryInfo.SHARED_PUSH.
Returns:
True indicates that the sharingPolicy is EntryInfo.SHARED_PUSH or EntryInfo.SHARED_PUSH_PULL.
isSharedPull
- boolean isSharedPull()
Determines whether the sharingPolicy is EntryInfo.SHARED_PULL.
Returns:
True indicates that the sharingPolicy is EntryInfo.SHARED_PULL or EntryInfo.SHARED_PUSH_PULL.
getTimeLimit
- int getTimeLimit()
Returns the time limit.
Returns:
The time limit.
setTimeLimit
- void 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. getInactivity
- int getInactivity()
Returns the inactiviy timer.
Returns:
The inactivity timer.
setInactivity
- void 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. getExpirationTime
- long getExpirationTime()
Returns the expiration time.
Returns:
The expiration time.
setExpirationTime
- void setExpirationTime(long expirationTime)
Assigns new expiration time.
Parameters:
expirationTime
- The new expiration time. getPriority
- int getPriority()
Returns the priority.
Returns:
The priority.
setPriority
- void setPriority(int priority)
Assigns the new priority.
Parameters:
priority
- The new priority. getTemplates
- java.util.Enumeration getTemplates( )
Returns the templates set on this entry info.
Returns:
An Enumeration of the template names.
getTemplate
- java.lang.String getTemplate()
Returns one of the templates set on this entry info.
Returns:
A template name.
addTemplate
- void addTemplate(java.lang.String template)
Adds a template.
Parameters:
template
- The new Template name. getDataIds
- java.util.Enumeration getDataIds( )
Returns the data IDs set on this entry info.
Returns:
The Enumeration of data IDs.
addDataId
- void addDataId(java.lang.String dataId)
Adds a new data ID.
Parameters:
dataId
- The new data ID. getAliasList
- java.util.Enumeration getAliasList( )
Returns the alias IDs set on this entry info.
Returns:
The Enumeration of alias IDs.
addAlias
- void addAlias(java.lang.Object alias)
Adds a new alias ID.
Parameters:
alias
- The new alias ID. getUserMetaData
- java.lang.Object getUserMetaData( )
Returns the userMetaData.
Returns:
The userMetaData.
setUserMetaData
- void setUserMetaData(java.lang.Object userMetaData)
Assigns the new userMetaData.
Parameters:
userMetaData
- The new userMetaData. getValidatorExpirationTime
- long 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
getCacheType
- int getCacheType()
Returns cache type (CACHE_TYPE_DEFAULT or CACHE_TYPE_JAXRPC)
Returns:
cache type