Skip to content

Commit

Permalink
add stop biz state
Browse files Browse the repository at this point in the history
  • Loading branch information
lvjing2 committed Nov 6, 2024
1 parent 9c3de26 commit 1f34a0d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</modules>

<properties>
<sofa.ark.version>2.2.15</sofa.ark.version>
<sofa.ark.version>2.2.16-SNAPSHOT</sofa.ark.version>
<sofa.ark.version.old>2.2.14</sofa.ark.version.old>
<project.encoding>UTF-8</project.encoding>
<java.version>1.8</java.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public void stop() {
BizManagerService bizManagerService = ArkServiceContainerHolder.getContainer()
.getService(BizManagerService.class);
bizManagerService.unRegisterBiz(bizName, bizVersion);
setBizState(BizState.UNRESOLVED, StateChangeReason.STOPPED);
setBizState(BizState.STOPPED, StateChangeReason.STOPPED);
eventAdminService.sendEvent(new BeforeBizRecycleEvent(this));
urls = null;
denyImportPackages = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
public enum BizState {
/**
* init but not start install yet
* or
* uninstalled
*/
UNRESOLVED("unresolved"),
/**
Expand All @@ -45,9 +43,14 @@ public enum BizState {
DEACTIVATED("deactivated"),

/**
* install failed.
* install or uninstall failed.
*/
BROKEN("broken");
BROKEN("broken"),

/**
* uninstall succeed
*/
STOPPED("stopped");

private String state;

Expand All @@ -73,6 +76,8 @@ public static BizState of(String state) {
return ACTIVATED;
} else if (DEACTIVATED.name().equalsIgnoreCase(state)) {
return DEACTIVATED;
} else if (STOPPED.name().equalsIgnoreCase(state)) {
return STOPPED;
} else {
return BROKEN;
}
Expand Down

0 comments on commit 1f34a0d

Please sign in to comment.