自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
IShardHelper
public
interface
IShardHelper
com.android.tradefed.invoker.shard.IShardHelper
|
用于描述要为配置采用的分片策略的对象的接口。
摘要
公共方法
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# IShardHelper\n============\n\n\n`\npublic\n\n\ninterface\nIShardHelper\n`\n\n\n`\n\n\n`\n\n|-------------------------------------------------|\n| com.android.tradefed.invoker.shard.IShardHelper |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [DynamicShardHelper](../../../../../../../reference/tradefed/com/android/tradefed/invoker/shard/DynamicShardHelper.html), [ShardHelper](../../../../../../../reference/tradefed/com/android/tradefed/invoker/shard/ShardHelper.html), [StrictShardHelper](../../../../../../../reference/tradefed/com/android/tradefed/invoker/shard/StrictShardHelper.html) |--------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------| | [DynamicShardHelper](../../../../../../../reference/tradefed/com/android/tradefed/invoker/shard/DynamicShardHelper.html) | Sharding strategy to allow work remote work queueing between multiple TF instances | | [ShardHelper](../../../../../../../reference/tradefed/com/android/tradefed/invoker/shard/ShardHelper.html) | Helper class that handles creating the shards and scheduling them for an invocation. | | [StrictShardHelper](../../../../../../../reference/tradefed/com/android/tradefed/invoker/shard/StrictShardHelper.html) | Sharding strategy to create strict shards that do not report together, | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface of an object that describes the sharding strategy to adopt for a configuration.\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract boolean` | ` `[shardConfig](../../../../../../../reference/tradefed/com/android/tradefed/invoker/shard/IShardHelper.html#shardConfig(com.android.tradefed.config.IConfiguration,%20com.android.tradefed.invoker.TestInformation,%20com.android.tradefed.invoker.IRescheduler,%20com.android.tradefed.log.ITestLogger))`(`[IConfiguration](../../../../../../../reference/tradefed/com/android/tradefed/config/IConfiguration.html)` config, `[TestInformation](../../../../../../../reference/tradefed/com/android/tradefed/invoker/TestInformation.html)` testInfo, `[IRescheduler](../../../../../../../reference/tradefed/com/android/tradefed/invoker/IRescheduler.html)` rescheduler, `[ITestLogger](../../../../../../../reference/tradefed/com/android/tradefed/log/ITestLogger.html)` logger) ` Shard and reschedule the shard if possible. |\n\nPublic methods\n--------------\n\n### shardConfig\n\n```\npublic abstract boolean shardConfig (IConfiguration config, \n TestInformation testInfo, \n IRescheduler rescheduler, \n ITestLogger logger)\n```\n\nShard and reschedule the shard if possible.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `config` | `IConfiguration`: a [IConfiguration](../../../../../../../reference/tradefed/com/android/tradefed/config/IConfiguration.html) to be run. \u003cbr /\u003e |\n| `testInfo` | `TestInformation`: the [TestInformation](../../../../../../../reference/tradefed/com/android/tradefed/invoker/TestInformation.html) of the current invocation. \u003cbr /\u003e |\n| `rescheduler` | `IRescheduler`: the [IRescheduler](../../../../../../../reference/tradefed/com/android/tradefed/invoker/IRescheduler.html) where to reschedule the shards. \u003cbr /\u003e |\n| `logger` | `ITestLogger` \u003cbr /\u003e |\n\n| Returns ||\n|-----------|----------------------------------------------------------------|\n| `boolean` | True if the configuration was sharded. false otherwise. \u003cbr /\u003e |"]]