-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the error handling to the client from the operator
Signed-off-by: Gantigmaa Selenge <[email protected]>
- Loading branch information
1 parent
1b0ff08
commit 3dd12c9
Showing
5 changed files
with
65 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...imzi/operator/cluster/operator/resource/cruisecontrol/CruiseControlUserTasksResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright Strimzi authors. | ||
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html). | ||
*/ | ||
package io.strimzi.operator.cluster.operator.resource.cruisecontrol; | ||
|
||
import io.vertx.core.json.JsonObject; | ||
|
||
/** | ||
* Response to user tasks request | ||
*/ | ||
public class CruiseControlUserTasksResponse extends CruiseControlResponse { | ||
private boolean isMaxActiveUserTasksReached; | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param userTaskId User task ID | ||
* @param json JSON data | ||
*/ | ||
CruiseControlUserTasksResponse(String userTaskId, JsonObject json) { | ||
super(userTaskId, json); | ||
// The maximum number of active user tasks that can run concurrently has reached | ||
// Sourced from the error message that contains "reached the servlet capacity" from the Cruise Control response | ||
this.isMaxActiveUserTasksReached = false; | ||
} | ||
|
||
/** | ||
* @return True If the maximum number of active user tasks that can run concurrently has reached | ||
*/ | ||
public boolean isMaxActiveUserTasksReached() { | ||
return isMaxActiveUserTasksReached; | ||
} | ||
|
||
protected void setMaxActiveUserTasksReached(boolean maxActiveUserTasksReached) { | ||
this.isMaxActiveUserTasksReached = maxActiveUserTasksReached; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters