public class TdbControlCacheManager extends TdbSessionObject implements 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.
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
getCacheThesaurusDesigns()
Checks if thesaurus designs should be cached.
|
TdbDatabaseClusterDesign |
getClusterDesign(java.lang.String name)
Get the design for the named database cluster.
|
java.util.List<java.lang.String> |
getClusterNames()
Get a read-only list with the names of the database clusters the
current user has some kind of access to.
|
TdbDatabaseAccess |
getDatabaseAccess(java.lang.String database)
Get the current user's access rights to the named database.
|
TdbControlObject |
getDatabaseControlObject(java.lang.String database)
Get the TdbControlObject that briefly describe the named database.
|
TdbDatabaseDesign |
getDatabaseDesign(java.lang.String name)
Get the design for the named database.
|
TdbDatabaseList |
getDatabaseList()
Get the list of databases that the current user has some access to.
|
java.util.List<java.lang.String> |
getDatabaseNames()
Get a read-only list with the names of the databases the current user
has some kind of access to.
|
TdbOutputFormatList |
getOutputFormats(java.lang.String database)
Get a list of the output formats associated with the specified datbase.
|
TdbProcedureList |
getProcedureList()
Get a list of procedures owned by the currently logged on user.
|
TdbProcedureList |
getProcedureList(boolean reload)
Get a list of procedures owned by the currently logged on user.
|
boolean |
getResolveClusters()
Checks if database cluster designs with nested clusters will be fully
be resolved into their constituent member databases when retrieved.
|
java.util.List<java.lang.String> |
getThesaurusNames()
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.
|
cancel, getSession, isCancelable, setCancelable
public void clear()
public void load(boolean bulkload) throws TdbException
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.
bulkload
- Set to true to use bulk loading of designs if available.TdbException
- If the preload operation failed to retrieve data from the server.public void load() throws TdbException
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.
TdbException
- If the preload operation failed to retrieve data from the server.public void setResolveClusters(boolean resolve)
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.
public boolean getResolveClusters()
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.
public void setCacheThesaurusDesigns(boolean enable)
Default is false. If enabled, the database designs of thesauri are available as database designs.
public boolean getCacheThesaurusDesigns()
Default is false. If enabled, the database designs of thesauri are available as database designs.
public TdbDatabaseList getDatabaseList() throws TdbException
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.
TdbException
- If the operation failed to retrieve data from the server.public java.util.List<java.lang.String> getDatabaseNames() throws TdbException
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.
TdbException
- If the operation failed to retrieve data from the server.public java.util.List<java.lang.String> getThesaurusNames() throws TdbException
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.
TdbException
- If the operation failed to retrieve data from the server.public java.util.List<java.lang.String> getClusterNames() throws TdbException
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.
TdbException
- If the operation failed to retrieve data from the server.public TdbControlObject getDatabaseControlObject(java.lang.String database) throws TdbException
This operation will only result in a request to TRIPsystem if the database list has not yet been cached.
TdbException
- If the operation failed to retrieve data from the server.public TdbDatabaseAccess getDatabaseAccess(java.lang.String database) throws TdbException
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.
TdbException
- If the operation failed to retrieve data from the server.public TdbDatabaseDesign getDatabaseDesign(java.lang.String name) throws TdbException
This operation will only result in a request to TRIPsystem if the database list or the design for database has not yet been cached.
TdbException
- If the operation failed to retrieve data from the server.public TdbDatabaseClusterDesign getClusterDesign(java.lang.String name) throws TdbException
This operation will only result in a request to TRIPsystem if the database list or the design for database has not yet been cached.
TdbException
- If the operation failed to retrieve data from the server.TdbControlCacheManager.getResolveClusters()
,
TdbControlCacheManager.setResolveClusters(boolean)
public TdbOutputFormatList getOutputFormats(java.lang.String database) throws TdbException
TdbException
- If the operation failed to retrieve the list from the serverpublic TdbProcedureList getProcedureList(boolean reload) throws TdbException
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.
reload
- Pass true to reload the list from the serverTdbException
- If the operation failed to retrieve the list from the serverpublic TdbProcedureList getProcedureList() throws TdbException
TdbException
- If the operation failed to retrieve the list from the server