RemoteCacheClient

public class RemoteCacheClient
extends Object implements ICacheClient

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


リモート API サーバーへの gRPC 呼び出しを使用する RemoteActionCache の実装。

概要

フィールド

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 結果が存在する場合は ExecutableActionResult。存在しない場合は null。action

例外
IOException
InterruptedException

uploadCache

public void uploadCache (ExecutableAction action, 
                ExecutableActionResult actionResult)

ExecutableAction の結果をアップロードします。

action の結果が存在しない場合は、actionResult が 保存されます。それ以外の場合は、結果が更新されます。

パラメータ
action ExecutableAction: 結果を生成したアクション。

actionResult ExecutableActionResult: action に関連付けるアクションの結果。

例外
IOException
InterruptedException