public class CacheMgr extends BaseMgr implements CacheMgrIf
| Modifier and Type | Class and Description |
|---|---|
protected class |
CacheMgr.StaticData
Used to store the static data of this manager
|
| Modifier and Type | Field and Description |
|---|---|
static int |
cacheType
Cache Type - default is KonaKart
|
protected static java.lang.String |
KKProdCacheQMutex
KK Prod Cache Queue Mutex
|
protected static java.util.LinkedList<java.lang.String> |
kkProdCacheQueue
Queue of lookup key entries in the KonaKart Product Cache
|
protected static java.util.Set<java.lang.String> |
kkProdCacheSet
Set of lookup key entries in the KonaKart Product Cache
|
protected static java.lang.String |
KKSizeCheckMutex
KK Cache Size Check Mutex
|
protected static int |
lastEventProcessed
Index of Last Event Processed
|
protected static java.lang.String |
lastIndexMutex
lastIndexMutex
|
static boolean |
lastIndexSet
Start-up flag for setting lastIndex
|
protected static org.apache.commons.logging.Log |
log
Log
|
protected static java.lang.String |
mutex
Mutex
|
static boolean |
started
Start-up flag
|
protected static java.util.Map<java.lang.String,CacheMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
protected static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> |
staticKKCaches
A Map containing the a Map for each cache
|
templateBaseDir| Modifier and Type | Method and Description |
|---|---|
protected void |
checkKonaKartCacheSize(java.lang.String cacheName,
java.util.Map<java.lang.String,java.lang.Object> kkCache)
Ensure the KonaKart Product Cache is not bigger than the maximum defined size
|
void |
dumpCacheStatus(java.lang.String cacheName)
Dump details of the named cache
|
void |
flush(java.lang.String cacheName)
Flush/Clear the specified cache.
|
void |
flushProduct(int productId)
Flush a single product from the caches
|
java.lang.Object |
get(java.lang.String cacheName,
java.lang.String key)
Get an object from the specified cache with the specified key
|
int |
getCacheType()
Get the Cache Type being used
|
static int |
getLastEventProcessed() |
boolean |
isCacheMgrStarted()
Is CacheMgr started up?
|
boolean |
isCachingEnabled()
Is global caching enabled
|
void |
processEvents()
Reads and executes the KKEvents
|
void |
put(java.lang.String cacheName,
java.lang.String key,
java.lang.Object value)
Put an object into the specified cache with the specified key
|
void |
refreshConfigs()
Refresh the manager's configuration.
|
void |
remove(java.lang.String cacheName,
java.lang.String key)
Remove the object from the specified cache with the specified key
|
static void |
setCachingEnabled(boolean cachingEnabled) |
static void |
setLastEventProcessed(int lastEventProcessed) |
void |
setLastIndex()
If the lastEventProcessed Index is -1 (hasn't yet been set) we set it to the highest index in
the events table.
|
void |
shutdown()
Shutdown the Caches
|
void |
startup()
Start up the Caches
|
boolean |
useEhcache()
Use Ehcache?
|
acquireLock, addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkRequired, escapeHTML, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, getAdminEngMgr, getBasketMgr, getBillingMgr, getBookableProductMgr, getCacheMgr, getCatMgr, getConfigMgr, getCookieMgr, getCurrMgr, getCustMgr, getCustomerIdFromSession, getCustomerStatsMgr, getCustomerTagMgr, getEmailMgr, getEng, getEventMgr, getExportMgr, getHTMLEscaper, getKonaKartConfig, getKonaKartConfig, getKonaKartConfig, getLangMgr, getManuMgr, getMiscItemMgr, getMiscPriceMgr, getMode, getModeString, getMqMgr, getMultiStoreMgr, getNewCriteria, getNewCriteria, getOrderIntegrationMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getProductsToCategoresCriteria, getPromMgr, getPunchOutMgr, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getStoreMgr, getStoreTime, getSuggestionMgr, getTaxMgr, getTemplate, getTemplateRoot, getVelocityContextMgr, getWishListMgr, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isClassPresent, isCommunity, isDeadlockException, isEnterprise, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreSharedDb, isMultiStoreShareProducts, isMultiVendor, isUnix, manageThrowable, releaseLock, updateStaticVariablesNowprotected static org.apache.commons.logging.Log log
protected static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> staticKKCaches
public static int cacheType
public static boolean started
public static boolean lastIndexSet
protected static java.lang.String mutex
protected static java.lang.String lastIndexMutex
protected static java.lang.String KKSizeCheckMutex
protected static java.lang.String KKProdCacheQMutex
protected static int lastEventProcessed
protected static java.util.Map<java.lang.String,CacheMgr.StaticData> staticDataHM
protected static java.util.LinkedList<java.lang.String> kkProdCacheQueue
protected static java.util.Set<java.lang.String> kkProdCacheSet
public CacheMgr(KKEngIf eng) throws java.lang.Exception
eng - the engjava.lang.Exception - an unexpected exceptionpublic void startup()
CacheMgrIfstartup in interface CacheMgrIfpublic boolean useEhcache()
CacheMgrIfuseEhcache in interface CacheMgrIfpublic void shutdown()
CacheMgrIfshutdown in interface CacheMgrIfpublic java.lang.Object get(java.lang.String cacheName,
java.lang.String key)
CacheMgrIfget in interface CacheMgrIfcacheName - name of the cachekey - key of the object to getpublic void remove(java.lang.String cacheName,
java.lang.String key)
CacheMgrIfremove in interface CacheMgrIfcacheName - name of the cachekey - key of the object to removepublic void put(java.lang.String cacheName,
java.lang.String key,
java.lang.Object value)
CacheMgrIfput in interface CacheMgrIfcacheName - name of the cachekey - key of the object to putvalue - value to putprotected void checkKonaKartCacheSize(java.lang.String cacheName,
java.util.Map<java.lang.String,java.lang.Object> kkCache)
cacheName - the cacheNamekkCache - the kkCachepublic void flush(java.lang.String cacheName)
CacheMgrIfflush in interface CacheMgrIfcacheName - the cacheNamepublic void flushProduct(int productId)
CacheMgrIfflushProduct in interface CacheMgrIfproductId - the productIdpublic void processEvents()
throws java.lang.Exception
processEvents in interface CacheMgrIfjava.lang.Exception - an unexpected exceptionpublic void refreshConfigs()
throws java.lang.Exception
refreshConfigs in interface CacheMgrIfjava.lang.Exception - an unexpected exceptionpublic void dumpCacheStatus(java.lang.String cacheName)
dumpCacheStatus in interface CacheMgrIfcacheName - the cacheNamepublic int getCacheType()
CacheMgrIfgetCacheType in interface CacheMgrIfpublic void setLastIndex()
public static int getLastEventProcessed()
public static void setLastEventProcessed(int lastEventProcessed)
lastEventProcessed - the lastEventProcessed to setpublic boolean isCachingEnabled()
CacheMgrIfisCachingEnabled in interface CacheMgrIfpublic static void setCachingEnabled(boolean cachingEnabled)
cachingEnabled - the cachingEnabled to setpublic boolean isCacheMgrStarted()
CacheMgrIfisCacheMgrStarted in interface CacheMgrIfCopyright © 2018 DS Data Systems UK Ltd.