RemoteCacheClient

public class RemoteCacheClient
extends Object implements ICacheClient

java.lang.Object
   ↳ com.android.tradefed.cache.remote.RemoteCacheClient


RemoteActionCache 實作項目,會使用 gRPC 呼叫遠端 API 伺服器。

摘要

欄位

public static final Duration REMOTE_TIMEOUT

公用建構函式

RemoteCacheClient(File workFolder, String instanceName, ManagedChannel channel, CallCredentials callCredentials, ByteStreamDownloader downloader, ByteStreamUploader uploader)

公用方法

ExecutableActionResult lookupCache(ExecutableAction action)

查閱 actionExecutableActionResult

void uploadCache(ExecutableAction action, ExecutableActionResult actionResult)

上傳「ExecutableAction」的結果。

欄位

REMOTE_TIMEOUT

public static final Duration REMOTE_TIMEOUT

公用建構函式

RemoteCacheClient

public RemoteCacheClient (File workFolder, 
                String instanceName, 
                ManagedChannel channel, 
                CallCredentials callCredentials, 
                ByteStreamDownloader downloader, 
                ByteStreamUploader uploader)

參數
workFolder File

instanceName String

channel ManagedChannel

callCredentials CallCredentials

downloader ByteStreamDownloader

uploader ByteStreamUploader

公用方法

lookupCache

public ExecutableActionResult lookupCache (ExecutableAction action)

查詢 actionExecutableActionResult

請注意,呼叫端應在使用後刪除輸出檔案,以免磁碟空間不足。

參數
action ExecutableAction:應傳回結果的 ExecutableAction

傳回
ExecutableActionResult 如果結果存在,則為 ExecutableActionResultaction,否則為空值。

擲回
IOException
InterruptedException

uploadCache

public void uploadCache (ExecutableAction action, 
                ExecutableActionResult actionResult)

上傳「ExecutableAction」的結果。

如果 action 的結果不存在,系統會儲存 actionResult。否則結果會更新。

參數
action ExecutableAction:產生結果的動作。

actionResult ExecutableActionResult:要與 action 建立關聯的動作結果。

擲回
IOException
InterruptedException