Interface Cache

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addToCache​(CacheObjectKey key, Object entry, boolean force)
      Add key and entry value into the cache.
      Object checkAndUpdateCache​(CacheObjectKey key)
      Check if an entry is found for this key object.
      void clearCache()
      Clear statement cache
      void flushCache()
      Closing all statements in statement cache and flush the statement cache of all the statements.
      int getSize()
      Get the size of statement cache
      boolean isSynchronized()
      Check if the statement cache is synchronized.
      void purge()
      Remove all statements stored in the statement cache after closing the statement objects.
      void purge​(Object entry)
      Remove the specified entry stored in the statement cache after closing the statement object associated with this entry.
    • Method Detail

      • checkAndUpdateCache

        Object checkAndUpdateCache​(CacheObjectKey key)
        Check if an entry is found for this key object. If found, the entry is put in the result object and back into the list.
        Parameters:
        key - whose mapping entry is to be checked.
        Returns:
        result object that contains the key with the entry if not busy or null when (1) object not found in cache (2) object found but is busy
      • addToCache

        void addToCache​(CacheObjectKey key,
                        Object entry,
                        boolean force)
        Add key and entry value into the cache.
        Parameters:
        key - that contains the sql string and its type (PS/CS)
        entry - that is the wrapper of PreparedStatement or CallableStatement
        force - If existing key is to be overwritten
      • clearCache

        void clearCache()
        Clear statement cache
      • purge

        void purge()
        Remove all statements stored in the statement cache after closing the statement objects. Used when the statement cache size exceeds user defined maximum cache size.
      • flushCache

        void flushCache()
        Closing all statements in statement cache and flush the statement cache of all the statements. Used when a physical connection to the underlying resource manager is destroyed.
      • getSize

        int getSize()
        Get the size of statement cache
        Returns:
        int statement cache size
      • isSynchronized

        boolean isSynchronized()
        Check if the statement cache is synchronized.
        Returns:
        boolean synchronized flag.
      • purge

        void purge​(Object entry)
        Remove the specified entry stored in the statement cache after closing the statement object associated with this entry. Used when statement is being reclaimed and is being used for the subsequent requests from the application.
        Parameters:
        entry -