RemoteCacheClient
public
class
RemoteCacheClient
extends Object
implements
ICacheClient
| java.lang.Object | |
| ↳ | com.android.tradefed.cache.remote.RemoteCacheClient |
使用 gRPC 调用远程 API 服务器的 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 关联的操作结果。 |