@@ -19,6 +19,12 @@ public class ProbeTuning {
19
19
@ ApiModelProperty ("The number of seconds with no response that indicates a failure." )
20
20
private Integer timeoutSeconds ;
21
21
22
+ @ ApiModelProperty ("Number of times the check is performed before giving up." )
23
+ private Integer failureThreshold = 1 ;
24
+
25
+ @ ApiModelProperty ("Minimum number of times the check needs to pass for the probe to be considered successful" )
26
+ private Integer successThreshold = 1 ;
27
+
22
28
public ProbeTuning initialDelaySeconds (Integer initialDelaySeconds ) {
23
29
this .initialDelaySeconds = initialDelaySeconds ;
24
30
return this ;
@@ -70,12 +76,32 @@ public void setTimeoutSeconds(Integer timeoutSeconds) {
70
76
this .timeoutSeconds = timeoutSeconds ;
71
77
}
72
78
79
+ public Integer getFailureThreshold () {
80
+ return failureThreshold ;
81
+ }
82
+
83
+ public ProbeTuning failureThreshold (Integer failureThreshold ) {
84
+ this .failureThreshold = failureThreshold ;
85
+ return this ;
86
+ }
87
+
88
+ public Integer getSuccessThreshold () {
89
+ return successThreshold ;
90
+ }
91
+
92
+ public ProbeTuning successThreshold (Integer successThreshold ) {
93
+ this .successThreshold = successThreshold ;
94
+ return this ;
95
+ }
96
+
73
97
@ Override
74
98
public String toString () {
75
99
return new ToStringBuilder (this )
76
100
.append ("initialDelaySeconds" , initialDelaySeconds )
77
101
.append ("periodSeconds" , periodSeconds )
78
102
.append ("timeoutSeconds" , timeoutSeconds )
103
+ .append ("failureThreshold" , failureThreshold )
104
+ .append ("successThreshold" , successThreshold )
79
105
.toString ();
80
106
}
81
107
@@ -93,6 +119,8 @@ public boolean equals(Object other) {
93
119
.append (initialDelaySeconds , rhs .initialDelaySeconds )
94
120
.append (periodSeconds , rhs .periodSeconds )
95
121
.append (timeoutSeconds , rhs .timeoutSeconds )
122
+ .append (failureThreshold , rhs .failureThreshold )
123
+ .append (successThreshold , rhs .successThreshold )
96
124
.isEquals ();
97
125
}
98
126
@@ -102,6 +130,8 @@ public int hashCode() {
102
130
.append (initialDelaySeconds )
103
131
.append (periodSeconds )
104
132
.append (timeoutSeconds )
133
+ .append (failureThreshold )
134
+ .append (successThreshold )
105
135
.toHashCode ();
106
136
}
107
137
}
0 commit comments