Class AR24
java.lang.Object
edu.university.ecs.lab.detection.architecture.models.AbstractAR
edu.university.ecs.lab.detection.architecture.models.AR24
- All Implemented Interfaces:
JsonSerializable
Architectural Rule 24 Class: No Health Checks Found
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AR24
checkHealthcheck
(Delta delta, ConfigFile configFile, MicroserviceSystem oldSystem, MicroserviceSystem newSystem) Checks if both circuit breaker and rate limiter health checks are enabled in the YAML configuration.private static boolean
containsHealthCheck
(com.google.gson.JsonObject data) Checks if the given JSON object contains the necessary configurations for health checks.Get the description of the Architectural Rulecom.google.gson.JsonObject
Get the meta data of the Architectural RulegetName()
Get the name of the Architectural RulegetType()
Get the new commitIDdouble
Get the weight of the Architectural Rulescan
(Delta delta, MicroserviceSystem oldSystem, MicroserviceSystem newSystem) Scan and compare old microservice system and new microservice system to check for health check configurationMethods inherited from class edu.university.ecs.lab.detection.architecture.models.AbstractAR
getNewCommitID, getOldCommitID, toJsonObject
-
Field Details
-
TYPE
Architectural rule 24 details- See Also:
-
NAME
- See Also:
-
DESC
- See Also:
-
CONFIDENCE
-
oldCommitID
-
newCommitID
-
metaData
protected com.google.gson.JsonObject metaData
-
-
Constructor Details
-
AR24
public AR24()
-
-
Method Details
-
getName
Description copied from class:AbstractAR
Get the name of the Architectural Rule- Specified by:
getName
in classAbstractAR
- Returns:
- string name of the Architectural Rule
-
getDescription
Description copied from class:AbstractAR
Get the description of the Architectural Rule- Specified by:
getDescription
in classAbstractAR
- Returns:
- string description of the Architectural Rule
-
getWeight
public double getWeight()Description copied from class:AbstractAR
Get the weight of the Architectural Rule- Specified by:
getWeight
in classAbstractAR
- Returns:
- double weight of the Architectural Rule
-
getType
Description copied from class:AbstractAR
Get the new commitID- Specified by:
getType
in classAbstractAR
- Returns:
- string new commitID
-
getMetaData
public com.google.gson.JsonObject getMetaData()Description copied from class:AbstractAR
Get the meta data of the Architectural Rule- Specified by:
getMetaData
in classAbstractAR
- Returns:
- JSON object meta data of the Architectural Rule
-
scan
public static List<AR24> scan(Delta delta, MicroserviceSystem oldSystem, MicroserviceSystem newSystem) Scan and compare old microservice system and new microservice system to check for health check configuration- Parameters:
delta
- change between old commit and new microservice systemsoldSystem
- old commit of microservice systemnewSystem
- new commit of microservice system- Returns:
-
checkHealthcheck
public static AR24 checkHealthcheck(Delta delta, ConfigFile configFile, MicroserviceSystem oldSystem, MicroserviceSystem newSystem) Checks if both circuit breaker and rate limiter health checks are enabled in the YAML configuration.- Parameters:
delta
- change between old commit and new microservice systemsconfigFile
- The YAML file to check.oldSystem
- old commit of microservice systemnewSystem
- new commit of microservice system- Returns:
- AR24 object if no health check configuration is found, null otherwise
-
containsHealthCheck
private static boolean containsHealthCheck(com.google.gson.JsonObject data) Checks if the given JSON object contains the necessary configurations for health checks. Specifically, it verifies if both circuit breaker and rate limiter health checks are enabled and if the health indicators are registered for both circuit breakers and rate limiters.- Parameters:
data
- The JsonObject representing the configuration data to check.- Returns:
- true if the necessary health check configurations are present and enabled, false otherwise.
-