BoxAggregator is no longer an indexed aggregator
This commit is contained in:
@@ -6,11 +6,7 @@ import java.util.UUID;
|
||||
import org.lucares.collections.LongObjHashMap;
|
||||
import org.lucares.recommind.logs.GnuplotAxis;
|
||||
|
||||
public class BoxAggregator implements CustomAggregator, IndexedAggregator {
|
||||
|
||||
private Long index = null;
|
||||
private Long numberOfDataSeries;
|
||||
|
||||
public class BoxAggregator implements CustomAggregator {
|
||||
private final String dataName = "$data" + UUID.randomUUID().toString().replace("-", "");
|
||||
|
||||
private final Interval interval;
|
||||
@@ -43,28 +39,6 @@ public class BoxAggregator implements CustomAggregator, IndexedAggregator {
|
||||
return Aggregate.BOX;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIndex(final long index, final long numberOfDataSeries) {
|
||||
this.index = index;
|
||||
this.numberOfDataSeries = numberOfDataSeries;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getIndex() throws IllegalStateException {
|
||||
if (this.index == null) {
|
||||
throw new IllegalStateException("index was not set");
|
||||
}
|
||||
return this.index;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getNumberOfDataSeries() throws IllegalStateException {
|
||||
if (this.numberOfDataSeries == null) {
|
||||
throw new IllegalStateException("index was not set");
|
||||
}
|
||||
return this.numberOfDataSeries;
|
||||
}
|
||||
|
||||
public Object getDataName() {
|
||||
return dataName;
|
||||
}
|
||||
|
||||
@@ -83,24 +83,7 @@ public class BoxChartHandler extends AggregateHandler {
|
||||
}
|
||||
|
||||
private double width(final IntervalTimeUnit intervalTimeUnit) {
|
||||
switch (intervalTimeUnit) {
|
||||
case SECOND:
|
||||
return 1;
|
||||
case MINUTE:
|
||||
return 60;
|
||||
case HOUR:
|
||||
return 3600;
|
||||
case DAY:
|
||||
return 86400;
|
||||
case WEEK:
|
||||
return 24 * 3600;
|
||||
case MONTH:
|
||||
return 30 * 24 * 3600;
|
||||
case YEAR:
|
||||
return 365 * 24 * 3600;
|
||||
default:
|
||||
throw new IllegalArgumentException("Unexpected value: " + this);
|
||||
}
|
||||
return intervalTimeUnit.toMillis() / 1000;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user