public class LocalContentAddressedStorage extends Object implements ContentAddressedStorageClient
ContentAddressedStorageClient.FileMaterializer
Constructor and Description |
---|
LocalContentAddressedStorage(Path cacheDir,
Protocol protocol,
BuckEventBus buckEventBus) |
Modifier and Type | Method and Description |
---|---|
com.google.common.util.concurrent.ListenableFuture<Unit> |
addMissing(Collection<UploadDataSupplier> data) |
com.google.common.collect.ImmutableList<CasBlobUploader.UploadResult> |
batchUpdateBlobs(com.google.common.collect.ImmutableList<UploadDataSupplier> blobData)
Upload blobs.
|
boolean |
containsDigest(Protocol.Digest digest) |
com.google.common.util.concurrent.ListenableFuture<ByteBuffer> |
fetch(Protocol.Digest digest) |
java.util.stream.Stream<Protocol.Digest> |
findMissing(Iterable<Protocol.Digest> digests) |
InputStream |
getData(Protocol.Digest digest)
Looks up some data.
|
FileInputStream |
getFileInputStream(Protocol.Digest digest)
Get a file input stream to a Digest
|
com.google.common.collect.ImmutableList<Protocol.Directory> |
getTree(Protocol.Digest rootDigest)
Returns a list of all sub directories.
|
Protocol.Action |
materializeAction(Protocol.Digest actionDigest) |
Optional<Protocol.Command> |
materializeInputs(Path buildDir,
Protocol.Digest rootDigest,
Optional<Protocol.Digest> commandDigest) |
com.google.common.util.concurrent.ListenableFuture<Unit> |
materializeOutputs(List<Protocol.OutputDirectory> outputDirectories,
List<Protocol.OutputFile> outputFiles,
ContentAddressedStorageClient.FileMaterializer materializer)
Materializes the outputs into the build root.
|
public LocalContentAddressedStorage(Path cacheDir, Protocol protocol, BuckEventBus buckEventBus)
public com.google.common.collect.ImmutableList<CasBlobUploader.UploadResult> batchUpdateBlobs(com.google.common.collect.ImmutableList<UploadDataSupplier> blobData)
public com.google.common.util.concurrent.ListenableFuture<Unit> addMissing(Collection<UploadDataSupplier> data) throws IOException
addMissing
in interface ContentAddressedStorageClient
IOException
public boolean containsDigest(Protocol.Digest digest)
containsDigest
in interface ContentAddressedStorageClient
public com.google.common.util.concurrent.ListenableFuture<ByteBuffer> fetch(Protocol.Digest digest)
fetch
in interface ContentAddressedStorageClient
public com.google.common.util.concurrent.ListenableFuture<Unit> materializeOutputs(List<Protocol.OutputDirectory> outputDirectories, List<Protocol.OutputFile> outputFiles, ContentAddressedStorageClient.FileMaterializer materializer) throws IOException
materializeOutputs
in interface ContentAddressedStorageClient
IOException
public Protocol.Action materializeAction(Protocol.Digest actionDigest) throws IOException
IOException
public Optional<Protocol.Command> materializeInputs(Path buildDir, Protocol.Digest rootDigest, Optional<Protocol.Digest> commandDigest) throws IOException
IOException
public com.google.common.collect.ImmutableList<Protocol.Directory> getTree(Protocol.Digest rootDigest) throws IOException
IOException
public InputStream getData(Protocol.Digest digest) throws IOException
IOException
public FileInputStream getFileInputStream(Protocol.Digest digest) throws IOException
IOException
public java.util.stream.Stream<Protocol.Digest> findMissing(Iterable<Protocol.Digest> digests)