IHostOptions

public interface IHostOptions

com.android.tradefed.host.IHostOptions


主机选项持有者接口。 此接口用于访问主机范围的选项。

摘要

公共方法

abstract Integer getAvailablePermits(IHostOptions.PermitLimitType type)

返回指定类型的可用许可数量

abstract Long getCacheSizeLimit()

返回本地文件缓存的最大允许大小(以字节为单位)。

abstract Integer getConcurrentDownloadLimit()

返回允许的并发下载数量上限。

abstract Integer getConcurrentFlasherLimit()

返回允许的最大并发刷写次数。

abstract Integer getConcurrentVirtualDeviceStartupLimit()

返回允许的并发虚拟设备启动的最大数量。

abstract File getDownloadCacheDir()

返回用于存储下载的工件的路径。

abstract File getFastbootTmpDir()

返回 fastboot 应使用的临时文件夹的路径。

abstract int getInUsePermits(IHostOptions.PermitLimitType type)

返回指定类型的已用许可数

abstract Set<String> getKnownGceDeviceIpPool()

与特定 IP 关联的已知 gce-device。

abstract List<String> getKnownPreconfigureNativeDevicePool()

已知预配置的原生设备 IP 池。

abstract List<String> getKnownPreconfigureVirtualDevicePool()

已知的预配置虚拟设备池。

abstract Set<String> getKnownRemoteDeviceIpPool()

与特定 IP 关联的已知远程设备。

default Set<String> getKnownTcpDeviceIpPool()

与特定 IP 相关联的已知 tcp 设备。

abstract List<String> getLabels()

获取主机的标签。

abstract String getNetworkInterface()

返回用于连接到远程测试设备的网络接口。

abstract Map<String, File> getServiceAccountJsonKeyFiles()

返回服务账号 JSON 密钥文件的 Map。

abstract long getTestPhaseTimeout()

返回指定的测试阶段级别超时时间。

abstract boolean getUseZip64InPartialDownload()

检查是否应在部分下载中使用 zip64 格式。

abstract void initConcurrentLocks()

初始化并发锁

abstract boolean isFastbootdEnable()

返回是否已启用 fastbootd 模式支持。

abstract boolean isHostMetricReportingDisabled()

返回是否应停用主机指标报告。

abstract boolean isIncrementalFlashingEnabled()

返回是否启用了增量刷写。

abstract boolean isOptOutOfIncrementalFlashing()

返回宿主是否选择不使用增量刷写。

abstract void returnPermit(IHostOptions.PermitLimitType type)

返回指定类型的许可

abstract boolean shouldFlashWithFuseZip()

返回是否应使用已装载保险丝的设备映像 zip 文件进行刷写。

abstract Boolean shouldUseSsoClient()

检查是否应使用 SingleSignOn 客户端。

abstract void takePermit(IHostOptions.PermitLimitType type)

获取指定类型的许可

abstract boolean useAndroidBuildApiV4()

返回是否使用 v4 Android Build API。

abstract void validateOptions()

验证 IHostOptions 上设置的选项是否有效。

公共方法

getAvailablePermits

public abstract Integer getAvailablePermits (IHostOptions.PermitLimitType type)

返回指定类型的可用许可数量

参数
type IHostOptions.PermitLimitType

返回
Integer

getCacheSizeLimit

public abstract Long getCacheSizeLimit ()

返回本地文件缓存允许的最大大小(以字节为单位)。

返回
Long

getConcurrentDownloadLimit

public abstract Integer getConcurrentDownloadLimit ()

返回允许的最大并发下载数。由下载远程 build 的 IBuildProvider 使用。

返回
Integer

getConcurrentFlasherLimit

public abstract Integer getConcurrentFlasherLimit ()

返回允许的最大并发刷写次数。由 DeviceFlashPreparer 使用。

返回
Integer 并发刷写器限制。

getConcurrentVirtualDeviceStartupLimit

public abstract Integer getConcurrentVirtualDeviceStartupLimit ()

返回允许的最大并发虚拟设备启动数量。由启动虚拟设备 RemoteAndroidVirtualDevice 使用。

返回
Integer

getDownloadCacheDir

public abstract File getDownloadCacheDir ()

返回用于存储下载的工件的路径。

返回
File

getFastbootTmpDir

public abstract File getFastbootTmpDir ()

返回 fastboot 应使用的临时文件夹的路径。

返回
File

getInUsePermits

public abstract int getInUsePermits (IHostOptions.PermitLimitType type)

返回指定类型的已用许可数量

参数
type IHostOptions.PermitLimitType

返回
int

getKnownGceDeviceIpPool

public abstract Set<String> getKnownGceDeviceIpPool ()

与特定 IP 关联的已知 gce 设备。

返回
Set<String>

getKnownPreconfigureNativeDevicePool

public abstract List<String> getKnownPreconfigureNativeDevicePool ()

已知预配置的原生设备 IP 池。

返回
List<String>

getKnownPreconfigureVirtualDevicePool

public abstract List<String> getKnownPreconfigureVirtualDevicePool ()

已知的预配置虚拟设备池。

返回
List<String>

getKnownRemoteDeviceIpPool

public abstract Set<String> getKnownRemoteDeviceIpPool ()

与特定 IP 关联的已知远程设备。

返回
Set<String>

getKnownTcpDeviceIpPool

public Set<String> getKnownTcpDeviceIpPool ()

与特定 IP 关联的已知 TCP 设备。

返回
Set<String>

getLabels

public abstract List<String> getLabels ()

获取主机的标签。

返回
List<String>

getNetworkInterface

public abstract String getNetworkInterface ()

返回用于连接到远程测试设备的网络接口。

返回
String

getServiceAccountJsonKeyFiles

public abstract Map<String, File> getServiceAccountJsonKeyFiles ()

返回服务账号 JSON 密钥文件的 Map。

返回
Map<String, File>

getTestPhaseTimeout

public abstract long getTestPhaseTimeout ()

返回指定的测试阶段级别超时时间。默认值为 0,表示不设置超时。

返回
long

getUseZip64InPartialDownload

public abstract boolean getUseZip64InPartialDownload ()

检查是否应在部分下载中使用 zip64 格式。

返回
boolean

initConcurrentLocks

public abstract void initConcurrentLocks ()

初始化并发锁

isFastbootdEnable

public abstract boolean isFastbootdEnable ()

返回 fastbootd 模式支持是否已启用。

返回
boolean

isHostMetricReportingDisabled

public abstract boolean isHostMetricReportingDisabled ()

返回是否应停用主机指标报告。

返回
boolean

isIncrementalFlashingEnabled

public abstract boolean isIncrementalFlashingEnabled ()

返回增量刷写是否已启用。

返回
boolean

isOptOutOfIncrementalFlashing

public abstract boolean isOptOutOfIncrementalFlashing ()

返回主机是否选择不使用增量刷写。

返回
boolean

returnPermit

public abstract void returnPermit (IHostOptions.PermitLimitType type)

返回指定类型的许可

参数
type IHostOptions.PermitLimitType

shouldFlashWithFuseZip

public abstract boolean shouldFlashWithFuseZip ()

返回是否应使用已装载保险丝的设备映像 zip 文件进行刷写。

返回
boolean

shouldUseSsoClient

public abstract Boolean shouldUseSsoClient ()

检查是否应使用 SingleSignOn 客户端。

返回
Boolean

takePermit

public abstract void takePermit (IHostOptions.PermitLimitType type)

获取指定类型的许可

参数
type IHostOptions.PermitLimitType

useAndroidBuildApiV4

public abstract boolean useAndroidBuildApiV4 ()

返回是否使用 v4 Android Build API。

返回
boolean

validateOptions

public abstract void validateOptions ()

验证 IHostOptions 上设置的选项是否有效。

抛出
ConfigurationException