HostOptions

public class HostOptions
extends Object implements IHostOptions

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


Host options holder class. This class is used to store host-wide options.

Summary

Public constructors

HostOptions()

Public methods

Integer getAvailablePermits(IHostOptions.PermitLimitType type)

Returns the number of available permit of a given type

Long getCacheSizeLimit()

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

Integer getConcurrentDownloadLimit()

Returns the max number of concurrent downloads allowed.

Integer getConcurrentFlasherLimit()

Returns the max number of concurrent flashing to allow.

Integer getConcurrentVirtualDeviceStartupLimit()

Returns the max number of concurrent virtual device startup allowed.

File getDownloadCacheDir()

Returns the path used for storing downloaded artifacts.

File getFastbootTmpDir()

Returns the path that fastboot should use as temporary folder.

int getInUsePermits(IHostOptions.PermitLimitType type)

Returns the number of permits in use for a given type

getKnownGceDeviceIpPool()

Known gce-device associated with a specific IP.

getKnownPreconfigureVirtualDevicePool()

Known preconfigured virtual device pool.

getKnownRemoteDeviceIpPool()

Known remote-device associated with a specific IP.

getLabels()

Get labels for the host.

String getNetworkInterface()

Returns the network interface used to connect to remote test devices.

getServiceAccountJsonKeyFiles()

Returns a Map of service account json key files.

long getTestPhaseTimeout()

Returns the Test Phase level timeout specified.

boolean getUseZip64InPartialDownload()

Check if it should use the zip64 format in partial download or not.

void initConcurrentLocks()

Initializes the concurrent locks

boolean isFastbootdEnable()

Returns whether or not fastbootd mode support is enabled.

boolean isHostMetricReportingDisabled()

Returns whether host metric reporting should be disabled.

boolean isIncrementalFlashingEnabled()

Returns whether or not incremental flashing is enabled.

boolean isOptOutOfIncrementalFlashing()

Returns whether the host is opt-out of incremental flashing.

void returnPermit(IHostOptions.PermitLimitType type)

Returns a permit of the given type

boolean shouldFlashWithFuseZip()

Returns whether or not flashing should be done with fuse mounted device image zip file.

Boolean shouldUseSsoClient()

Check if it should use the SingleSignOn client or not.

void takePermit(IHostOptions.PermitLimitType type)

Takes a permit of the given type

void validateOptions()

Validate that the options set on IHostOptions are valid.

Public constructors

HostOptions

public HostOptions ()

Public methods

getAvailablePermits

public Integer getAvailablePermits (IHostOptions.PermitLimitType type)

Returns the number of available permit of a given type

Parameters
type IHostOptions.PermitLimitType

Returns
Integer

getCacheSizeLimit

public Long getCacheSizeLimit ()

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

Returns
Long

getConcurrentDownloadLimit

public Integer getConcurrentDownloadLimit ()

Returns the max number of concurrent downloads allowed. Used by IBuildProvider that downloads remote builds.

Returns
Integer

getConcurrentFlasherLimit

public Integer getConcurrentFlasherLimit ()

Returns the max number of concurrent flashing to allow. Used by DeviceFlashPreparer.

Returns
Integer the concurrent flasher limit.

getConcurrentVirtualDeviceStartupLimit

public Integer getConcurrentVirtualDeviceStartupLimit ()

Returns the max number of concurrent virtual device startup allowed. Used by RemoteAndroidVirtualDevice that startup virtual device.

Returns
Integer

getDownloadCacheDir

public File getDownloadCacheDir ()

Returns the path used for storing downloaded artifacts.

Returns
File

getFastbootTmpDir

public File getFastbootTmpDir ()

Returns the path that fastboot should use as temporary folder.

Returns
File

getInUsePermits

public int getInUsePermits (IHostOptions.PermitLimitType type)

Returns the number of permits in use for a given type

Parameters
type IHostOptions.PermitLimitType

Returns
int

getKnownGceDeviceIpPool

public  getKnownGceDeviceIpPool ()

Known gce-device associated with a specific IP.

Returns

getKnownPreconfigureVirtualDevicePool

public  getKnownPreconfigureVirtualDevicePool ()

Known preconfigured virtual device pool.

Returns

getKnownRemoteDeviceIpPool

public  getKnownRemoteDeviceIpPool ()

Known remote-device associated with a specific IP.

Returns

getLabels

public  getLabels ()

Get labels for the host.

Returns

getNetworkInterface

public String getNetworkInterface ()

Returns the network interface used to connect to remote test devices.

Returns
String

getServiceAccountJsonKeyFiles

public  getServiceAccountJsonKeyFiles ()

Returns a Map of service account json key files.

Returns

getTestPhaseTimeout

public long getTestPhaseTimeout ()

Returns the Test Phase level timeout specified. Default will be 0 for no timeouts.

Returns
long

getUseZip64InPartialDownload

public boolean getUseZip64InPartialDownload ()

Check if it should use the zip64 format in partial download or not.

Returns
boolean

initConcurrentLocks

public void initConcurrentLocks ()

Initializes the concurrent locks

isFastbootdEnable

public boolean isFastbootdEnable ()

Returns whether or not fastbootd mode support is enabled.

Returns
boolean

isHostMetricReportingDisabled

public boolean isHostMetricReportingDisabled ()

Returns whether host metric reporting should be disabled.

Returns
boolean

isIncrementalFlashingEnabled

public boolean isIncrementalFlashingEnabled ()

Returns whether or not incremental flashing is enabled.

Returns
boolean

isOptOutOfIncrementalFlashing

public boolean isOptOutOfIncrementalFlashing ()

Returns whether the host is opt-out of incremental flashing.

Returns
boolean

returnPermit

public void returnPermit (IHostOptions.PermitLimitType type)

Returns a permit of the given type

Parameters
type IHostOptions.PermitLimitType

shouldFlashWithFuseZip

public boolean shouldFlashWithFuseZip ()

Returns whether or not flashing should be done with fuse mounted device image zip file.

Returns
boolean

shouldUseSsoClient

public Boolean shouldUseSsoClient ()

Check if it should use the SingleSignOn client or not.

Returns
Boolean

takePermit

public void takePermit (IHostOptions.PermitLimitType type)

Takes a permit of the given type

Parameters
type IHostOptions.PermitLimitType

validateOptions

public void validateOptions ()

Validate that the options set on IHostOptions are valid.

Throws
ConfigurationException