public class GrpcAsyncBlobFetcher extends Object implements AsyncBlobFetcher
Constructor and Description |
---|
GrpcAsyncBlobFetcher(String instanceName,
build.bazel.remote.execution.v2.ContentAddressableStorageGrpc.ContentAddressableStorageFutureStub storageStub,
com.google.bytestream.ByteStreamGrpc.ByteStreamStub byteStreamStub,
BuckEventBus buckEventBus,
com.facebook.buck.remoteexecution.proto.RemoteExecutionMetadata metadata,
Protocol protocol,
int casDeadline) |
Modifier and Type | Method and Description |
---|---|
com.google.common.util.concurrent.ListenableFuture<Unit> |
batchFetchBlobs(com.google.common.collect.ImmutableMultimap<Protocol.Digest,Callable<WritableByteChannel>> requests,
com.google.common.collect.ImmutableMultimap<Protocol.Digest,com.google.common.util.concurrent.SettableFuture<Unit>> futures) |
com.google.common.util.concurrent.ListenableFuture<ByteBuffer> |
fetch(Protocol.Digest digest) |
com.google.common.util.concurrent.ListenableFuture<Unit> |
fetchToStream(Protocol.Digest digest,
WritableByteChannel channel) |
public GrpcAsyncBlobFetcher(String instanceName, build.bazel.remote.execution.v2.ContentAddressableStorageGrpc.ContentAddressableStorageFutureStub storageStub, com.google.bytestream.ByteStreamGrpc.ByteStreamStub byteStreamStub, BuckEventBus buckEventBus, com.facebook.buck.remoteexecution.proto.RemoteExecutionMetadata metadata, Protocol protocol, int casDeadline)
public com.google.common.util.concurrent.ListenableFuture<ByteBuffer> fetch(Protocol.Digest digest)
fetch
in interface AsyncBlobFetcher
public com.google.common.util.concurrent.ListenableFuture<Unit> fetchToStream(Protocol.Digest digest, WritableByteChannel channel)
fetchToStream
in interface AsyncBlobFetcher
public com.google.common.util.concurrent.ListenableFuture<Unit> batchFetchBlobs(com.google.common.collect.ImmutableMultimap<Protocol.Digest,Callable<WritableByteChannel>> requests, com.google.common.collect.ImmutableMultimap<Protocol.Digest,com.google.common.util.concurrent.SettableFuture<Unit>> futures)
batchFetchBlobs
in interface AsyncBlobFetcher