public void setMaxValue(double maxValue, boolean filterArchivedValues)
		throws IOException, RrdException {
		double minValue = this.minValue.get();
		if(!Double.isNaN(minValue) && !Double.isNaN(maxValue) && minValue >= maxValue) {
			throw new RrdException("Invalid min/max values: " + minValue + "/" + maxValue);
		}
    	this.maxValue.set(maxValue);
		if(!Double.isNaN(maxValue) && filterArchivedValues) {
			int dsIndex = getDsIndex();
			Archive[] archives = parentDb.getArchives();
			for(int i = 0; i < archives.length; i++) {
				archives[i].getRobin(dsIndex).filterValues(Double.NaN, maxValue);
			}
		}
	}