Newest version 1.7.4

This commit is contained in:
lishid
2012-02-06 13:13:54 -05:00
parent faed001041
commit 2c7655424c
4 changed files with 49 additions and 19 deletions

View File

@@ -1,5 +1,4 @@
package lishid.openinv.utils;
/*
* Copyright 2011 Tyler Blair. All rights reserved.
*
@@ -72,6 +71,12 @@ public class Metrics {
*/
public abstract int getValue();
/**
* Called after the website graphs have been updated
*/
public void reset() {
}
@Override
public int hashCode() {
return getColumnName().hashCode() + getValue();
@@ -92,7 +97,7 @@ public class Metrics {
/**
* The metrics revision number
*/
private final static int REVISION = 3;
private final static int REVISION = 4;
/**
* The base url of the metrics domain
@@ -242,6 +247,15 @@ public class Metrics {
if (response.startsWith("ERR")){
throw new IOException(response); //Throw the exception
} else {
// Is this the first update this hour?
if (response.contains("OK This is your first update this hour")) {
if (plotters != null) {
for (Plotter plotter : plotters) {
plotter.reset();
}
}
}
}
//if (response.startsWith("OK")) - We should get "OK" followed by an optional description if everything goes right
}