com.ibm.commerce.fulfillment.commands

Class ShippingJurisdictionCache

  • All Implemented Interfaces:
    com.ibm.commerce.datatype.CustomProperty


    public class ShippingJurisdictionCache
    extends Cache
    implements com.ibm.commerce.datatype.CustomProperty
    This MRU cache caches ShippingJurisdictionIds by AddressId.
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The IBM copyright string.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ShippingJurisdictionCache

        public ShippingJurisdictionCache(CommandContext aCommandContext)
        Constructs a ShippingJurisdictionCache with the default cache size.
        Parameters:
        aCommandContext - The command context as CommandContext object.
      • ShippingJurisdictionCache

        public ShippingJurisdictionCache(CommandContext aCommandContext,
                                         int anCacheSize)
        Constructs a ShippingJurisdictionCache with the specified cache size.
        Parameters:
        aCommandContext - The command context as CommandContext object.
        anCacheSize - the cache size
    • Method Detail

      • getInstance

        public static ShippingJurisdictionCache getInstance(CommandContext aCommandContext)
        Returns the instance from the command context. Creates one in the command context if one is not there already.
        Parameters:
        aCommandContext - The command context as CommandContext object.
        Returns:
        the instance from the command context.
      • releaseInstance

        public static void releaseInstance(CommandContext aCommandContext)
        Releases the instance from the command context, if there is one in the command context.
        Parameters:
        aCommandContext - The command context as CommandContext object.
      • clear

        public void clear()
        Removes all data from this instance, including the command context. After this method is called, do not attempt to use this instance, since calls to getJurisdictionIds will fail.
        Specified by:
        clear in interface com.ibm.commerce.datatype.CustomProperty
        Overrides:
        clear in class Cache
      • getJurisdictionIds

        public java.lang.Integer[] getJurisdictionIds(ShippingJurisdictionCache.Key aKey)
                                               throws ECException
        Returns the JurisdictionIds associated with the Store and Address indicated by aKey.
        Parameters:
        aKey - indicates the Store and Address.
        Returns:
        the JurisdictionIds.
        Throws:
        ECException