-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize the initialization logic to wait for service policies to be …
…ready
- Loading branch information
1 parent
e53aba4
commit 5e0fe4c
Showing
11 changed files
with
216 additions
and
40 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
...core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/ServiceSupervisor.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,39 @@ | ||
/* | ||
* Copyright © ${year} ${owner} (${email}) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.jd.live.agent.core.service; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Defines an interface for supervising services within a system. | ||
* The {@code ServiceSupervisor} is responsible for managing and providing information | ||
* about agent services that are currently active or available within the system. | ||
*/ | ||
public interface ServiceSupervisor { | ||
|
||
String COMPONENT_SERVICE_SUPERVISOR = "ServiceSupervisor"; | ||
|
||
/** | ||
* Retrieves a list of {@code AgentService} instances that are currently managed | ||
* or supervised by this supervisor. | ||
* | ||
* @return A list of {@code AgentService} instances representing the services | ||
* currently under supervision. This list may be empty if no services | ||
* are currently being supervised. | ||
*/ | ||
List<AgentService> getServices(); | ||
} | ||
|
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
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
...live-governance-api/src/main/java/com/jd/live/agent/governance/service/PolicyService.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 © ${year} ${owner} (${email}) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.jd.live.agent.governance.service; | ||
|
||
import com.jd.live.agent.core.service.AgentService; | ||
import com.jd.live.agent.governance.policy.PolicyType; | ||
|
||
/** | ||
* Represents a service that deals with policies, extending the functionalities | ||
* of an {@link AgentService}. This interface provides additional capabilities | ||
* specifically related to policy management. | ||
*/ | ||
public interface PolicyService extends AgentService { | ||
|
||
/** | ||
* Retrieves the type of service this policy service represents. | ||
* | ||
* @return the {@link PolicyType} representing the type of this policy service. | ||
*/ | ||
PolicyType getPolicyType(); | ||
|
||
String getName(); | ||
} | ||
|
||
|
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
Oops, something went wrong.