public class DimensionValueCacheTools extends GenericService
| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
CLASS_VERSION
Class version string 
 | 
static java.lang.String | 
DATA_DATE
Attribute that indicates last baseline index time 
 | 
static java.lang.String | 
NUM_GENERATIONS
Attribute that indicates number of partial updates 
 | 
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description | 
|---|
DimensionValueCacheTools()  | 
| Modifier and Type | Method and Description | 
|---|---|
atg.commerce.endeca.cache.DimensionValueCache | 
createEmptyCache()
Creates an empty DimensionValueCache. 
 | 
void | 
fillEmptyCache()
Method to populate an empty cache. 
 | 
java.util.List<DimensionValueCacheObject> | 
get(java.lang.String pRepositoryId)
Get the dimension values that map to the repository item whose id is passed
 in. 
 | 
protected java.util.List<DimensionValueCacheObject> | 
get(java.lang.String pRepositoryId,
   boolean pRefresh)
Get an object from the cache. 
 | 
DimensionValueCacheObject | 
get(java.lang.String pRepositoryId,
   java.util.List<java.lang.String> pAncestorIds)
Get a specific dimension value that maps to the repository item whose id 
 is passed in. 
 | 
java.util.List<java.lang.String> | 
getAncestorIds(java.lang.String pRepositoryId)
A list of ancestor ids representing the default catalog path from the 
 repository item whose id is passed in, to the catalogs root category. 
 | 
AssemblerApplicationConfiguration | 
getAssemblerApplicationConfiguration()  | 
AssemblerTools | 
getAssemblerTools()  | 
atg.commerce.endeca.cache.DimensionValueCache | 
getCache()
Uses the currentApplicationKey on the assemblerApplicationConfiguration 
 component to return a DimensionValueCache that corresponds to the current
 context. 
 | 
DimensionValueCacheObject | 
getCachedObjectForDimval(java.lang.String pDimvalId)
Get the cached object for the passed in dimension value id. 
 | 
protected atg.commerce.endeca.cache.DimensionValueCache | 
getCacheFromRequest(DynamoHttpServletRequest pRequest)
Checks the current request for a saved cache. 
 | 
java.lang.String | 
getCacheRefreshHandlerName()  | 
protected atg.commerce.endeca.cache.DimensionValueCacheTools.CacheRefreshLock | 
getCacheRefreshLock(java.lang.String pApplicationKey)
Returns the CacheRefeshLock from the mCacheRefreshLocks Map. 
 | 
CatalogTools | 
getCatalogTools()  | 
long | 
getCheckMDEXUpdatedEveryNHours()  | 
protected DimensionValueCacheObject | 
getEntryWithSpecificAncestors(java.lang.String pRepositoryId,
                             java.util.List<java.lang.String> pAncestorIds)
Iterates over the objects in pAllResults and looks for one that has the
 specified ancestors pAncestorIds. 
 | 
