com.ibm.commerce.inventory.facade.server.memorycache

Class InventoryAvailabilityMemoryCache

  • java.lang.Object
    • com.ibm.commerce.inventory.facade.server.memorycache.InventoryAvailabilityMemoryCache


  • public class InventoryAvailabilityMemoryCache
    extends java.lang.Object
    This class caches the inventory catalog entry items from the external DOM system. To get the instance of this class, the static method InventoryMemoryCache.getInventoryMemoryCache() is called.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASSNAME
      Class name.
      static java.lang.String COPYRIGHT
      IBM Copyright notice field.
      static java.lang.String INVENTORY_CACHE_NAME
      The inventory availability cache jndi name.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void clear()
      Clear all the object from the cache.
      InventoryAvailabilityType getInventory(java.lang.Object iaiKey)
      This method retrieves an InventoryAvailabilityType from the cache.
      static InventoryAvailabilityMemoryCache instance()
      This method gets the singleton instance of InventoryMemoryCache, which should be initialized.
      void invalidate(java.lang.Object iaiKey)
      Invalidates the InventoryAvailability noun corresponding to the cache key.
      static void shutdown()
      Call this method when the WC application is being shut down.
      void updateInventory(java.lang.Object iaiKey, java.lang.Object iatValue)
      This method updates the Inventory Cache when getting an update from InventoryAvailabilityType from the backend DOM system.
      void updateInventory(java.lang.Object iaiKey, java.lang.Object iatValue, int priority, int ttl)
      Update the inventory cache entry.
      void updateInventory(java.lang.Object iaiKey, java.lang.Object iatValue, int priority, int ttl, int sharingPolicy, java.lang.Object[] dependencyIds)
      Update the inventory cache entry.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • INVENTORY_CACHE_NAME

        public static final java.lang.String INVENTORY_CACHE_NAME
        The inventory availability cache jndi name.
        See Also:
        Constant Field Values
    • Method Detail

      • instance

        public static InventoryAvailabilityMemoryCache instance()
        This method gets the singleton instance of InventoryMemoryCache, which should be initialized.
        Returns:
        the singleton instance of InventoryMemoryCache.
      • shutdown

        public static void shutdown()
        Call this method when the WC application is being shut down.
      • invalidate

        public void invalidate(java.lang.Object iaiKey)
        Invalidates the InventoryAvailability noun corresponding to the cache key.
        Parameters:
        iaiKey - The cache key.
      • getInventory

        public InventoryAvailabilityType getInventory(java.lang.Object iaiKey)
        This method retrieves an InventoryAvailabilityType from the cache.
        Parameters:
        iaiKey - InventoryAvailabilityIdentifierType type, the key.
        Returns:
        an item of the InventoryAvailabilityType if found in the cache and valid; null if not found in the cache or invalid.
      • updateInventory

        public void updateInventory(java.lang.Object iaiKey,
                                    java.lang.Object iatValue)
        This method updates the Inventory Cache when getting an update from InventoryAvailabilityType from the backend DOM system.
        Parameters:
        iaiKey - the key for update.
        iatValue - the value for udpate.
      • updateInventory

        public void updateInventory(java.lang.Object iaiKey,
                                    java.lang.Object iatValue,
                                    int priority,
                                    int ttl)
        Update the inventory cache entry.
        Parameters:
        iaiKey - the key for the update.
        iatValue - the value for the update.
        priority - the priority of the cache entry item.
        ttl - the time to live for the cache entry item.
      • updateInventory

        public void updateInventory(java.lang.Object iaiKey,
                                    java.lang.Object iatValue,
                                    int priority,
                                    int ttl,
                                    int sharingPolicy,
                                    java.lang.Object[] dependencyIds)
        Update the inventory cache entry.
        Parameters:
        iaiKey - the key for the update.
        iatValue - the value for the update.
        priority - the priority of the cache entry item.
        ttl - the time to live for the cache entry item.
        sharingPolicy - the sharingPolicy for the cache item, the values should be: EntryInfo.NOT_SHARED, EntryInfo.SHARED_PUSH, and EntryInfo.SHARED_PUSH_PULL
        dependencyIds - an optional set of dependency ids to associate with the cache entry.
      • clear

        public void clear()
        Clear all the object from the cache.