主機選項

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 裝置。

getKnownPreconfigureVirtualDevicePool()

已知的預先設定的虛擬裝置集區。

getKnownRemoteDeviceIpPool()

與特定 IP 相關聯的已知遠端裝置。

getLabels()

取得主機的標籤。

String getNetworkInterface()

傳回用來連線至遠端測試裝置的網路介面。

getServiceAccountJsonKeyFiles()

傳回服務帳戶 json 金鑰檔案的對應。

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 中設定的選項有效。

公用建構函式

主機選項

public HostOptions ()

公用方法

getAvailablePermits

public Integer getAvailablePermits (IHostOptions.PermitLimitType type)

傳回指定類型的可用許可證數量

參數
type IHostOptions.PermitLimitType

傳回
Integer

getCacheSizeLimit

public Long getCacheSizeLimit ()

傳回本機檔案快取允許的大小上限(位元組)。

傳回
Long

getConcurrentDownloadLimit

public Integer getConcurrentDownloadLimit ()

傳回同時允許的並行下載數量上限。由下載遠端建構作業的 IBuildProvider 使用。

傳回
Integer

getConcurrentFlasherLimit

public Integer getConcurrentFlasherLimit ()

傳回允許的並行刷新次數上限。由 DeviceFlashPreparer 使用。

傳回
Integer 並行 Flasher 上限

getConcurrentVirtualDeviceStartupLimit

public Integer getConcurrentVirtualDeviceStartupLimit ()

傳回同時啟動的虛擬裝置數量上限。由啟動虛擬裝置的 RemoteAndroidVirtualDevice 使用。

傳回
Integer

getDownloadCacheDir

public File getDownloadCacheDir ()

傳回用來儲存下載構件的路徑。

傳回
File

getFastbootTmpDir

public File getFastbootTmpDir ()

傳回 Quickboot 應做為暫存資料夾的路徑。

傳回
File

getInUsePermits

public int getInUsePermits (IHostOptions.PermitLimitType type)

傳回特定類型的許可證數量

參數
type IHostOptions.PermitLimitType

傳回
int

getKnownGceDeviceIpPool

public  getKnownGceDeviceIpPool ()

與特定 IP 相關聯的已知 gce 裝置。

傳回

getKnownPreconfigureVirtualDevicePool

public  getKnownPreconfigureVirtualDevicePool ()

已知的預先設定的虛擬裝置集區。

傳回

getKnownRemoteDeviceIpPool

public  getKnownRemoteDeviceIpPool ()

與特定 IP 相關聯的已知遠端裝置。

傳回

getLabels

public  getLabels ()

取得主機的標籤。

傳回

getNetworkInterface

public String getNetworkInterface ()

傳回用來連線至遠端測試裝置的網路介面。

傳回
String

getServiceAccountJsonKeyFiles

public  getServiceAccountJsonKeyFiles ()

傳回服務帳戶 JSON 金鑰檔案的對應圖。

傳回

getTestPhaseTimeout

public long getTestPhaseTimeout ()

傳回指定的測試階段層級逾時。無逾時設定的預設值會是 0。

傳回
long

getUseZip64InPartialDownload

public boolean getUseZip64InPartialDownload ()

檢查是否應使用 zip64 格式下載部分檔案。

傳回
boolean

initConcurrentLocks

public void initConcurrentLocks ()

初始化並行鎖定

isFastbootdEnable

public boolean isFastbootdEnable ()

傳回是否已啟用 Fastbootd 模式支援。

傳回
boolean

isHostMetricReporting 已停用

public boolean isHostMetricReportingDisabled ()

傳回是否應停用主機指標回報功能。

傳回
boolean

isIncrementalFlashingEnabled

public boolean isIncrementalFlashingEnabled ()

傳回是否啟用漸進式閃爍。

傳回
boolean

isOptOutOfIncrementalFlashing

public boolean isOptOutOfIncrementalFlashing ()

傳回主機是否停用漸進式閃爍。

傳回
boolean

returnPermit

public void returnPermit (IHostOptions.PermitLimitType type)

傳回指定類型的許可證

參數
type IHostOptions.PermitLimitType

應使用 FlashWithFuseZip

public boolean shouldFlashWithFuseZip ()

傳回是否要使用保險絲掛載裝置映像檔 ZIP 檔案完成刷新。

傳回
boolean

應使用 SsoClient

public Boolean shouldUseSsoClient ()

檢查是否應使用 SingleSignOn 用戶端。

傳回
Boolean

外帶許可

public void takePermit (IHostOptions.PermitLimitType type)

接受指定類型的許可

參數
type IHostOptions.PermitLimitType

VerifyOptions

public void validateOptions ()

確認 IHostOptions 中設定的選項有效。

擲回
ConfigurationException