HostOptions

public class HostOptions
extends Object implements IHostOptions

java.lang.Object
   ↳ com.android.tradefed.host.HostOptions


主机选项持有者类。 此类用于存储主机级选项。

摘要

公共构造函数

HostOptions()

公共方法

Integer getAvailablePermits(IHostOptions.PermitLimitType type)

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

Long getCacheSizeLimit()

返回本地文件缓存的允许大小上限(字节)。

Integer getConcurrentDownloadLimit()

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

Integer getConcurrentFlasherLimit()

返回允许的并发刷写次数上限。

Integer getConcurrentVirtualDeviceStartupLimit()

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

File getDownloadCacheDir()

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

File getFastbootTmpDir()

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

int getInUsePermits(IHostOptions.PermitLimitType type)

返回指定类型的有效许可数量

getKnownGceDeviceIpPool()

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

getKnownPreconfigureNativeDevicePool()

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

getKnownPreconfigureVirtualDevicePool()

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

getKnownRemoteDeviceIpPool()

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

getLabels()

获取主机的标签。

String getNetworkInterface()

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

getServiceAccountJsonKeyFiles()

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

long getTestPhaseTimeout()

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

boolean getUseZip64InPartialDownload()

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

void initConcurrentLocks()

初始化并发锁

boolean isFastbootdEnable()

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

boolean isHostMetricReportingDisabled()

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

boolean isIncrementalFlashingEnabled()

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

boolean isOptOutOfIncrementalFlashing()

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

void returnPermit(IHostOptions.PermitLimitType type)

返回给定类型的许可

boolean shouldFlashWithFuseZip()

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

Boolean shouldUseSsoClient()

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

void takePermit(IHostOptions.PermitLimitType type)

获取指定类型的许可

void validateOptions()

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

公共构造函数

HostOptions

public HostOptions ()

公共方法

getAvailablePermits

public Integer getAvailablePermits (IHostOptions.PermitLimitType type)

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

参数
type IHostOptions.PermitLimitType

返回
Integer

getCacheSizeLimit

public Long getCacheSizeLimit ()

返回本地文件缓存的允许大小上限(字节)。

返回
Long

getConcurrentDownloadLimit

public Integer getConcurrentDownloadLimit ()

返回允许的并发下载数量上限。供下载远程 build 的 IBuildProvider 使用。

返回
Integer

getConcurrentFlasherLimit

public Integer getConcurrentFlasherLimit ()

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

返回
Integer 并发闪烁器数量限制。

getConcurrentVirtualDeviceStartupLimit

public Integer getConcurrentVirtualDeviceStartupLimit ()

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

返回
Integer

getDownloadCacheDir

public File getDownloadCacheDir ()

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

返回
File

getFastbootTmpDir

public File getFastbootTmpDir ()

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

返回
File

getInUsePermits

public int getInUsePermits (IHostOptions.PermitLimitType type)

返回指定类型的有效许可数量

参数
type IHostOptions.PermitLimitType

返回
int

getKnownGceDeviceIpPool

public  getKnownGceDeviceIpPool ()

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

返回

getKnownPreconfigureNativeDevicePool

public  getKnownPreconfigureNativeDevicePool ()

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

返回

getKnownPreconfigureVirtualDevicePool

public  getKnownPreconfigureVirtualDevicePool ()

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

返回

getKnownRemoteDeviceIpPool

public  getKnownRemoteDeviceIpPool ()

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

返回

getLabels

public  getLabels ()

获取主机的标签。

返回

getNetworkInterface

public String getNetworkInterface ()

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

返回
String

getServiceAccountJsonKeyFiles

public  getServiceAccountJsonKeyFiles ()

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

返回

getTestPhaseTimeout

public long getTestPhaseTimeout ()

返回指定的测试阶段级超时。默认值为 0(无超时)。

返回
long

getUseZip64InPartialDownload

public boolean getUseZip64InPartialDownload ()

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

返回
boolean

initConcurrentLocks

public void initConcurrentLocks ()

初始化并发锁

isFastbootdEnable

public boolean isFastbootdEnable ()

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

返回
boolean

isHostMetricReportingDisabled

public boolean isHostMetricReportingDisabled ()

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

返回
boolean

isIncrementalFlashingEnabled

public boolean isIncrementalFlashingEnabled ()

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

返回
boolean

isOptOutOfIncrementalFlashing

public boolean isOptOutOfIncrementalFlashing ()

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

返回
boolean

returnPermit

public void returnPermit (IHostOptions.PermitLimitType type)

返回给定类型的许可

参数
type IHostOptions.PermitLimitType

shouldFlashWithFuseZip

public boolean shouldFlashWithFuseZip ()

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

返回
boolean

shouldUseSsoClient

public Boolean shouldUseSsoClient ()

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

返回
Boolean

takePermit

public void takePermit (IHostOptions.PermitLimitType type)

获取指定类型的许可

参数
type IHostOptions.PermitLimitType

validateOptions

public void validateOptions ()

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

抛出
ConfigurationException