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)
|
void
|
uploadCache(ExecutableAction action, ExecutableActionResult actionResult)
|
フィールド
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)
action
の ExecutableActionResult
を検索します。
ディスク容量不足を防ぐため、呼び出し元は使用後に出力ファイルを削除する必要があります。
パラメータ | |
---|---|
action |
ExecutableAction : 結果を返す ExecutableAction 。 |
戻り値 | |
---|---|
ExecutableActionResult |
結果が存在する場合は action の ExecutableActionResult 、存在しない場合は null。 |
uploadCache
public void uploadCache (ExecutableAction action, ExecutableActionResult actionResult)
ExecutableAction
の結果をアップロードします。
action
の結果が存在しない場合、actionResult
が保存されます。一致しなかった場合は、結果が更新されます。
パラメータ | |
---|---|
action |
ExecutableAction : 結果を生成するアクション。 |
actionResult |
ExecutableActionResult : action に関連付けるアクション結果。 |