protected atg.commerce.endeca.cache.DimensionValueCacheTools.MdexStats | 
getMDEXStats()
data_date represents the time of index creation (i.e. 
 | 
protected java.lang.String | 
getMDEXStatsURL()  | 
long | 
getMinimumCacheRefreshIntervalSecs()  | 
java.lang.String | 
getSavedRequestCachePath()  | 
boolean | 
isCheckMDEXUpdated()  | 
java.lang.String | 
printCacheMap()
Prints the contents of all caches managed by this DimensionValueCacheTools
 component. 
 | 
void | 
refreshCache()
Refreshes the cache by making a call the cache refresh handler. 
 | 
protected void | 
saveCacheInRequest(DynamoHttpServletRequest pRequest,
                  atg.commerce.endeca.cache.DimensionValueCache pCache)
Saves the resolved cache in the request 
 | 
void | 
setAssemblerApplicationConfiguration(AssemblerApplicationConfiguration pAssemblerApplicationConfiguration)  | 
void | 
setAssemblerTools(AssemblerTools pAssemblerTools)  | 
void | 
setCacheRefreshHandlerName(java.lang.String pCacheRefreshHandlerName)  | 
void | 
setCatalogTools(CatalogTools pCatalogTools)  | 
void | 
setCheckMDEXUpdated(boolean pCheckMDEXUpdated)  | 
void | 
setCheckMDEXUpdatedEveryNHours(long pCheckMDEXUpdatedEveryNHours)  | 
void | 
setMinimumCacheRefreshIntervalSecs(long pMinimumCacheRefreshIntervalSecs)  | 
void | 
setSavedRequestCachePath(java.lang.String pSavedRequestCachePath)  | 
void | 
swapCache(atg.commerce.endeca.cache.DimensionValueCache pOfflineCache)
Swap in the offline cache map entry to the live one and remove the entry
 from the offline map. 
 | 
protected long | 
timeSinceLastUpdateSecs(long pLastCacheUpdate)
Number of seconds since the last cache update 
 | 
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
public static final java.lang.String DATA_DATE
public static final java.lang.String NUM_GENERATIONS
public AssemblerTools getAssemblerTools()
public void setAssemblerTools(AssemblerTools pAssemblerTools)
mAssemblerTools - the mAssemblerTools to setpublic CatalogTools getCatalogTools()
public void setCatalogTools(CatalogTools pCatalogTools)
mCatalogTools - the mCatalogTools to setpublic java.lang.String getCacheRefreshHandlerName()
public void setCacheRefreshHandlerName(java.lang.String pCacheRefreshHandlerName)
mCacheRefreshHandlerName - the mCacheRefreshHandlerName to setpublic long getMinimumCacheRefreshIntervalSecs()
public void setMinimumCacheRefreshIntervalSecs(long pMinimumCacheRefreshIntervalSecs)
mMinimumCacheRefreshIntervalSecs - the 
 mMinimumCacheRefreshIntervalSecs to set.public AssemblerApplicationConfiguration getAssemblerApplicationConfiguration()
public void setAssemblerApplicationConfiguration(AssemblerApplicationConfiguration pAssemblerApplicationConfiguration)
assemblerApplicationConfiguration - the assemblerApplicationConfiguration to setpublic boolean isCheckMDEXUpdated()
public void setCheckMDEXUpdated(boolean pCheckMDEXUpdated)
pCheckMDEXUpdated - Set a new checkMDEXUpdated boolean that controls
 whether we should check and see if the MDEX has been updated since the
 last cache refresh.public long getCheckMDEXUpdatedEveryNHours()
public void setCheckMDEXUpdatedEveryNHours(long pCheckMDEXUpdatedEveryNHours)
pCheckMDEXUpdatedEveryNHours - Set a new checkMdexUpdatedEveryNHours.public java.lang.String getSavedRequestCachePath()
public void setSavedRequestCachePath(java.lang.String pSavedRequestCachePath)
pSavedRequestCachePath - Set a new savedRequestCachePath.public atg.commerce.endeca.cache.DimensionValueCache getCache()
public java.util.List<java.lang.String> getAncestorIds(java.lang.String pRepositoryId)
public DimensionValueCacheObject getCachedObjectForDimval(java.lang.String pDimvalId)
pDimvalId - A dimension value id.public java.util.List<DimensionValueCacheObject> get(java.lang.String pRepositoryId)
pRepositoryId - A repository idprotected java.util.List<DimensionValueCacheObject> get(java.lang.String pRepositoryId, boolean pRefresh)
pRepositoryId - The item to get from that cache with this repository
 id.pRefresh - If the item does not exist we perform an option refresh
 and try to retrieve it again.public DimensionValueCacheObject get(java.lang.String pRepositoryId, java.util.List<java.lang.String> pAncestorIds)
pRepositoryId - A repository idpAncestorIds - A list of ancestor ids. Can be null or empty to 
 indicate a top level parent item.protected DimensionValueCacheObject getEntryWithSpecificAncestors(java.lang.String pRepositoryId, java.util.List<java.lang.String> pAncestorIds)
pRepositoryId - pAncestorIds - pAllObjects - public void refreshCache()
public void swapCache(atg.commerce.endeca.cache.DimensionValueCache pOfflineCache)
pOfflineCache - The cache that will go live.public void fillEmptyCache()
public atg.commerce.endeca.cache.DimensionValueCache createEmptyCache()
protected atg.commerce.endeca.cache.DimensionValueCacheTools.CacheRefreshLock getCacheRefreshLock(java.lang.String pApplicationKey)
pApplicationKey - public java.lang.String printCacheMap()
protected long timeSinceLastUpdateSecs(long pLastCacheUpdate)
pLastCacheUpdate - protected java.lang.String getMDEXStatsURL()
protected atg.commerce.endeca.cache.DimensionValueCacheTools.MdexStats getMDEXStats()
protected atg.commerce.endeca.cache.DimensionValueCache getCacheFromRequest(DynamoHttpServletRequest pRequest)
protected void saveCacheInRequest(DynamoHttpServletRequest pRequest, atg.commerce.endeca.cache.DimensionValueCache pCache)