@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()
ConfigStorageAPIclearCache in interface ConfigStorageAPIpublic java.util.Map<java.lang.String,java.lang.String> getDbProperties()
ConfigStorageAPIgetDbProperties in interface ConfigStorageAPIpublic java.lang.String getDbProperty(java.lang.String name)
ConfigStorageAPIgetDbProperty in interface ConfigStorageAPIname - property namepublic void setDbProperty(java.lang.String name,
java.lang.String value)
ConfigStorageAPIIf 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 ConfigStorageAPIname - property namevalue - property value