|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infoservice.dynamic.DynamicConfiguration
public class DynamicConfiguration
Field Summary | |
---|---|
private IInfoServiceAgreementAdapter |
m_agreementAdapter
|
private int |
m_agreementLogLevel
|
private long |
m_agreementPhaseGap
|
private IDynamicCascadeBuildingStrategy |
m_cascadeBuildingStrategy
|
private long |
m_emcConsensusLogTimeout
|
private long |
m_emcGlobalTimeout
|
private int |
m_hourOfAgreement
|
private static DynamicConfiguration |
m_instance
|
private int |
m_maxCascadeLength
|
private int |
m_minCascadeLength
|
private long |
m_passivePhaseLength
|
private long |
m_paxosRoundTimeout
|
Constructor Summary | |
---|---|
private |
DynamicConfiguration()
Private constructor -> singleton |
Method Summary | |
---|---|
IInfoServiceAgreementAdapter |
getAgreementHandler()
Returns the configured IInfoServiceAgreementAdapter |
int |
getAgreementLogLevel()
Returns the log level to be used for the agreement-specific file log |
long |
getAgreementPhaseGap()
Returns the configured phase gap between commitment and reveal phase in the agreement |
IDynamicCascadeBuildingStrategy |
getCascadeBuildingStrategy()
Returns the strategy for building new cascades |
long |
getEmcConsensusLogTimeout()
Returns the configured consensus log timeout for EMC |
long |
getEmcGlobalTimeout()
Returns the configured global timeout for EMC |
int |
getHourOfAgreement()
Returns the hour in which new cascades should be created, e.g. |
static DynamicConfiguration |
getInstance()
Returns the singleton instance of this class |
int |
getMaxCascadeLength()
Returns the configured max cascade length to be used by the dynamic algorithms |
int |
getMinCascadeLength()
Returns the configured min cascade length to be used by the dynamic algorithms |
long |
getPassivePhaseLength()
Returns the length of the passive phase before the actual agreement |
long |
getPaxosRoundTimeout()
Returns the configured round timeout for paxos |
private int |
parseInt(java.lang.String a_str,
int a_default)
Parses the given string to an int value. |
private int |
parseLogLevel(java.lang.String logLevel)
Takes a string and returns a LogLevel. |
private long |
parseLong(java.lang.String a_str,
long a_default)
Parses the given string to a long value. |
void |
readConfiguration(java.util.Properties a_properties)
Reads the configuration values out of the given Properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private long m_emcGlobalTimeout
private long m_agreementPhaseGap
private long m_emcConsensusLogTimeout
private long m_paxosRoundTimeout
private int m_minCascadeLength
private int m_maxCascadeLength
private int m_hourOfAgreement
private long m_passivePhaseLength
private IInfoServiceAgreementAdapter m_agreementAdapter
private IDynamicCascadeBuildingStrategy m_cascadeBuildingStrategy
private int m_agreementLogLevel
private static final DynamicConfiguration m_instance
Constructor Detail |
---|
private DynamicConfiguration()
Method Detail |
---|
public static DynamicConfiguration getInstance()
public void readConfiguration(java.util.Properties a_properties)
a_properties
- The Properties holding the configuration valuesprivate int parseLogLevel(java.lang.String logLevel)
logLevel
- The string representing a log4j log level
public IInfoServiceAgreementAdapter getAgreementHandler()
public long getAgreementPhaseGap()
public long getEmcConsensusLogTimeout()
public long getEmcGlobalTimeout()
public long getPaxosRoundTimeout()
public int getMaxCascadeLength()
public int getMinCascadeLength()
private long parseLong(java.lang.String a_str, long a_default)
a_str
- The string to be parseda_default
- The default to be applied if the string is no long
private int parseInt(java.lang.String a_str, int a_default)
a_str
- The string to be parseda_default
- The default to be applied if the string is no int
public int getHourOfAgreement()
public IDynamicCascadeBuildingStrategy getCascadeBuildingStrategy()
public long getPassivePhaseLength()
public int getAgreementLogLevel()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |