SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Base class for user-defined metadata cache managers. More...
#include <rw/db/cachemgr.h>
Public Member Functions | |
virtual | ~RWDBCacheManager () |
virtual RWDBStoredProcEntry | getStoredProc (const RWCString &key) const |
virtual RWDBTableEntry | getTable (const RWCString &key) const |
virtual void | setStoredProc (const RWCString &key, const RWDBStoredProcEntry &spEntry) |
virtual void | setTable (const RWCString &key, const RWDBTableEntry &tableEntry) |
Protected Member Functions | |
RWDBCacheManager () | |
RWDBCacheManager (const RWDBCacheManager &) | |
RWDBCacheManager is a base class for implementing the caching of schema metadata. The types of metadata that is cached are defined RWDBTableEntry and RWDBStoredProcEntry. Caching this data allows the program to create and use RWDBTable and RWDBStoredProc ojects with fewer queries to the database.
Install an instance of a cache manager class derived from RWDBCacheManager, in only one instance of RWDBDatabase. A cache manager instance may not be shared with multiple RWDBDatabase instances. If you need to access the currently installed cache manager, acquire the global lock to the RWDBDatabase and then release it when done via the methods RWDBDatabase::acquire() and RWDBDatabase::release(). The cache manager must remain in scope for the lifetime of the RWDBDatabase instance in which it is installed.
Please refer to the DB Interface Module User's Guide and the applicable DB Access Module User's Guide for more information on caching metadata.
|
virtual |
Destructor.
|
protected |
Default constructor.
|
protected |
Copy constructor.
|
virtual |
This method is called whenever we need any stored procedure metadata from the cache. If the key is not in the cache, this method returns an empty RWDBStoredProcEntry. The key is the return value of RWDBStoredProc::name().
The default implementation returns an empty RWDBStoredProcEntry.
Reimplemented in RWDBInMemoryCacheManager.
|
virtual |
This method is called whenever we need any table metadata from the cache. If the key is not in the cache, this method returns an empty RWDBTableEntry. The key is the return value of RWDBTable::name().
The default implementation returns an empty RWDBTableEntry.
Reimplemented in RWDBInMemoryCacheManager.
|
virtual |
This method is called whenever we have fetched any stored procedure metadata from the database and need to cache it. The key is the return value of RWDBStoredProc::name(), and the spEntry contains all stored procedure metadata.
The default implementation is a no-op.
Reimplemented in RWDBInMemoryCacheManager.
|
virtual |
This method is called whenever we have fetched any table metadata from the database and need to cache it. The key is the return value of RWDBTable::name(), and the tableEntry contains all table metadata.
The default implementation is a no-op.
Reimplemented in RWDBInMemoryCacheManager.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |