Skip to content

Commit

Permalink
Made PoolQueuePlotData enum compatible with java 8.
Browse files Browse the repository at this point in the history
  • Loading branch information
alrossi committed Oct 16, 2014
1 parent d64ce31 commit 35c97d2
Showing 1 changed file with 2 additions and 26 deletions.
Expand Up @@ -86,10 +86,6 @@ public class PoolQueuePlotData {

public enum PoolQueueHistogram implements RoundRobinDatabaseDatasource {
AMOVER {
public String getSourceName() {
return getSourceName(this);
}

public String getLabel() {
return "active mover";
}
Expand All @@ -99,10 +95,6 @@ public Color getColor() {
}
},
QMOVER {
public String getSourceName() {
return getSourceName(this);
}

public String getLabel() {
return "queued mover";
}
Expand All @@ -112,10 +104,6 @@ public Color getColor() {
}
},
ASTORE {
public String getSourceName() {
return getSourceName(this);
}

public String getLabel() {
return "active store";
}
Expand All @@ -125,10 +113,6 @@ public Color getColor() {
}
},
QSTORE {
public String getSourceName() {
return getSourceName(this);
}

public String getLabel() {
return "queued store";
}
Expand All @@ -138,10 +122,6 @@ public Color getColor() {
}
},
ARESTORE {
public String getSourceName() {
return getSourceName(this);
}

public String getLabel() {
return "active restore";
}
Expand All @@ -151,10 +131,6 @@ public Color getColor() {
}
},
QRESTORE {
public String getSourceName() {
return getSourceName(this);
}

public String getLabel() {
return "queued restore";
}
Expand All @@ -164,12 +140,12 @@ public Color getColor() {
}
};

private static String getSourceName(PoolQueueHistogram histogram) {
public String getSourceName() {
/*
* "!" appended to the datasource name is the Rrd4j convention
* for storing unknown values as 0.0 rather than as NaN.
*/
return histogram.toString() + "!";
return toString() + "!";
}
}

Expand Down

0 comments on commit 35c97d2

Please sign in to comment.