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

‫constructors ציבוריים

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

‫methods ציבוריים

ExecutableActionResult lookupCache(ExecutableAction action)

הפונקציה מחפשת את ExecutableActionResult של action.

void uploadCache(ExecutableAction action, ExecutableActionResult actionResult)

העלאת התוצאות של ExecutableAction.

שדות

REMOTE_TIMEOUT

public static final Duration REMOTE_TIMEOUT

‫constructors ציבוריים

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

‫methods ציבוריים

lookupCache

public ExecutableActionResult lookupCache (ExecutableAction action)

הפונקציה מחפשת את ExecutableActionResult של action.

הערה: כדי שלא ייגמר המקום בדיסק, המתקשר צריך למחוק את קובצי הפלט אחרי השימוש.

פרמטרים
action ExecutableAction: ה-ExecutableAction שהתוצאה שלו צריכה להיות מוחזרת.

החזרות
ExecutableActionResult הערך ExecutableActionResult של action אם התוצאה קיימת, אחרת, הערך null.

הקפצת הודעות שגיאה (throw)
IOException
InterruptedException

uploadCache

public void uploadCache (ExecutableAction action, 
                ExecutableActionResult actionResult)

העלאת התוצאות של ExecutableAction.

אם התוצאה של action לא קיימת, הערך של actionResult יישמר. אחרת, התוצאה תעודכן.

פרמטרים
action ExecutableAction: הפעולה שיצרה את התוצאות.

actionResult ExecutableActionResult: תוצאת הפעולה שרוצים לשייך ל-action.

הקפצת הודעות שגיאה (throw)
IOException
InterruptedException