public final ThresholdsEvaluatorBuilder withLegacyThreshold ( final String metric , final String okRange , final String warnRange , final String critRange ) throws BadThresholdException { LegacyRange ok = null , warn = null , crit = null ; if ( okRange != null ) { ok = new LegacyRange ( okRange ) ; } if ( warnRange != null ) { warn = new LegacyRange ( warnRange ) ; } if ( critRange != null ) { crit = new LegacyRange ( critRange ) ; } thresholds . addThreshold ( new LegacyThreshold ( metric , ok , warn , crit ) ) ; return this ; }
This method allows to specify thresholds using the old format .