-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
支持获取自定义的 Agent 启动参数 #163
Closed
Closed
支持获取自定义的 Agent 启动参数 #163
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
import com.alibaba.jvm.sandbox.api.Information; | ||
|
||
import java.net.InetSocketAddress; | ||
import java.util.Map; | ||
|
||
/** | ||
* 沙箱配置信息 | ||
|
@@ -102,8 +103,7 @@ public interface ConfigInfo { | |
* 沙箱事件对象池单个事件类型缓存最小数量,{@link #isEnableEventPool()}==true时候有意义 | ||
* | ||
* @return 单个事件类型缓存最小数量 | ||
* @deprecated 已经被废弃,推荐使用{@link #getEventPoolMaxIdlePerEvent()} | ||
* @deprecated 后续不再支持事件池 | ||
* @deprecated 已经被废弃,后续不再支持事件池,推荐使用{@link #getEventPoolMaxIdlePerEvent()} | ||
*/ | ||
@Deprecated | ||
int getEventPoolKeyMin(); | ||
|
@@ -112,8 +112,7 @@ public interface ConfigInfo { | |
* 沙箱事件对象池单个事件类型缓存最大数量,{@link #isEnableEventPool()}==true时候有意义 | ||
* | ||
* @return 单个事件类型缓存最大数量 | ||
* @deprecated 已被废弃,推荐使用{@link #getEventPoolMaxTotalPerEvent()} | ||
* @deprecated 后续不再支持事件池 | ||
* @deprecated 已被废弃,后续不再支持事件池,推荐使用{@link #getEventPoolMaxTotalPerEvent()} | ||
*/ | ||
@Deprecated | ||
int getEventPoolKeyMax(); | ||
|
@@ -122,8 +121,7 @@ public interface ConfigInfo { | |
* 沙箱事件对象池所有事件类型缓存最大总数量,{@link #isEnableEventPool()}==true时候有意义 | ||
* | ||
* @return 所有事件类型缓存最大总数量 | ||
* @deprecated 已被废弃,推荐使用{@link #getEventPoolMaxTotal()} | ||
* @deprecated 后续不再支持事件池 | ||
* @deprecated 已被废弃,后续不再支持事件池,推荐使用{@link #getEventPoolMaxTotal()} | ||
*/ | ||
@Deprecated | ||
int getEventPoolTotal(); | ||
|
@@ -184,4 +182,18 @@ public interface ConfigInfo { | |
*/ | ||
String getVersion(); | ||
|
||
/** | ||
* 获取 Agent 的启动参数 | ||
* | ||
* @param key 键 | ||
* @return 值 | ||
*/ | ||
String getProperty(String key); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 提供两个获取启动参数的方法,一个是获取单个的,一个是获取全部的。 |
||
|
||
/** | ||
* 获取所有的 Agent 启动参数 | ||
* | ||
* @return 所有的 Agent 启动参数 | ||
*/ | ||
Map<String, String> getProperties(); | ||
} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
通过一个 map 来存放,最后再统一序列化,这样代码更加清晰,更易于维护。