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 ContentAddressedStorageClientIOExceptionpublic boolean containsDigest(Protocol.Digest digest)
containsDigest in interface ContentAddressedStorageClientpublic com.google.common.util.concurrent.ListenableFuture<ByteBuffer> fetch(Protocol.Digest digest)
fetch in interface ContentAddressedStorageClientpublic com.google.common.util.concurrent.ListenableFuture<Unit> materializeOutputs(List<Protocol.OutputDirectory> outputDirectories, List<Protocol.OutputFile> outputFiles, ContentAddressedStorageClient.FileMaterializer materializer) throws IOException
materializeOutputs in interface ContentAddressedStorageClientIOExceptionpublic Protocol.Action materializeAction(Protocol.Digest actionDigest) throws IOException
IOExceptionpublic Optional<Protocol.Command> materializeInputs(Path buildDir, Protocol.Digest rootDigest, Optional<Protocol.Digest> commandDigest) throws IOException
IOExceptionpublic com.google.common.collect.ImmutableList<Protocol.Directory> getTree(Protocol.Digest rootDigest) throws IOException
IOExceptionpublic InputStream getData(Protocol.Digest digest) throws IOException
IOExceptionpublic FileInputStream getFileInputStream(Protocol.Digest digest) throws IOException
IOExceptionpublic java.util.stream.Stream<Protocol.Digest> findMissing(Iterable<Protocol.Digest> digests)