|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.conf.PropertiesManager
public class PropertiesManager
Provides consolidated handling of properties in replicator. Properties consist of static properties read only from replicator.properties and dynamic properties which are settable from client calls and stored in dynamic.properties. Dynamic properties, if set, take precedence over static properties.
This class has synchronization required to ensure properties operations are visible across threads and to prevent property value inconsistencies when writing and reading properties at the same time.
| Constructor Summary | |
|---|---|
PropertiesManager(java.io.File staticPropertiesFile,
java.io.File dynamicPropertiesFile,
java.io.File dynamicRoleFile)
Creates a new PropertiesManager object |
|
| Method Summary | |
|---|---|
void |
clearDynamicProperties()
Clear in-memory dynamic properties and delete on-disk file, if it exists. |
TungstenProperties |
getDynamicProperties()
Return current values of all supported dynamic values. |
TungstenProperties |
getProperties()
Returns current state of properties. |
void |
loadProperties()
|
static TungstenProperties |
loadProperties(java.io.File propsFile)
|
void |
setDynamicProperties(TungstenProperties dynaProps)
Sets one or more dynamic properties after checking we permit them to be set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesManager(java.io.File staticPropertiesFile,
java.io.File dynamicPropertiesFile,
java.io.File dynamicRoleFile)
PropertiesManager object
staticPropertiesFile - File containing static properties
(replicator.properties), which must existdynamicPropertiesFile - File containing dynamic properties, which
does not have to existdynamicRoleFile - File containing dynamic role, which likewise does
not have to exist| Method Detail |
|---|
public void loadProperties()
throws ReplicatorException
ReplicatorExceptionpublic TungstenProperties getProperties()
public void clearDynamicProperties()
throws ReplicatorException
ReplicatorException
public TungstenProperties getDynamicProperties()
throws ReplicatorException
ReplicatorException
public void setDynamicProperties(TungstenProperties dynaProps)
throws ReplicatorException
ReplicatorException
public static TungstenProperties loadProperties(java.io.File propsFile)
throws ReplicatorException
ReplicatorException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||