@Component(value="cuba_ConfigStorage") public class ConfigStorage extends java.lang.Object implements ConfigStorageAPI
NAME
Constructor and Description |
---|
ConfigStorage() |
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clear properties cache.
|
java.util.Map<java.lang.String,java.lang.String> |
getDbProperties()
Loads all properties stored in the database.
|
java.lang.String |
getDbProperty(java.lang.String name)
Loads a property from the database.
|
void |
setClusterManager(ClusterManagerAPI clusterManager) |
void |
setDbProperty(java.lang.String name,
java.lang.String value)
Saves a property into the database.
|
@Inject public void setClusterManager(ClusterManagerAPI clusterManager)
public void clearCache()
ConfigStorageAPI
clearCache
in interface ConfigStorageAPI
public java.util.Map<java.lang.String,java.lang.String> getDbProperties()
ConfigStorageAPI
getDbProperties
in interface ConfigStorageAPI
public java.lang.String getDbProperty(java.lang.String name)
ConfigStorageAPI
getDbProperty
in interface ConfigStorageAPI
name
- property namepublic void setDbProperty(java.lang.String name, java.lang.String value)
ConfigStorageAPI
If an active transaction exists, it will be used without creating a new one. This allows you to include saving properties into your business logic. If you want to separate the property saving, just start a new transaction prior to calling this method.
setDbProperty
in interface ConfigStorageAPI
name
- property namevalue
- property value