Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* The action cache API is used to query whether a given action has already been
* performed and, if so, retrieve its result. Unlike the
* [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage],
* which addresses blobs by their own content, the action cache addresses the
* [ActionResult][build.bazel.remote.execution.v2.ActionResult] by a
* digest of the encoded [Action][build.bazel.remote.execution.v2.Action]
* which produced them.
* The lifetime of entries in the action cache is implementation-specific, but
* the server SHOULD assume that more recently used entries are more likely to
* be used again.
* As with other services in the Remote Execution API, any call may return an
* error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
* information about when the client should retry the request; clients SHOULD
* respect the information provided.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.65.0)",
comments = "Source: build/bazel/remote/execution/v2/remote_execution.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ActionCacheGrpc {
private ActionCacheGrpc() {}
public static final java.lang.String SERVICE_NAME = "build.bazel.remote.execution.v2.ActionCache";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getGetActionResultMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetActionResult",
requestType = build.bazel.remote.execution.v2.GetActionResultRequest.class,
responseType = build.bazel.remote.execution.v2.ActionResult.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetActionResultMethod() {
io.grpc.MethodDescriptor getGetActionResultMethod;
if ((getGetActionResultMethod = ActionCacheGrpc.getGetActionResultMethod) == null) {
synchronized (ActionCacheGrpc.class) {
if ((getGetActionResultMethod = ActionCacheGrpc.getGetActionResultMethod) == null) {
ActionCacheGrpc.getGetActionResultMethod = getGetActionResultMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetActionResult"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
build.bazel.remote.execution.v2.GetActionResultRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
build.bazel.remote.execution.v2.ActionResult.getDefaultInstance()))
.setSchemaDescriptor(new ActionCacheMethodDescriptorSupplier("GetActionResult"))
.build();
}
}
}
return getGetActionResultMethod;
}
private static volatile io.grpc.MethodDescriptor getUpdateActionResultMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "UpdateActionResult",
requestType = build.bazel.remote.execution.v2.UpdateActionResultRequest.class,
responseType = build.bazel.remote.execution.v2.ActionResult.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getUpdateActionResultMethod() {
io.grpc.MethodDescriptor getUpdateActionResultMethod;
if ((getUpdateActionResultMethod = ActionCacheGrpc.getUpdateActionResultMethod) == null) {
synchronized (ActionCacheGrpc.class) {
if ((getUpdateActionResultMethod = ActionCacheGrpc.getUpdateActionResultMethod) == null) {
ActionCacheGrpc.getUpdateActionResultMethod = getUpdateActionResultMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateActionResult"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
build.bazel.remote.execution.v2.UpdateActionResultRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
build.bazel.remote.execution.v2.ActionResult.getDefaultInstance()))
.setSchemaDescriptor(new ActionCacheMethodDescriptorSupplier("UpdateActionResult"))
.build();
}
}
}
return getUpdateActionResultMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ActionCacheStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ActionCacheStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ActionCacheStub(channel, callOptions);
}
};
return ActionCacheStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ActionCacheBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ActionCacheBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ActionCacheBlockingStub(channel, callOptions);
}
};
return ActionCacheBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ActionCacheFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ActionCacheFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ActionCacheFutureStub(channel, callOptions);
}
};
return ActionCacheFutureStub.newStub(factory, channel);
}
/**
*
* The action cache API is used to query whether a given action has already been
* performed and, if so, retrieve its result. Unlike the
* [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage],
* which addresses blobs by their own content, the action cache addresses the
* [ActionResult][build.bazel.remote.execution.v2.ActionResult] by a
* digest of the encoded [Action][build.bazel.remote.execution.v2.Action]
* which produced them.
* The lifetime of entries in the action cache is implementation-specific, but
* the server SHOULD assume that more recently used entries are more likely to
* be used again.
* As with other services in the Remote Execution API, any call may return an
* error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
* information about when the client should retry the request; clients SHOULD
* respect the information provided.
*
*/
public interface AsyncService {
/**
*
* Retrieve a cached execution result.
* Implementations SHOULD ensure that any blobs referenced from the
* [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]
* are available at the time of returning the
* [ActionResult][build.bazel.remote.execution.v2.ActionResult] and will be
* for some period of time afterwards. The lifetimes of the referenced blobs SHOULD be increased
* if necessary and applicable.
* Errors:
* * `NOT_FOUND`: The requested `ActionResult` is not in the cache.
*
* Upload a new execution result.
* In order to allow the server to perform access control based on the type of
* action, and to assist with client debugging, the client MUST first upload
* the [Action][build.bazel.remote.execution.v2.Execution] that produced the
* result, along with its
* [Command][build.bazel.remote.execution.v2.Command], into the
* `ContentAddressableStorage`.
* Server implementations MAY modify the
* `UpdateActionResultRequest.action_result` and return an equivalent value.
* Errors:
* * `INVALID_ARGUMENT`: One or more arguments are invalid.
* * `FAILED_PRECONDITION`: One or more errors occurred in updating the
* action result, such as a missing command or action.
* * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the
* entry to the cache.
*
*/
default void updateActionResult(build.bazel.remote.execution.v2.UpdateActionResultRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateActionResultMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service ActionCache.
*
* The action cache API is used to query whether a given action has already been
* performed and, if so, retrieve its result. Unlike the
* [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage],
* which addresses blobs by their own content, the action cache addresses the
* [ActionResult][build.bazel.remote.execution.v2.ActionResult] by a
* digest of the encoded [Action][build.bazel.remote.execution.v2.Action]
* which produced them.
* The lifetime of entries in the action cache is implementation-specific, but
* the server SHOULD assume that more recently used entries are more likely to
* be used again.
* As with other services in the Remote Execution API, any call may return an
* error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
* information about when the client should retry the request; clients SHOULD
* respect the information provided.
*
*/
public static abstract class ActionCacheImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return ActionCacheGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service ActionCache.
*
* The action cache API is used to query whether a given action has already been
* performed and, if so, retrieve its result. Unlike the
* [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage],
* which addresses blobs by their own content, the action cache addresses the
* [ActionResult][build.bazel.remote.execution.v2.ActionResult] by a
* digest of the encoded [Action][build.bazel.remote.execution.v2.Action]
* which produced them.
* The lifetime of entries in the action cache is implementation-specific, but
* the server SHOULD assume that more recently used entries are more likely to
* be used again.
* As with other services in the Remote Execution API, any call may return an
* error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
* information about when the client should retry the request; clients SHOULD
* respect the information provided.
*
*/
public static final class ActionCacheStub
extends io.grpc.stub.AbstractAsyncStub {
private ActionCacheStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ActionCacheStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ActionCacheStub(channel, callOptions);
}
/**
*
* Retrieve a cached execution result.
* Implementations SHOULD ensure that any blobs referenced from the
* [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]
* are available at the time of returning the
* [ActionResult][build.bazel.remote.execution.v2.ActionResult] and will be
* for some period of time afterwards. The lifetimes of the referenced blobs SHOULD be increased
* if necessary and applicable.
* Errors:
* * `NOT_FOUND`: The requested `ActionResult` is not in the cache.
*
* Upload a new execution result.
* In order to allow the server to perform access control based on the type of
* action, and to assist with client debugging, the client MUST first upload
* the [Action][build.bazel.remote.execution.v2.Execution] that produced the
* result, along with its
* [Command][build.bazel.remote.execution.v2.Command], into the
* `ContentAddressableStorage`.
* Server implementations MAY modify the
* `UpdateActionResultRequest.action_result` and return an equivalent value.
* Errors:
* * `INVALID_ARGUMENT`: One or more arguments are invalid.
* * `FAILED_PRECONDITION`: One or more errors occurred in updating the
* action result, such as a missing command or action.
* * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the
* entry to the cache.
*
*/
public void updateActionResult(build.bazel.remote.execution.v2.UpdateActionResultRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getUpdateActionResultMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service ActionCache.
*
* The action cache API is used to query whether a given action has already been
* performed and, if so, retrieve its result. Unlike the
* [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage],
* which addresses blobs by their own content, the action cache addresses the
* [ActionResult][build.bazel.remote.execution.v2.ActionResult] by a
* digest of the encoded [Action][build.bazel.remote.execution.v2.Action]
* which produced them.
* The lifetime of entries in the action cache is implementation-specific, but
* the server SHOULD assume that more recently used entries are more likely to
* be used again.
* As with other services in the Remote Execution API, any call may return an
* error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
* information about when the client should retry the request; clients SHOULD
* respect the information provided.
*
*/
public static final class ActionCacheBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private ActionCacheBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ActionCacheBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ActionCacheBlockingStub(channel, callOptions);
}
/**
*
* Retrieve a cached execution result.
* Implementations SHOULD ensure that any blobs referenced from the
* [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]
* are available at the time of returning the
* [ActionResult][build.bazel.remote.execution.v2.ActionResult] and will be
* for some period of time afterwards. The lifetimes of the referenced blobs SHOULD be increased
* if necessary and applicable.
* Errors:
* * `NOT_FOUND`: The requested `ActionResult` is not in the cache.
*
* Upload a new execution result.
* In order to allow the server to perform access control based on the type of
* action, and to assist with client debugging, the client MUST first upload
* the [Action][build.bazel.remote.execution.v2.Execution] that produced the
* result, along with its
* [Command][build.bazel.remote.execution.v2.Command], into the
* `ContentAddressableStorage`.
* Server implementations MAY modify the
* `UpdateActionResultRequest.action_result` and return an equivalent value.
* Errors:
* * `INVALID_ARGUMENT`: One or more arguments are invalid.
* * `FAILED_PRECONDITION`: One or more errors occurred in updating the
* action result, such as a missing command or action.
* * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the
* entry to the cache.
*
*/
public build.bazel.remote.execution.v2.ActionResult updateActionResult(build.bazel.remote.execution.v2.UpdateActionResultRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUpdateActionResultMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service ActionCache.
*
* The action cache API is used to query whether a given action has already been
* performed and, if so, retrieve its result. Unlike the
* [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage],
* which addresses blobs by their own content, the action cache addresses the
* [ActionResult][build.bazel.remote.execution.v2.ActionResult] by a
* digest of the encoded [Action][build.bazel.remote.execution.v2.Action]
* which produced them.
* The lifetime of entries in the action cache is implementation-specific, but
* the server SHOULD assume that more recently used entries are more likely to
* be used again.
* As with other services in the Remote Execution API, any call may return an
* error with a [RetryInfo][google.rpc.RetryInfo] error detail providing
* information about when the client should retry the request; clients SHOULD
* respect the information provided.
*
*/
public static final class ActionCacheFutureStub
extends io.grpc.stub.AbstractFutureStub {
private ActionCacheFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ActionCacheFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ActionCacheFutureStub(channel, callOptions);
}
/**
*
* Retrieve a cached execution result.
* Implementations SHOULD ensure that any blobs referenced from the
* [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage]
* are available at the time of returning the
* [ActionResult][build.bazel.remote.execution.v2.ActionResult] and will be
* for some period of time afterwards. The lifetimes of the referenced blobs SHOULD be increased
* if necessary and applicable.
* Errors:
* * `NOT_FOUND`: The requested `ActionResult` is not in the cache.
*
* Upload a new execution result.
* In order to allow the server to perform access control based on the type of
* action, and to assist with client debugging, the client MUST first upload
* the [Action][build.bazel.remote.execution.v2.Execution] that produced the
* result, along with its
* [Command][build.bazel.remote.execution.v2.Command], into the
* `ContentAddressableStorage`.
* Server implementations MAY modify the
* `UpdateActionResultRequest.action_result` and return an equivalent value.
* Errors:
* * `INVALID_ARGUMENT`: One or more arguments are invalid.
* * `FAILED_PRECONDITION`: One or more errors occurred in updating the
* action result, such as a missing command or action.
* * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the
* entry to the cache.
*
*/
public com.google.common.util.concurrent.ListenableFuture updateActionResult(
build.bazel.remote.execution.v2.UpdateActionResultRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getUpdateActionResultMethod(), getCallOptions()), request);
}
}
private static final int METHODID_GET_ACTION_RESULT = 0;
private static final int METHODID_UPDATE_ACTION_RESULT = 1;
private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final AsyncService serviceImpl;
private final int methodId;
MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_GET_ACTION_RESULT:
serviceImpl.getActionResult((build.bazel.remote.execution.v2.GetActionResultRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UPDATE_ACTION_RESULT:
serviceImpl.updateActionResult((build.bazel.remote.execution.v2.UpdateActionResultRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getGetActionResultMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
build.bazel.remote.execution.v2.GetActionResultRequest,
build.bazel.remote.execution.v2.ActionResult>(
service, METHODID_GET_ACTION_RESULT)))
.addMethod(
getUpdateActionResultMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
build.bazel.remote.execution.v2.UpdateActionResultRequest,
build.bazel.remote.execution.v2.ActionResult>(
service, METHODID_UPDATE_ACTION_RESULT)))
.build();
}
private static abstract class ActionCacheBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ActionCacheBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return build.bazel.remote.execution.v2.RemoteExecutionProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("ActionCache");
}
}
private static final class ActionCacheFileDescriptorSupplier
extends ActionCacheBaseDescriptorSupplier {
ActionCacheFileDescriptorSupplier() {}
}
private static final class ActionCacheMethodDescriptorSupplier
extends ActionCacheBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
ActionCacheMethodDescriptorSupplier(java.lang.String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (ActionCacheGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ActionCacheFileDescriptorSupplier())
.addMethod(getGetActionResultMethod())
.addMethod(getUpdateActionResultMethod())
.build();
}
}
}
return result;
}
}