forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p.zzz.test' (head 0f2e109194f1fcc94e8a3f37cbf804446abddeff)
to branch 'i2p.i2p' (head 7bb99f9e0d436cf9923ed17465f15e73c78e7b13)
This commit is contained in:
@ -16,7 +16,7 @@ package net.i2p;
|
||||
public class CoreVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = "0.8.7";
|
||||
public final static String VERSION = "0.8.8";
|
||||
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Core version: " + VERSION);
|
||||
|
@ -32,7 +32,7 @@ public class RateStat {
|
||||
for (int i = 0; i < periods.length; i++) {
|
||||
Rate rate = new Rate(periods[i]);
|
||||
rate.setRateStat(this);
|
||||
_rates.put(rate.getPeriod(),rate);;
|
||||
_rates.put(rate.getPeriod(),rate);
|
||||
}
|
||||
}
|
||||
public void setStatLog(StatLog sl) { _statLog = sl; }
|
||||
@ -75,19 +75,19 @@ public class RateStat {
|
||||
}
|
||||
|
||||
public double getLifetimeAverageValue() {
|
||||
if ( (_rates == null) || (_rates.size() <= 0) ) return 0;
|
||||
if (_rates.isEmpty()) return 0;
|
||||
return _rates.values().iterator().next().getLifetimeAverageValue();
|
||||
}
|
||||
public long getLifetimeEventCount() {
|
||||
if ( (_rates == null) || (_rates.size() <= 0) ) return 0;
|
||||
if (_rates.isEmpty()) return 0;
|
||||
return _rates.values().iterator().next().getLifetimeEventCount();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns rate with requested period if it exists,
|
||||
* otherwise creates new rate with requested period, adds it to list of rates and returns it.
|
||||
* @param period
|
||||
* @return
|
||||
* @param period ms
|
||||
* @return the Rate
|
||||
*/
|
||||
public Rate getRate(long period) {
|
||||
if (_rates.containsKey(period)){
|
||||
@ -103,7 +103,8 @@ public class RateStat {
|
||||
/**
|
||||
* Adds a new rate with the requested period, provided that
|
||||
* a rate with that period does not already exist.
|
||||
* @param period
|
||||
* @param period ms
|
||||
* @since 0.8.8
|
||||
*/
|
||||
public void addRate(long period) {
|
||||
if (!_rates.containsKey(period)){
|
||||
@ -115,7 +116,8 @@ public class RateStat {
|
||||
|
||||
/**
|
||||
* If a rate with the provided period exists, remove it.
|
||||
* @param period
|
||||
* @param period ms
|
||||
* @since 0.8.8
|
||||
*/
|
||||
public void removeRate(long period) {
|
||||
_rates.remove(period);
|
||||
@ -123,8 +125,9 @@ public class RateStat {
|
||||
|
||||
/**
|
||||
* Tests if a rate with the provided period exists within this RateStat.
|
||||
* @param period
|
||||
* @return
|
||||
* @param period ms
|
||||
* @return true if exists
|
||||
* @since 0.8.8
|
||||
*/
|
||||
public boolean containsRate(long period) {
|
||||
return _rates.containsKey(period);
|
||||
|
@ -36,8 +36,8 @@ public class LogConsoleBuffer {
|
||||
lim = Math.max(limit, 4);
|
||||
// Add some extra room to minimize the chance of losing a message,
|
||||
// since we are doing offer() below.
|
||||
_buffer = new LinkedBlockingQueue(limit + 4);
|
||||
_critBuffer = new LinkedBlockingQueue(limit + 4);
|
||||
_buffer = new LinkedBlockingQueue(lim + 4);
|
||||
_critBuffer = new LinkedBlockingQueue(lim + 4);
|
||||
}
|
||||
|
||||
void add(String msg) {
|
||||
|
Reference in New Issue
Block a user