public class ClConSQLRepository extends ClConConfigRepository implements ClusterRepoConstants, ComponentRepositoryDataSourceAware<ClusterRepoItem,DataRepository>, RepositoryVersionAware
Repository.Meta, Repository.SchemaId
RepositoryVersionAware.SchemaVersion
auto_remove_obsolete_items, firstLoadDone, lastReloadTime, lastReloadTimeFactor
autoReloadInterval, items, itemsHash
CPU_USAGE_COLUMN, HOSTNAME_COLUMN, LASTUPDATE_COLUMN, MEM_USAGE_COLUMN, PASSWORD_COLUMN, PORT_COLUMN, REPO_URI_PROP_KEY, SECONDARY_HOSTNAME_COLUMN, TABLE_NAME
COMP_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)
Deprecated.
|
void |
initRepository(String conn_str,
Map<String,String> params)
Deprecated.
|
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 |
setDataSource(DataRepository data_repo)
Method called to provide class with instance of a data source.
|
void |
setProperties(Map<String,Object> properties)
Deprecated.
|
void |
store()
The method is called to store all data in the database.
|
void |
storeItem(ClusterRepoItem item) |
beforeUnregister, getConfigKey, getDefaultPropetyItems, getItemInstance, getName, getPropertyKey, initialize, itemChanged, itemLoaded, removeObsoloteItems, shutdown
addItem, addItemNoStore, addRepoChangeListener, allItems, contains, getDefaultItems, getItem, getItemsOld, initItemsMap, isInitialized, iterator, removeItemNoStore, removeRepoChangeListener, setAutoloadTimer, setAutoReloadInterval, setItemsOld, size, toString, validateItem
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addItem, addItemNoStore, addRepoChangeListener, allItems, contains, getItem, getItemInstance, removeItemNoStore, removeRepoChangeListener, setAutoloadTimer, size, validateItem
forEach, iterator, spliterator
getVersion, updateSchema
public void destroy()
ComponentRepository
destroy
in interface ComponentRepository<ClusterRepoItem>
destroy
in class ClConConfigRepository
@Deprecated public void getDefaults(Map<String,Object> defs, Map<String,Object> params)
ComponentRepository
getDefaults
in interface ComponentRepository<ClusterRepoItem>
getDefaults
in class ConfigRepository<ClusterRepoItem>
defs
- 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 setDataSource(DataRepository data_repo)
DataSourceAware
setDataSource
in interface DataSourceAware<DataRepository>
@Deprecated public void initRepository(String conn_str, Map<String,String> params) throws DBInitException
Repository
resource_uri
parameter as the database connection string or via
params
map if the required repository parameters are more complex or both.initRepository
in interface Repository
initRepository
in class ClConConfigRepository
conn_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)
ComponentRepository
removeItem
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 ClConConfigRepository
public void reload()
ComponentRepository
reload
in interface ComponentRepository<ClusterRepoItem>
reload
in class ClConConfigRepository
@Deprecated public void setProperties(Map<String,Object> properties)
ComponentRepository
setProperties
in interface ComponentRepository<ClusterRepoItem>
setProperties
in class ConfigRepository<ClusterRepoItem>
properties
- a Map
with configuration settings. Content of this Map
must not be
modified. This read-only collection.public void store()
ComponentRepository
store
in interface ComponentRepository<ClusterRepoItem>
store
in class ConfigRepository<ClusterRepoItem>
Copyright © 2004–2021 "Tigase, Inc.". All rights reserved.