forked from I2P_Developers/i2p.i2p
indent on column, update javadoc
(shendaras)
This commit is contained in:
@@ -89,6 +89,7 @@ public class ClientConfig {
|
|||||||
/**
|
/**
|
||||||
* @param peer who we will test against
|
* @param peer who we will test against
|
||||||
* @param us who we are
|
* @param us who we are
|
||||||
|
* @param statFile the file to save stats to
|
||||||
* @param duration how many minutes to keep events for
|
* @param duration how many minutes to keep events for
|
||||||
* @param statFreq how often to write out stats
|
* @param statFreq how often to write out stats
|
||||||
* @param sendFreq how often to send pings
|
* @param sendFreq how often to send pings
|
||||||
@@ -98,7 +99,7 @@ public class ClientConfig {
|
|||||||
* @param averagePeriods list of minutes to summarize over
|
* @param averagePeriods list of minutes to summarize over
|
||||||
*/
|
*/
|
||||||
public ClientConfig(Destination peer, Destination us, String statFile, int duration, int statFreq, int sendFreq,
|
public ClientConfig(Destination peer, Destination us, String statFile, int duration, int statFreq, int sendFreq,
|
||||||
int sendSize, int numHops, String comment, int averagePeriods[]) {
|
int sendSize, int numHops, String comment, int averagePeriods[]) {
|
||||||
_peer = peer;
|
_peer = peer;
|
||||||
_us = us;
|
_us = us;
|
||||||
_statFile = statFile;
|
_statFile = statFile;
|
||||||
@@ -321,7 +322,7 @@ public class ClientConfig {
|
|||||||
String periodsVal = clientConfig.getProperty(PROP_PREFIX + peerNum + PROP_AVERAGEPERIODS);
|
String periodsVal = clientConfig.getProperty(PROP_PREFIX + peerNum + PROP_AVERAGEPERIODS);
|
||||||
|
|
||||||
if ((peerVal == null) || (statFileVal == null) || (statDurationVal == null) || (statFrequencyVal == null)
|
if ((peerVal == null) || (statFileVal == null) || (statDurationVal == null) || (statFrequencyVal == null)
|
||||||
|| (sendFrequencyVal == null) || (sendSizeVal == null)) {
|
|| (sendFrequencyVal == null) || (sendSizeVal == null)) {
|
||||||
if (_log.shouldLog(Log.DEBUG)) {
|
if (_log.shouldLog(Log.DEBUG)) {
|
||||||
_log.debug("Peer number " + peerNum + " does not exist");
|
_log.debug("Peer number " + peerNum + " does not exist");
|
||||||
}
|
}
|
||||||
@@ -337,8 +338,8 @@ public class ClientConfig {
|
|||||||
if ((duration <= 0) || (statFreq <= 0) || (sendFreq <= 0) || (sendSize <= 0)) {
|
if ((duration <= 0) || (statFreq <= 0) || (sendFreq <= 0) || (sendSize <= 0)) {
|
||||||
if (_log.shouldLog(Log.WARN)) {
|
if (_log.shouldLog(Log.WARN)) {
|
||||||
_log.warn("Invalid client config: duration [" + statDurationVal + "] stat frequency ["
|
_log.warn("Invalid client config: duration [" + statDurationVal + "] stat frequency ["
|
||||||
+ statFrequencyVal + "] send frequency [" + sendFrequencyVal + "] send size ["
|
+ statFrequencyVal + "] send frequency [" + sendFrequencyVal + "] send size ["
|
||||||
+ sendSizeVal + "]");
|
+ sendSizeVal + "]");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -402,7 +403,7 @@ public class ClientConfig {
|
|||||||
*/
|
*/
|
||||||
public boolean store(Properties clientConfig, int peerNum) {
|
public boolean store(Properties clientConfig, int peerNum) {
|
||||||
if ((_peer == null) || (_sendFrequency <= 0) || (_sendSize <= 0) || (_statDuration <= 0)
|
if ((_peer == null) || (_sendFrequency <= 0) || (_sendSize <= 0) || (_statDuration <= 0)
|
||||||
|| (_statFrequency <= 0) || (_statFile == null)) { return false; }
|
|| (_statFrequency <= 0) || (_statFile == null)) { return false; }
|
||||||
|
|
||||||
String comment = _comment;
|
String comment = _comment;
|
||||||
if (comment == null) {
|
if (comment == null) {
|
||||||
|
Reference in New Issue
Block a user