java.lang.Object | +--com.ibm.commerce.order.calculation.Cache | +--com.ibm.commerce.fulfillment.commands.ShippingJurisdictionCache
This MRU cache caches ShippingJurisdictionIds by AddressId.
Nested Class Summary | |
---|---|
static class |
ShippingJurisdictionCache.Key Key class of ShippingJurisdictionCache. |
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT The IBM copyright string. |
Fields inherited from class com.ibm.commerce.order.calculation. Cache |
DEFAULT_MAX_SIZE |
Constructor Summary | |
---|---|
ShippingJurisdictionCache(
CommandContext aCommandContext) Constructs a ShippingJurisdictionCache with the default cache size. | |
ShippingJurisdictionCache(
CommandContext aCommandContext, int anCacheSize) Constructs a ShippingJurisdictionCache with the specified cache size. |
Method Summary | |
---|---|
static
ShippingJurisdictionCache |
getInstance(
CommandContext aCommandContext) Returns the instance from the command context. |
java.lang.Integer[] |
getJurisdictionIds(
ShippingJurisdictionCache.Key aKey) Returns the JurisdictionIds associated with the Store and Address indicated by aKey. |
protected
int |
getSize(java.lang.Object aValue) Returns a number of ShippingJurisdictionIds in the specified array. |
protected
java.lang.Object |
miss(java.lang.Object aKey) Returns an array of ShippingJurisdictionIds for the specified addressId. |
static void |
releaseInstance(
CommandContext aCommandContext) Releases the instance from the command context, if there is one in the command context. |
Methods inherited from class com.ibm.commerce.order.calculation. Cache |
clear,
get,
remove,
setMaxSize,
setSize,
toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait,
wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public ShippingJurisdictionCache(CommandContext aCommandContext)
aCommandContext
- The command context as
CommandContext
object.public ShippingJurisdictionCache(CommandContext aCommandContext, int anCacheSize)
aCommandContext
- The command context as
CommandContext
object.anCacheSize
- the cache sizeMethod Detail |
---|
public static ShippingJurisdictionCache getInstance(CommandContext aCommandContext)
aCommandContext
- The command context as
CommandContext
object.public static void releaseInstance(CommandContext aCommandContext)
aCommandContext
- The command context as
CommandContext
object.public java.lang.Integer[] getJurisdictionIds(ShippingJurisdictionCache.Key aKey) throws ECException
aKey
- indicates the Store and Address.ECException
protected java.lang.Object miss(java.lang.Object aKey) throws ECException
miss
in class
Cache
aKey
- the key (ShippingJurisdictionCache.Key)ECException
Cache.miss(Object)
protected int getSize(java.lang.Object aValue)
getSize
in class
Cache
aValue
- the array of ShippingJurisdictionIds.