public class ClConConfigRepository extends ConfigRepository<ClusterRepoItem> implements ShutdownHook
Repository.Meta| Modifier and Type | Field and Description |
|---|---|
protected long |
autoreload_interval |
static String |
AUTORELOAD_INTERVAL_PROP_KEY
Field description
|
static long |
AUTORELOAD_INTERVAL_PROP_VAL
Field description
|
protected long |
lastReloadTime |
protected long |
lastReloadTimeFactor |
items, itemsHashCOMP_REPO_BIND| Constructor and Description |
|---|
ClConConfigRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Method destroys this instance of ComponentRepository releasing resources
allocated for this instance of ComponentRepository if possible
|
String |
getConfigKey()
Method description
|
String[] |
getDefaultPropetyItems()
Method description
|
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.
|
ClusterRepoItem |
getItemInstance()
Creates a new, uninitialized instance of the repository Item.
|
String |
getName() |
String |
getPropertyKey()
Method description
|
void |
initRepository(String resource_uri,
Map<String,String> params)
The method is called to initialize the data repository.
|
boolean |
itemChanged(ClusterRepoItem oldItem,
ClusterRepoItem newItem)
Method description
|
void |
itemLoaded(ClusterRepoItem item) |
void |
reload()
This method is called to reload items from the database or other permanent
storage.
|
void |
setProperties(Map<String,Object> props)
The method is called to set configuration for this repository
implementation.
|
String |
shutdown() |
void |
storeItem(ClusterRepoItem item) |
addItem, addItemNoStore, addRepoChangeListener, allItems, contains, getItem, initItemsMap, iterator, removeItem, removeRepoChangeListener, setAutoloadTimer, size, store, toString, validateItemclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final String AUTORELOAD_INTERVAL_PROP_KEY
public static final long AUTORELOAD_INTERVAL_PROP_VAL
protected long autoreload_interval
protected long lastReloadTime
protected long lastReloadTimeFactor
public void destroy()
ComponentRepositorydestroy in interface ComponentRepository<ClusterRepoItem>public String[] getDefaultPropetyItems()
ConfigRepositorygetDefaultPropetyItems in class ConfigRepository<ClusterRepoItem>public String getName()
getName in interface ShutdownHookpublic String getPropertyKey()
ConfigRepositorygetPropertyKey in class ConfigRepository<ClusterRepoItem>public String getConfigKey()
ConfigRepositorygetConfigKey in class ConfigRepository<ClusterRepoItem>public ClusterRepoItem getItemInstance()
ComponentRepositorygetItemInstance in interface ComponentRepository<ClusterRepoItem>public void initRepository(String resource_uri, 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 Repositoryresource_uri - 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 reload()
ComponentRepositoryreload in interface ComponentRepository<ClusterRepoItem>reload in class ConfigRepository<ClusterRepoItem>public void itemLoaded(ClusterRepoItem item)
public boolean itemChanged(ClusterRepoItem oldItem, ClusterRepoItem newItem)
ConfigRepositoryitemChanged in class ConfigRepository<ClusterRepoItem>public void getDefaults(Map<String,Object> defs, Map<String,Object> params)
ComponentRepositorygetDefaults 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 setProperties(Map<String,Object> props)
ComponentRepositorysetProperties in interface ComponentRepository<ClusterRepoItem>setProperties in class ConfigRepository<ClusterRepoItem>props - a Map with configuration settings. Content of this
Map must not be modified. This read-only collection.public String shutdown()
shutdown in interface ShutdownHookpublic void storeItem(ClusterRepoItem item)
Copyright © 2016 "Tigase, Inc.". All rights reserved.