Class OIDTDCacheable

java.lang.Object
org.apache.derby.impl.sql.catalog.TDCacheable
org.apache.derby.impl.sql.catalog.OIDTDCacheable
All Implemented Interfaces:
Cacheable

class OIDTDCacheable extends TDCacheable
This class implements a Cacheable for a DataDictionary cache of table descriptors, with the lookup key being the UUID of the table.
  • Field Details

    • identity

      private UUID identity
  • Constructor Details

  • Method Details

    • clearIdentity

      public void clearIdentity()
      Description copied from interface: Cacheable
      Put the object into the No Identity state.
      MT - single thread required - Method must only be called be cache manager and the cache manager will guarantee only one thread can be calling it.
      See Also:
    • getIdentity

      public Object getIdentity()
      Description copied from interface: Cacheable
      Get the identity of this object.
      MT - thread safe.
      See Also:
    • createIdentity

      public Cacheable createIdentity(Object key, Object createParameter)
      Description copied from interface: Cacheable
      Create a new item.

      Create a new item and set the identity of the object to represent it. The object will be in the No Identity state, ie. it will have just been created or clearIdentity() was just called.
      The object must copy the information out of key, not just store a reference to key if the key is not immutable. After this call the expression getIdentity().equals(key) must return true.

      If the class of the object needs to change (e.g. to support a different format) then the object should create a new object, call its initParameter() with the parameters the original object was called with, set its identity and return a reference to it. The cache manager will discard the reference to the old object.
      If an exception is thrown the object must be left in the no-identity state.
      MT - single thread required - Method must only be called be cache manager and the cache manager will guarantee only one thread can be calling it.

      Returns:
      an object reference if the object can take on the identity, null otherwise.
      See Also:
    • setIdentity

      public Cacheable setIdentity(Object key) throws StandardException
      Description copied from interface: Cacheable
      Set the identity of the object.

      Set the identity of the object to represent an item that already exists, e.g. an existing container. The object will be in the No Identity state, ie. it will have just been created or clearIdentity() was just called.
      The object must copy the information out of key, not just store a reference to key. After this call the expression getIdentity().equals(key) must return true.
      If the class of the object needs to change (e.g. to support a different format) then the object should create a new object, call its initParameter() with the parameters the original object was called with, set its identity and return a reference to it. The cache manager will discard the reference to the old object.
      If an exception is thrown the object must be left in the no-identity state.
      MT - single thread required - Method must only be called be cache manager and the cache manager will guarantee only one thread can be calling it.

      Returns:
      an object reference if the object can take on the identity, null otherwise.
      Throws:
      StandardException - Thrown on error
      See Also: