HostOptions

public class HostOptions
extends Object implements IHostOptions

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


主機選項持有者類別。 這個類別用於儲存主機範圍的選項。

摘要

公用建構函式

HostOptions()

公用方法

Integer getAvailablePermits(IHostOptions.PermitLimitType type)

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

Long getCacheSizeLimit()

Return maximum allowed size(bytes) of the local file cache.

Integer getConcurrentDownloadLimit()

傳回允許的並行下載次數上限。

Integer getConcurrentFlasherLimit()

傳回允許的並行閃爍次數上限。

Integer getConcurrentVirtualDeviceStartupLimit()

傳回允許的並行虛擬裝置啟動次數上限。

File getDownloadCacheDir()

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

File getFastbootTmpDir()

傳回快速啟動應做為暫存資料夾的路徑。

int getInUsePermits(IHostOptions.PermitLimitType type)

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

Set<String> getKnownGceDeviceIpPool()

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

List<String> getKnownPreconfigureNativeDevicePool()

已知的預先設定原生裝置 IP 集區。

List<String> getKnownPreconfigureVirtualDevicePool()

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

Set<String> getKnownRemoteDeviceIpPool()

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

List<String> getLabels()

取得主機的標籤。

String getNetworkInterface()

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

Map<String, File> 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)

取得指定類型的許可證

boolean useAndroidBuildApiV4()

傳回是否要使用 Android Build API v4。

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 ()

傳回允許的並行下載次數上限。由 IBuildProvider 使用,用於下載遠端建構作業。

傳回
Integer

getConcurrentFlasherLimit

public Integer getConcurrentFlasherLimit ()

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

傳回
Integer 並行刷機工具上限。

getConcurrentVirtualDeviceStartupLimit

public Integer getConcurrentVirtualDeviceStartupLimit ()

傳回允許的並行虛擬裝置啟動次數上限。由啟動虛擬裝置使用。RemoteAndroidVirtualDevice

傳回
Integer

getDownloadCacheDir

public File getDownloadCacheDir ()

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

傳回
File

getFastbootTmpDir

public File getFastbootTmpDir ()

傳回快速啟動應做為暫存資料夾的路徑。

傳回
File

getInUsePermits

public int getInUsePermits (IHostOptions.PermitLimitType type)

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

參數
type IHostOptions.PermitLimitType

傳回
int

getKnownGceDeviceIpPool

public Set<String> getKnownGceDeviceIpPool ()

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

傳回
Set<String>

getKnownPreconfigureNativeDevicePool

public List<String> getKnownPreconfigureNativeDevicePool ()

已知的預先設定原生裝置 IP 集區。

傳回
List<String>

getKnownPreconfigureVirtualDevicePool

public List<String> getKnownPreconfigureVirtualDevicePool ()

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

傳回
List<String>

getKnownRemoteDeviceIpPool

public Set<String> getKnownRemoteDeviceIpPool ()

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

傳回
Set<String>

getLabels

public List<String> getLabels ()

取得主機的標籤。

傳回
List<String>

getNetworkInterface

public String getNetworkInterface ()

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

傳回
String

getServiceAccountJsonKeyFiles

public Map<String, File> getServiceAccountJsonKeyFiles ()

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

傳回
Map<String, File>

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

useAndroidBuildApiV4

public boolean useAndroidBuildApiV4 ()

傳回是否要使用 Android Build API v4。

傳回
boolean

validateOptions

public void validateOptions ()

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

擲回
ConfigurationException