RemoteCacheClient
public
class
RemoteCacheClient
extends Object
implements
ICacheClient
| java.lang.Object | |
| ↳ | com.android.tradefed.cache.remote.RemoteCacheClient |
Implementasi RemoteActionCache yang menggunakan panggilan gRPC ke server API jarak jauh.
Ringkasan
Kolom | |
|---|---|
public
static
final
Duration |
REMOTE_TIMEOUT
|
Konstruktor publik | |
|---|---|
RemoteCacheClient(File workFolder, String instanceName, ManagedChannel channel, CallCredentials callCredentials, ByteStreamDownloader downloader, ByteStreamUploader uploader)
|
|
Metode publik | |
|---|---|
ExecutableActionResult
|
lookupCache(ExecutableAction action)
Mencari |
void
|
uploadCache(ExecutableAction action, ExecutableActionResult actionResult)
Mengupload hasil untuk |
Kolom
REMOTE_TIMEOUT
public static final Duration REMOTE_TIMEOUT
Konstruktor publik
RemoteCacheClient
public RemoteCacheClient (File workFolder,
String instanceName,
ManagedChannel channel,
CallCredentials callCredentials,
ByteStreamDownloader downloader,
ByteStreamUploader uploader)| Parameter | |
|---|---|
workFolder |
File |
instanceName |
String |
channel |
ManagedChannel |
callCredentials |
CallCredentials |
downloader |
ByteStreamDownloader |
uploader |
ByteStreamUploader |
Metode publik
lookupCache
public ExecutableActionResult lookupCache (ExecutableAction action)
Mencari ExecutableActionResult untuk action.
Perhatikan, pemanggil harus menghapus file output setelah penggunaan agar tidak kehabisan ruang disk.
| Parameter | |
|---|---|
action |
ExecutableAction: ExecutableAction yang hasilnya harus ditampilkan. |
| Hasil | |
|---|---|
ExecutableActionResult |
ExecutableActionResult dari action jika hasilnya ada,
jika tidak, null. |
uploadCache
public void uploadCache (ExecutableAction action, ExecutableActionResult actionResult)
Mengupload hasil untuk ExecutableAction.
Jika hasil action tidak ada, actionResult akan disimpan. Jika tidak, hasilnya akan diperbarui.
| Parameter | |
|---|---|
action |
ExecutableAction: Tindakan yang menghasilkan hasil. |
actionResult |
ExecutableActionResult: Hasil tindakan yang akan dikaitkan dengan action. |