ClusterHostUtil
public class ClusterHostUtil
extends Object
java.lang.객체 | |
↳ | com.android.tradefed.cluster.ClusterHostUtil |
전역 구성 인스턴스, 호스트 정보 등을 가져오기 위한 TF 클러스터용 정적 유틸리티 함수
요약
공개 생성자 | |
---|---|
ClusterHostUtil () |
공개 메서드 | |
---|---|
static IClusterClient | getClusterClient () 가져 오기 |
static IClusterOptions | getClusterOptions () 가져 오기 |
static long | getCurrentTimeMillis () 현재 시스템 시간을 반환합니다. |
static String | getHostIpAddress () IP 주소를 가져옵니다. |
static String | getHostName () 호스트 이름을 가져옵니다. |
static String | getLocalDeviceSerial (String serial) 주어진 고유한 장치 시리얼에 대한 로컬 장치 시리얼을 반환합니다. |
static String | getRunTarget (DeviceDescriptor device, String runTargetFormat, deviceTags) getRunTarget (DeviceDescriptor device, String runTargetFormat, deviceTags) 주어진 장치 설명자에 대한 실행 대상을 반환합니다. |
static String | getTestHarness () |
static long | getTfStartTimeMillis () |
static String | getTfVersion () 이 호스트에서 실행 중인 TF 버전을 가져옵니다. |
static String | getUniqueDeviceSerial (DeviceDescriptor device) 장치에 대한 고유한 장치 직렬을 반환합니다. |
static boolean | isLocalhostIpPort (String input) 주어진 입력이 localhost IP:PORT 문자열인지 확인합니다. |
보호된 방법 | |
---|---|
static String | toValidTfVersion (String version) TF 버전의 유효성을 검사하고 정상이면 반환합니다. |
공개 생성자
ClusterHostUtil
public ClusterHostUtil ()
공개 메서드
getClusterClient
public static IClusterClient getClusterClient ()
가져 오기 IClusterClient
TFC를 백엔드와 상호 작용하는 데 사용 인스턴스를.
보고 | |
---|---|
IClusterClient |
getClusterOptions
public static IClusterOptions getClusterOptions ()
가져 오기 IClusterOptions
저장 클러스터 관련 설정에 사용되는 인스턴스를.
보고 | |
---|---|
IClusterOptions |
getCurrentTimeMillis
public static long getCurrentTimeMillis ()
현재 시스템 시간을 반환합니다.
보고 | |
---|---|
long | 밀리 단위의 시간. |
getHostIpAddress
public static String getHostIpAddress ()
IP 주소를 가져옵니다.
보고 | |
---|---|
String | IPV4 주소 문자열 또는 가져올 수 없는 경우 "UNKNOWN"입니다. |
getHostName
public static String getHostName ()
호스트 이름을 가져옵니다.
1. InetAddress에서 호스트 이름을 가져오십시오. 2. 실패하면 HOSTNAME 환경에서 호스트 이름을 가져오십시오. 3. 설정하지 않은 경우 고유한 호스트 이름을 생성합니다.
보고 | |
---|---|
String | 호스트 이름 또는 가져올 수 없는 경우 null입니다. |
getLocalDeviceSerial
public static String getLocalDeviceSerial (String serial)
주어진 고유한 장치 시리얼에 대한 로컬 장치 시리얼을 반환합니다.
TFC는 TF가 이해하지 못하는 비물리적 장치에 대해 고유한 장치 직렬을 보냅니다. 이 방법은 로컬 장치 직렬로 다시 변환합니다.
매개변수 | |
---|---|
serial | String : TFC의 고유 장치 시리얼. |
보고 | |
---|---|
String | 로컬 장치 직렬. |
getRunTarget
public static String getRunTarget (DeviceDescriptor device, String runTargetFormat,deviceTags)
주어진 장치 설명자에 대한 실행 대상을 반환합니다.
매개변수 | |
---|---|
device | DeviceDescriptor : DeviceDescriptor 위한 실행 목표를 얻을 수 있습니다. |
runTargetFormat | String |
deviceTags |
보고 | |
---|---|
String | 실행 대상. |
getTestHarness
public static String getTestHarness ()
보고 | |
---|---|
String |
getTfStartTimeMillis
public static long getTfStartTimeMillis ()
보고 | |
---|---|
long |
getTfVersion
public static String getTfVersion ()
이 호스트에서 실행 중인 TF 버전을 가져옵니다.
보고 | |
---|---|
String | 이 호스트의 TF 버전입니다. |
getUniqueDeviceSerial
public static String getUniqueDeviceSerial (DeviceDescriptor device)
장치에 대한 고유한 장치 직렬을 반환합니다.
비물리적 장치(예: 에뮬레이터)에는 호스트 간에 고유하지 않은 의사 직렬이 있습니다. 이 방법은 호스트 이름을 접두사로 사용하여 고유하게 만듭니다.
매개변수 | |
---|---|
device | DeviceDescriptor : 장치 설명. |
보고 | |
---|---|
String | 고유한 장치 직렬입니다. |
isLocalhostIpPort
public static boolean isLocalhostIpPort (String input)
주어진 입력이 localhost IP:PORT 문자열인지 확인합니다.
매개변수 | |
---|---|
input | String : 문자열 확인 |
보고 | |
---|---|
boolean | 주어진 입력이 localhost IP:PORT 문자열이면 true |
보호된 방법
toValidTfVersion
protected static String toValidTfVersion (String version)
TF 버전의 유효성을 검사하고 정상이면 반환합니다.
매개변수 | |
---|---|
version | String : 제공하는 TF 버전 문자열 VersionParser |
보고 | |
---|---|
String | 유효한 경우 버전 또는 그렇지 않은 경우 기본값입니다. |