Class TdbControlCacheManager
- All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink
Applicatons will normally request database design information with a high frequency, either explicitly or implicitly. The cache manager keeps such information locally when possible in order to keep network I/O to a minimum, boosting performance over time.
- Since:
- TRIPjxp 8.2-3
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the cache so that any subsequent retrieval of objects via this TdbControlCacheManager instance will result in requesting fresh versions from the server.boolean
Checks if thesaurus designs should be cached.getClusterDesign
(String name) Get the design for the named database cluster.Get a read-only list with the names of the database clusters the current user has some kind of access to.getDatabaseAccess
(String database) Get the current user's access rights to the named database.getDatabaseControlObject
(String database) Get the TdbControlObject that briefly describe the named database.getDatabaseDesign
(String name) Get the design for the named database.Get the list of databases that the current user has some access to.Get a read-only list with the names of the databases the current user has some kind of access to.getOutputFormats
(String database) Get a list of the output formats associated with the specified datbase.Get a list of procedures owned by the currently logged on user.getProcedureList
(boolean reload) Get a list of procedures owned by the currently logged on user.boolean
Checks if database cluster designs with nested clusters will be fully be resolved into their constituent member databases when retrieved.Get a read-only list with the names of the thesauri the current user has some kind of access to.void
load()
Loads data into the cache using bulk loading when available.void
load
(boolean bulkload) LOads data into the cache with optional bulk loading behavior.void
setCacheThesaurusDesigns
(boolean enable) Determines if thesaurus designs should be cached.void
setResolveClusters
(boolean resolve) Determines if database cluster designs with nested clusters should be fully be resolved into their constituent member databases when retrieved.Methods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject
cancel, getSession, isCancelable, setCancelable
-
Method Details
-
clear
public void clear()Clears the cache so that any subsequent retrieval of objects via this TdbControlCacheManager instance will result in requesting fresh versions from the server. -
load
LOads data into the cache with optional bulk loading behavior.Applications that use CONTROL database objects intensively should preload the cache. When using TRIPsystem 8.2-4 or later, preloading is more effcient due to support for bulk retrieval of database designs instead of requesting each design individually.
When calling this method more than once in the same session, additional calls will result in a full reload. Such reloads are generally only needed if new CONTROL objects have been created during the course of the session that must be used immediatey by the application. For applications that do not manipulate CONTROL object such as database designs, calling this method once per session is enough.
- Parameters:
bulkload
- Set to true to use bulk loading of designs if available.- Throws:
TdbException
- If the preload operation failed to retrieve data from the server.
-
load
Loads data into the cache using bulk loading when available.Applications that use CONTROL database objects intensively should preload the cache. When using TRIPsystem 8.2-4 or later, preloading is more effcient due to support for bulk retrieval of database designs instead of requesting each design individually.
When calling this method more than once in the same session, additional calls will result in a full reload. Such reloads are generally only needed if new CONTROL objects have been created during the course of the session that must be used immediatey by the application. For applications that do not manipulate CONTROL object such as database designs, calling this method once per session is enough.
- Throws:
TdbException
- If the preload operation failed to retrieve data from the server.
-
setResolveClusters
public void setResolveClusters(boolean resolve) Determines if database cluster designs with nested clusters should be fully be resolved into their constituent member databases when retrieved.A fully resolved cluster that contains other clusters as members is not usable for cluster administration. However, for applications that need to know what all indivdual databases in a cluster are, using resolved clusters is highly recommended.
The default setting is true, i.e. to fetch cluster designs as fully resolved.
-
getResolveClusters
public boolean getResolveClusters()Checks if database cluster designs with nested clusters will be fully be resolved into their constituent member databases when retrieved.A fully resolved cluster that contains other clusters as members is not usable for cluster administration. However, for applications that need to know what all indivdual databases in a cluster are, using resolved clusters is highly recommended.
The default setting is true, i.e. to fetch cluster designs as fully resolved.
-
setCacheThesaurusDesigns
public void setCacheThesaurusDesigns(boolean enable) Determines if thesaurus designs should be cached.Default is false. If enabled, the database designs of thesauri are available as database designs.
-
getCacheThesaurusDesigns
public boolean getCacheThesaurusDesigns()Checks if thesaurus designs should be cached.Default is false. If enabled, the database designs of thesauri are available as database designs.
-
getDatabaseList
Get the list of databases that the current user has some access to.The list will be returned from the cache if it is already loaded. If the database list isn't found in the cache, it will first be retrieved from the server into the cache.
- Throws:
TdbException
- If the operation failed to retrieve data from the server.
-
getDatabaseNames
Get a read-only list with the names of the databases the current user has some kind of access to.The list will be returned from the cache if the database list is already loaded. If the database list isn't found in the cache, it will first be retrieved from the server into the cache.
- Returns:
- List of database names
- Throws:
TdbException
- If the operation failed to retrieve data from the server.
-
getThesaurusNames
Get a read-only list with the names of the thesauri the current user has some kind of access to.The list will be returned from the cache if the database list is already loaded. If the database list isn't found in the cache, it will first be retrieved from the server into the cache.
- Returns:
- List of thesaurus names
- Throws:
TdbException
- If the operation failed to retrieve data from the server.
-
getClusterNames
Get a read-only list with the names of the database clusters the current user has some kind of access to.The list will be returned from the cache if the database list is already loaded. If the database list isn't found in the cache, it will first be retrieved from the server into the cache.
- Returns:
- List of cluster names
- Throws:
TdbException
- If the operation failed to retrieve data from the server.
-
getDatabaseControlObject
Get the TdbControlObject that briefly describe the named database.This operation will only result in a request to TRIPsystem if the database list has not yet been cached.
- Returns:
- A TdbControlObject matching the named database, or null if not found.
- Throws:
TdbException
- If the operation failed to retrieve data from the server.
-
getDatabaseAccess
Get the current user's access rights to the named database.This operation will only result in a request to TRIPsystem if the database list or the access rights for the database has not yet been cached.
- Returns:
- A TdbDatabaseAccess object, or null if user has no access to the database.
- Throws:
TdbException
- If the operation failed to retrieve data from the server.
-
getDatabaseDesign
Get the design for the named database.This operation will only result in a request to TRIPsystem if the database list or the design for database has not yet been cached.
- Returns:
- A TdbDatabaseDesign object, or null if the design does not exist or the user has no access to the database.
- Throws:
TdbException
- If the operation failed to retrieve data from the server.
-
getClusterDesign
Get the design for the named database cluster.This operation will only result in a request to TRIPsystem if the database list or the design for database has not yet been cached.
- Returns:
- A TdbDatabaseClusterDesign object, or null if the design does not exist or the user has no access to the database.
- Throws:
TdbException
- If the operation failed to retrieve data from the server.- See Also:
-
getOutputFormats
Get a list of the output formats associated with the specified datbase. Returns the list from the cache if found there, otherwise the list is retrieved from the server.- Returns:
- A TdbOutputFormatList object
- Throws:
TdbException
- If the operation failed to retrieve the list from the server
-
getProcedureList
Get a list of procedures owned by the currently logged on user.The list will be retrieved from the server if not already cached or if the reload parameter is set to true. Otherwise, the list will be returned from the cache.
Setting the reload parameter to true will force the cache manager to reload the list, even if previously cached. Reloading can be useful in a scenario where a procedure has been created for the user in the same session, and that procedure must immediately become available in the procedure list.
- Parameters:
reload
- Pass true to reload the list from the server- Returns:
- A TdbProcedureList object
- Throws:
TdbException
- If the operation failed to retrieve the list from the server
-
getProcedureList
Get a list of procedures owned by the currently logged on user. Returns the list from the cache if found there, otherwise the list is retrieved from the server.- Returns:
- A TdbProcedureList object
- Throws:
TdbException
- If the operation failed to retrieve the list from the server
-