com.ibm.websphere.servlet.cache

Interface FragmentInfo

All Superinterfaces:
EntryInfo

  1. public interface FragmentInfo
  2. extends EntryInfo
FragmentInfo extends the EntryInfo interface to add variables unique to externally cacheable pages.

EntryInfo and FragmentInfo Objects 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

Fields inherited from interface com.ibm.websphere.cache.EntryInfo
NOT_SHARED, SHARED_PULL, SHARED_PUSH, SHARED_PUSH_PULL

Method Summary

Modifier and Type Method and Description
  1. boolean
getConsumeSubfragments()
This indicates whether or not the parent is consuming child fragments in its cache entry.
  1. java.lang.String
getExternalCacheGroupId()
This gets the externalCacheGroupId variable.
  1. java.lang.String
getInstanceName()
This method returns the name of the cache-instance that will be used to store this fragment.
  1. boolean
getStoreAttributes()
This indicates whether or not request attributes are being saved with the servlet response.
  1. boolean
getStoreCookies()
This indicates whether or not cookies are being saved with the servlet response.
  1. boolean
isIgnoreGetPost()
This indicates whether or not the requestType will automatically be appended to the cache-id
  1. void
setConsumeSubfragments(boolean b)
This sets the consume-subfragments variable.
  1. void
setExternalCacheGroupId(java.lang.String externalCacheGroupId)
This sets the externalCacheGroupId variable.
  1. void
setIgnoreGetPost(boolean b)
This sets the ignore-get-post variable.
  1. void
setStoreAttributes(boolean b)
This sets the store-attributes variable.
  1. void
setStoreCookies(boolean b)
This sets the store-cookies variable.
  1. boolean
wasExternalCacheGroupIdSet()
This indicates whether the client set the external cache group id in this FragmentInfo.
Methods inherited from interface com.ibm.websphere.cache.EntryInfo
addAlias, addDataId, addTemplate, getAliasList, getCacheType, getDataIds, getExpirationTime, getId, getIdObject, getInactivity, getPersistToDisk, getPriority, getSharingPolicy, getTemplate, getTemplates, getTimeLimit, getUserMetaData, getValidatorExpirationTime, isBatchEnabled, isNotShared, isSharedPull, isSharedPush, setBatchEnabled, setExpirationTime, setId, setInactivity, setPersistToDisk, setPriority, setSharingPolicy, setTimeLimit, setUserMetaData

Method Detail

getExternalCacheGroupId

  1. java.lang.String getExternalCacheGroupId( )
This gets the externalCacheGroupId variable.
Returns:
The externalCacheGroupId.

setExternalCacheGroupId

  1. void setExternalCacheGroupId(java.lang.String externalCacheGroupId)
This sets the externalCacheGroupId variable.
Parameters:
externalCacheGroupId - The externalCacheGroupId.

wasExternalCacheGroupIdSet

  1. boolean wasExternalCacheGroupIdSet( )
This indicates whether the client set the external cache group id in this FragmentInfo.
Returns:
True implies it was set.

setStoreAttributes

  1. void setStoreAttributes(boolean b)
This sets the store-attributes variable. If storeAttributes is set to false then the request attributes will not be saved with the servlet response. The default value is true.
Parameters:
b - a boolean that indicates whether or not attributes should be saved.

getStoreAttributes

  1. boolean getStoreAttributes()
This indicates whether or not request attributes are being saved with the servlet response.
Returns:
boolean true means that attributes will be saved

setStoreCookies

  1. void setStoreCookies(boolean b)
This sets the store-cookies variable. If storeCookies is set to false then the cookies will not be saved with the servlet response. The default value is true.
Parameters:
b - a boolean that indicates whether or not cookies should be saved.

getStoreCookies

  1. boolean getStoreCookies()
This indicates whether or not cookies are being saved with the servlet response.
Returns:
boolean true means that cookies will be saved

setConsumeSubfragments

  1. void setConsumeSubfragments(boolean b)
This sets the consume-subfragments variable. If consumeSubfragments is set to true then the parent will consume child fragments in its cache entry. The default value is false.
Parameters:
b - a boolean that indicates whether or not the parent will consume-subfragments

getConsumeSubfragments

  1. boolean getConsumeSubfragments( )
This indicates whether or not the parent is consuming child fragments in its cache entry.
Returns:
boolean true means that the parent will consume child fragments

setIgnoreGetPost

  1. void setIgnoreGetPost(boolean b)
This sets the ignore-get-post variable. If ignore-get-post is set to true then the requestType will automatically be appended to the cache-id
Parameters:
b - a boolean that indicates whether or not to append the requestType to the cache-id saved.

isIgnoreGetPost

  1. boolean isIgnoreGetPost()
This indicates whether or not the requestType will automatically be appended to the cache-id
Returns:
boolean true means that the requestType will not be appended to the cache-id

getInstanceName

  1. java.lang.String getInstanceName( )
This method returns the name of the cache-instance that will be used to store this fragment.
Returns:
a String specifying the cache-instance name