All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.codecentric.spring.boot.chaos.monkey.configuration.AssaultPropertiesLatencyRangeValidator Maven / Gradle / Ivy

package de.codecentric.spring.boot.chaos.monkey.configuration;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class AssaultPropertiesLatencyRangeValidator
    implements ConstraintValidator {

  @Override
  public boolean isValid(
      final AssaultProperties assaultProperties,
      final ConstraintValidatorContext constraintValidatorContext) {
    if (assaultProperties == null) {
      return true;
    }

    return assaultProperties.getLatencyRangeStart() <= assaultProperties.getLatencyRangeEnd();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy