com.ibm.commerce.supplychain.beans

Class ContractStoreRegistry

  • java.lang.Object
    • com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
      • com.ibm.commerce.supplychain.beans.ContractStoreRegistry
  • All Implemented Interfaces:
    com.ibm.commerce.registry.ElementUpdate, com.ibm.commerce.registry.ManagedDynamicCache, com.ibm.commerce.registry.Registry


    public class ContractStoreRegistry
    extends com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
    This registry caches the store which a contract is deployed in. It essentially caches the STORECNTR table with CONTRACT_ID as the index.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      The IBM copyright string.
      static java.lang.String REGISTRY_NAME
      The name of this registry.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ContractStoreRegistry()
      Constructor for ContractStoreRegistry.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object createKey(java.lang.String astrKey)
      No-op.
      java.lang.String createKeyString(com.ibm.commerce.datatype.TypedProperty aTypedProperty)
      No-op.
      static ContractStoreRegistry getInstance()
      Returns the unique instance of this registry.
      void initialize()
      Initializes this registry.
      void populate(com.ibm.commerce.registry.LRUDynamicHashtable aCache)
      No-op.
      void refresh()
      This method refreshes all the elements in the cache.
      java.lang.Object retrieve(java.lang.Object aKey)
      Returns the store which a contract is deployed in.
      void update(java.lang.String action, java.lang.Object key)
      This method updates a cached element.
      • Methods inherited from class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry

        addElement, findObject, getCache, getCacheSize, getElement, getElementCount, getElements, getEvictions, getHits, getKeys, getMisses, getUsedCacheSize, removeAllElements, removeElement, setCache, setCacheSize, setInitialCapacity, setLoadFactor
      • 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
        The IBM copyright string.
        See Also:
        Constant Field Values
      • REGISTRY_NAME

        public static final java.lang.String REGISTRY_NAME
        The name of this registry.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ContractStoreRegistry

        public ContractStoreRegistry()
        Constructor for ContractStoreRegistry.
    • Method Detail

      • createKey

        public java.lang.Object createKey(java.lang.String astrKey)
                                   throws java.lang.Exception
        No-op.
        Specified by:
        createKey in interface com.ibm.commerce.registry.ElementUpdate
        Specified by:
        createKey in class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
        Parameters:
        astrKey -
        Returns:
        null
        Throws:
        java.lang.Exception
        See Also:
        ElementUpdate#createKey(String)
      • createKeyString

        public java.lang.String createKeyString(com.ibm.commerce.datatype.TypedProperty aTypedProperty)
                                         throws java.lang.Exception
        No-op.
        Specified by:
        createKeyString in interface com.ibm.commerce.registry.ElementUpdate
        Specified by:
        createKeyString in class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
        Parameters:
        aTypedProperty -
        Returns:
        null
        Throws:
        java.lang.Exception
        See Also:
        ElementUpdate#createKeyString(TypedProperty)
      • getInstance

        public static ContractStoreRegistry getInstance()
        Returns the unique instance of this registry.
        Returns:
        the instance.
      • initialize

        public void initialize()
                        throws java.lang.Exception
        Initializes this registry.
        Specified by:
        initialize in interface com.ibm.commerce.registry.Registry
        Overrides:
        initialize in class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
        Throws:
        java.lang.Exception
      • populate

        public void populate(com.ibm.commerce.registry.LRUDynamicHashtable aCache)
                      throws java.lang.Exception
        No-op.
        Specified by:
        populate in class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
        Parameters:
        aCache -
        Throws:
        java.lang.Exception
        See Also:
        AbstractManagedDynamicCacheRegistry.populate(LRUDynamicHashtable)
      • refresh

        public void refresh()
                     throws java.lang.Exception
        This method refreshes all the elements in the cache.
        Specified by:
        refresh in interface com.ibm.commerce.registry.Registry
        Overrides:
        refresh in class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
        Throws:
        java.lang.Exception
      • retrieve

        public java.lang.Object retrieve(java.lang.Object aKey)
                                  throws java.lang.Exception
        Returns the store which a contract is deployed in.
        Specified by:
        retrieve in class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
        Parameters:
        aKey - the contract ID (Long).
        Returns:
        the store ID (Integer).
        Throws:
        java.lang.Exception
        See Also:
        AbstractManagedDynamicCacheRegistry.retrieve(Object)
      • update

        public void update(java.lang.String action,
                           java.lang.Object key)
                    throws java.lang.Exception
        This method updates a cached element.
        Specified by:
        update in interface com.ibm.commerce.registry.ElementUpdate
        Overrides:
        update in class com.ibm.commerce.registry.AbstractManagedDynamicCacheRegistry
        Parameters:
        action - The action performed on the registry. For example, a delete or an update.
        key - The cache key.
        Throws:
        java.lang.Exception