MerkleTree

public abstract class MerkleTree
extends Object

java.lang.Object
   ↳ com.android.tradefed.cache.MerkleTree


A merkle tree representation as defined by the remote execution api.

Summary

Public constructors

MerkleTree()

Public methods

static MerkleTree buildFromDir(File directory)

Builds a merkle tree for the directory.

abstract LinkedHashMap<Digest, File> digestToFile()

The map of digests to files within this merkle tree.

abstract LinkedHashMap<Digest, Directory> digestToSubdir()

The map of digests to Sub-directories within this merkle tree.

abstract Directory root()

The root Directory of this Merkle tree.

abstract Digest rootDigest()

The Digest of the root Directory of this Merkle tree.

abstract String rootName()

The name of the root Directory of this Merkle tree.

Public constructors

MerkleTree

public MerkleTree ()

Public methods

buildFromDir

public static MerkleTree buildFromDir (File directory)

Builds a merkle tree for the directory.

Parameters
directory File

Returns
MerkleTree

Throws
IOException

digestToFile

public abstract LinkedHashMap<Digest, File> digestToFile ()

The map of digests to files within this merkle tree.

Returns
LinkedHashMap<Digest, File>

digestToSubdir

public abstract LinkedHashMap<Digest, Directory> digestToSubdir ()

The map of digests to Sub-directories within this merkle tree.

Returns
LinkedHashMap<Digest, Directory>

root

public abstract Directory root ()

The root Directory of this Merkle tree.

Returns
Directory

rootDigest

public abstract Digest rootDigest ()

The Digest of the root Directory of this Merkle tree. Note, this is only consumed by the cache client.

Returns
Digest

rootName

public abstract String rootName ()

The name of the root Directory of this Merkle tree.

Returns
String