public void setInertia ( Long inertiaMillis ) { if ( this . alert == null ) { // Only during deserialization. this . inertia = inertiaMillis ; } else { requireArgument ( inertiaMillis != null && inertiaMillis >= 0 , "Inertia cannot be negative." ) ; Long longestIntervalLength = AlertUtils . getMaximumIntervalLength ( this . alert . getExpression ( ) ) ; if ( inertiaMillis > longestIntervalLength ) throw new IllegalArgumentException ( String . format ( "Inertia %d cannot be more than width of the longest interval %d." , inertiaMillis , longestIntervalLength ) ) ; this . inertia = inertiaMillis ; } }
Sets the inertia associated with the trigger in milliseconds .