ICacheClient

public interface ICacheClient

com.android.tradefed.cache.ICacheClient


An interface for a cache client.

Summary

Public methods

abstract ExecutableActionResult lookupCache(ExecutableAction action)

Lookups the ExecutableActionResult for the action.

abstract void uploadCache(ExecutableAction action, ExecutableActionResult actionResult)

Uploads the results for the ExecutableAction.

Public methods

lookupCache

public abstract ExecutableActionResult lookupCache (ExecutableAction action)

Lookups the ExecutableActionResult for the action.

Note, caller should delete the output files after usage to avoid running out of disk space.

Parameters
action ExecutableAction: The ExecutableAction whose result should be returned.

Returns
ExecutableActionResult the ExecutableActionResult of the action if the result exists, otherwise, null.

Throws
if the client fails to lookup cache.
InterruptedException if the thread that lookups cache is interrupted.

uploadCache

public abstract void uploadCache (ExecutableAction action, 
                ExecutableActionResult actionResult)

Uploads the results for the ExecutableAction.

If the result of the action doesn't exist, the actionResult will be stored. Otherwise, the result will be updated.

Parameters
action ExecutableAction: The action that generated the results.

actionResult ExecutableActionResult: The action result to associate with the action.

Throws
if the client fails to upload cache.
InterruptedException if the thread that uploads cache is interrupted.