public class InventoryCacheAdapter extends java.lang.Object implements CacheAdapter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
Constructor and Description |
---|
InventoryCacheAdapter() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getCacheElement(java.lang.Object pKey)
Gets the object to be stored in the cache with the given key.
|
java.lang.Object[] |
getCacheElements(java.lang.Object[] pKeys)
Returns the array of elements corresponding to the given array of
keys, in the same order as the keys in the input array.
|
int |
getCacheElementSize(java.lang.Object pElement,
java.lang.Object pKey)
Determines the approximate size in bytes of the given cache
element.
|
int |
getCacheKeySize(java.lang.Object pKey)
Determines the approximate size in bytes of the given cache key.
|
java.lang.String |
getDelimiter() |
InventoryManager |
getUncachedInventoryManager()
Get property UncachedInventoryManager
|
void |
removeCacheElement(java.lang.Object pElement,
java.lang.Object pKey)
This method is called by the synchronized method Cache.remove to
allow the adapter to do any related clean up, if necessary, when
an element is removed from the cache.
|
void |
setDelimiter(java.lang.String pDelimiter) |
void |
setUncachedInventoryManager(InventoryManager pUncachedInventoryManager)
Set property UncachedInventoryManager
|
public void setDelimiter(java.lang.String pDelimiter)
public java.lang.String getDelimiter()
public void setUncachedInventoryManager(InventoryManager pUncachedInventoryManager)
pUncachedInventoryManager
- new value to setpublic InventoryManager getUncachedInventoryManager()
public java.lang.Object getCacheElement(java.lang.Object pKey) throws java.lang.Exception
getCacheElement
in interface CacheAdapter
pKey
- the key to get a value forjava.lang.Exception
- if some form of exception occurs while
attempting to retrieve the element (e.g., SQLException). Since
the type of exceptions possible depend upon the implementation of
the adapter, the interface allows for generic exceptions.public java.lang.Object[] getCacheElements(java.lang.Object[] pKeys) throws java.lang.Exception
getCacheElements
in interface CacheAdapter
java.lang.Exception
- if some form of exception occurs while
attempting to retrieve the elements (e.g., SQLException). Since
the type of exceptions possible depend upon the implementation of
the adapter, the interface allows for generic exceptions.public int getCacheKeySize(java.lang.Object pKey)
getCacheKeySize
in interface CacheAdapter
public int getCacheElementSize(java.lang.Object pElement, java.lang.Object pKey)
getCacheElementSize
in interface CacheAdapter
public void removeCacheElement(java.lang.Object pElement, java.lang.Object pKey)
removeCacheElement
in interface CacheAdapter