public class ClConSQLRepository extends ClConConfigRepository implements ClusterRepoConstants
Repository.Metaautoreload_interval, AUTORELOAD_INTERVAL_PROP_KEY, AUTORELOAD_INTERVAL_PROP_VAL, lastReloadTime, lastReloadTimeFactoritems, itemsHashCPU_USAGE_COLUMN, HOSTNAME_COLUMN, LASTUPDATE_COLUMN, MEM_USAGE_COLUMN, PASSWORD_COLUMN, PORT_COLUMN, REPO_URI_PROP_KEY, TABLE_NAMECOMP_REPO_BIND| Constructor and Description |
|---|
ClConSQLRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Method destroys this instance of ComponentRepository releasing resources
allocated for this instance of ComponentRepository if possible
|
void |
getDefaults(Map<String,Object> defs,
Map<String,Object> params)
The method is called to obtain default configuration settings if there are
any for this repository implementation The configuration settings are
implementation dependent and there are no defaults set by the server.
|
void |
initRepository(String conn_str,
Map<String,String> params)
The method is called to initialize the data repository.
|
void |
reload()
This method is called to reload items from the database or other permanent
storage.
|
void |
removeItem(String key)
The method is called to remove given Item from the memory cache and
permanent storage.
|
void |
setProperties(Map<String,Object> properties)
The method is called to set configuration for this repository
implementation.
|
void |
store()
The method is called to store all data in the database.
|
void |
storeItem(ClusterRepoItem item) |
getConfigKey, getDefaultPropetyItems, getItemInstance, getName, getPropertyKey, itemChanged, itemLoaded, shutdownaddItem, addItemNoStore, addRepoChangeListener, allItems, contains, getItem, initItemsMap, iterator, removeRepoChangeListener, setAutoloadTimer, size, toString, validateItempublic void destroy()
ComponentRepositorydestroy in interface ComponentRepository<ClusterRepoItem>destroy in class ClConConfigRepositorypublic void getDefaults(Map<String,Object> defs, Map<String,Object> params)
ComponentRepositorygetDefaults in interface ComponentRepository<ClusterRepoItem>getDefaults in class ClConConfigRepositorydefs - is a Map collection where all repository
configuration defaults must be put.params - is a Map collection with some preset properties for
the server. These settings can be used to adjust repository
defaults, for example they can contain database connection URL or
initial list of virtual domains.public void initRepository(String conn_str, Map<String,String> params) throws DBInitException
Repositoryresource_uri
parameter as the database connection string or via params map if
the required repository parameters are more complex or both.initRepository in interface RepositoryinitRepository in class ClConConfigRepositoryconn_str - value in most cases representing the database connection string.params - is a Map with repository properties necessary to initialize
and perform all the functions. The initialization parameters are implementation dependent.DBInitException - if there was an error during repository initialization.
Some implementations, though, perform so called lazy initialization so even though there
is a problem with the underlying repository it may not be signaled through this method
call.public void removeItem(String key)
ComponentRepositoryremoveItem in interface ComponentRepository<ClusterRepoItem>removeItem in class ConfigRepository<ClusterRepoItem>key - a String with domain name to remove.public void storeItem(ClusterRepoItem item)
storeItem in class ClConConfigRepositorypublic void reload()
ComponentRepositoryreload in interface ComponentRepository<ClusterRepoItem>reload in class ClConConfigRepositorypublic void setProperties(Map<String,Object> properties)
ComponentRepositorysetProperties in interface ComponentRepository<ClusterRepoItem>setProperties in class ClConConfigRepositoryproperties - a Map with configuration settings. Content of this
Map must not be modified. This read-only collection.public void store()
ComponentRepositorystore in interface ComponentRepository<ClusterRepoItem>store in class ConfigRepository<ClusterRepoItem>Copyright © 2015 "Tigase, Inc.". All rights reserved.