com.aerospike.vector.client.proto.IndexServiceGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of avs-client-java Show documentation
Show all versions of avs-client-java Show documentation
This project includes the Java client for Aerospike Vector Search for high-performance data interactions.
The newest version!
package com.aerospike.vector.client.proto;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
* Service to manage indices.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.65.1)",
comments = "Source: index.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class IndexServiceGrpc {
private IndexServiceGrpc() {}
public static final java.lang.String SERVICE_NAME = "aerospike.vector.IndexService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getCreateMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Create",
requestType = com.aerospike.vector.client.proto.IndexDefinition.class,
responseType = com.google.protobuf.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getCreateMethod() {
io.grpc.MethodDescriptor getCreateMethod;
if ((getCreateMethod = IndexServiceGrpc.getCreateMethod) == null) {
synchronized (IndexServiceGrpc.class) {
if ((getCreateMethod = IndexServiceGrpc.getCreateMethod) == null) {
IndexServiceGrpc.getCreateMethod = getCreateMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Create"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.aerospike.vector.client.proto.IndexDefinition.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setSchemaDescriptor(new IndexServiceMethodDescriptorSupplier("Create"))
.build();
}
}
}
return getCreateMethod;
}
private static volatile io.grpc.MethodDescriptor getUpdateMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Update",
requestType = com.aerospike.vector.client.proto.IndexUpdateRequest.class,
responseType = com.google.protobuf.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getUpdateMethod() {
io.grpc.MethodDescriptor getUpdateMethod;
if ((getUpdateMethod = IndexServiceGrpc.getUpdateMethod) == null) {
synchronized (IndexServiceGrpc.class) {
if ((getUpdateMethod = IndexServiceGrpc.getUpdateMethod) == null) {
IndexServiceGrpc.getUpdateMethod = getUpdateMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Update"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.aerospike.vector.client.proto.IndexUpdateRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setSchemaDescriptor(new IndexServiceMethodDescriptorSupplier("Update"))
.build();
}
}
}
return getUpdateMethod;
}
private static volatile io.grpc.MethodDescriptor getDropMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Drop",
requestType = com.aerospike.vector.client.proto.IndexId.class,
responseType = com.google.protobuf.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getDropMethod() {
io.grpc.MethodDescriptor getDropMethod;
if ((getDropMethod = IndexServiceGrpc.getDropMethod) == null) {
synchronized (IndexServiceGrpc.class) {
if ((getDropMethod = IndexServiceGrpc.getDropMethod) == null) {
IndexServiceGrpc.getDropMethod = getDropMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Drop"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.aerospike.vector.client.proto.IndexId.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setSchemaDescriptor(new IndexServiceMethodDescriptorSupplier("Drop"))
.build();
}
}
}
return getDropMethod;
}
private static volatile io.grpc.MethodDescriptor getListMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "List",
requestType = com.google.protobuf.Empty.class,
responseType = com.aerospike.vector.client.proto.IndexDefinitionList.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getListMethod() {
io.grpc.MethodDescriptor getListMethod;
if ((getListMethod = IndexServiceGrpc.getListMethod) == null) {
synchronized (IndexServiceGrpc.class) {
if ((getListMethod = IndexServiceGrpc.getListMethod) == null) {
IndexServiceGrpc.getListMethod = getListMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "List"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.aerospike.vector.client.proto.IndexDefinitionList.getDefaultInstance()))
.setSchemaDescriptor(new IndexServiceMethodDescriptorSupplier("List"))
.build();
}
}
}
return getListMethod;
}
private static volatile io.grpc.MethodDescriptor getGetMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Get",
requestType = com.aerospike.vector.client.proto.IndexId.class,
responseType = com.aerospike.vector.client.proto.IndexDefinition.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetMethod() {
io.grpc.MethodDescriptor getGetMethod;
if ((getGetMethod = IndexServiceGrpc.getGetMethod) == null) {
synchronized (IndexServiceGrpc.class) {
if ((getGetMethod = IndexServiceGrpc.getGetMethod) == null) {
IndexServiceGrpc.getGetMethod = getGetMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "Get"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.aerospike.vector.client.proto.IndexId.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.aerospike.vector.client.proto.IndexDefinition.getDefaultInstance()))
.setSchemaDescriptor(new IndexServiceMethodDescriptorSupplier("Get"))
.build();
}
}
}
return getGetMethod;
}
private static volatile io.grpc.MethodDescriptor getGetStatusMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetStatus",
requestType = com.aerospike.vector.client.proto.IndexId.class,
responseType = com.aerospike.vector.client.proto.IndexStatusResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetStatusMethod() {
io.grpc.MethodDescriptor getGetStatusMethod;
if ((getGetStatusMethod = IndexServiceGrpc.getGetStatusMethod) == null) {
synchronized (IndexServiceGrpc.class) {
if ((getGetStatusMethod = IndexServiceGrpc.getGetStatusMethod) == null) {
IndexServiceGrpc.getGetStatusMethod = getGetStatusMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStatus"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.aerospike.vector.client.proto.IndexId.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.aerospike.vector.client.proto.IndexStatusResponse.getDefaultInstance()))
.setSchemaDescriptor(new IndexServiceMethodDescriptorSupplier("GetStatus"))
.build();
}
}
}
return getGetStatusMethod;
}
private static volatile io.grpc.MethodDescriptor getGcInvalidVerticesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GcInvalidVertices",
requestType = com.aerospike.vector.client.proto.GcInvalidVerticesRequest.class,
responseType = com.google.protobuf.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGcInvalidVerticesMethod() {
io.grpc.MethodDescriptor getGcInvalidVerticesMethod;
if ((getGcInvalidVerticesMethod = IndexServiceGrpc.getGcInvalidVerticesMethod) == null) {
synchronized (IndexServiceGrpc.class) {
if ((getGcInvalidVerticesMethod = IndexServiceGrpc.getGcInvalidVerticesMethod) == null) {
IndexServiceGrpc.getGcInvalidVerticesMethod = getGcInvalidVerticesMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GcInvalidVertices"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.aerospike.vector.client.proto.GcInvalidVerticesRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setSchemaDescriptor(new IndexServiceMethodDescriptorSupplier("GcInvalidVertices"))
.build();
}
}
}
return getGcInvalidVerticesMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static IndexServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public IndexServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IndexServiceStub(channel, callOptions);
}
};
return IndexServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static IndexServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public IndexServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IndexServiceBlockingStub(channel, callOptions);
}
};
return IndexServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static IndexServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public IndexServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IndexServiceFutureStub(channel, callOptions);
}
};
return IndexServiceFutureStub.newStub(factory, channel);
}
/**
*
* Service to manage indices.
*
*/
public interface AsyncService {
/**
*
* Create an index.
*
*/
default void create(com.aerospike.vector.client.proto.IndexDefinition request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateMethod(), responseObserver);
}
/**
*
* Create an index.
*
*/
default void update(com.aerospike.vector.client.proto.IndexUpdateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateMethod(), responseObserver);
}
/**
*
* Drop an index.
*
*/
default void drop(com.aerospike.vector.client.proto.IndexId request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDropMethod(), responseObserver);
}
/**
*
* List available indices.
*
*/
default void list(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListMethod(), responseObserver);
}
/**
*
* Get the index definition.
*
*/
default void get(com.aerospike.vector.client.proto.IndexId request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetMethod(), responseObserver);
}
/**
*
* Query status of an index.
* NOTE: API is subject to change.
*
*/
default void getStatus(com.aerospike.vector.client.proto.IndexId request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStatusMethod(), responseObserver);
}
/**
*
* Garbage collect vertices identified as invalid before cutoff timestamp.
*
*/
default void gcInvalidVertices(com.aerospike.vector.client.proto.GcInvalidVerticesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGcInvalidVerticesMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service IndexService.
*
* Service to manage indices.
*
*/
public static abstract class IndexServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return IndexServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service IndexService.
*
* Service to manage indices.
*
*/
public static final class IndexServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private IndexServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IndexServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IndexServiceStub(channel, callOptions);
}
/**
*
* Create an index.
*
*/
public void create(com.aerospike.vector.client.proto.IndexDefinition request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCreateMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Create an index.
*
*/
public void update(com.aerospike.vector.client.proto.IndexUpdateRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getUpdateMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Drop an index.
*
*/
public void drop(com.aerospike.vector.client.proto.IndexId request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDropMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* List available indices.
*
*/
public void list(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getListMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Get the index definition.
*
*/
public void get(com.aerospike.vector.client.proto.IndexId request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Query status of an index.
* NOTE: API is subject to change.
*
*/
public void getStatus(com.aerospike.vector.client.proto.IndexId request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetStatusMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Garbage collect vertices identified as invalid before cutoff timestamp.
*
*/
public void gcInvalidVertices(com.aerospike.vector.client.proto.GcInvalidVerticesRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGcInvalidVerticesMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service IndexService.
*
* Service to manage indices.
*
*/
public static final class IndexServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private IndexServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IndexServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IndexServiceBlockingStub(channel, callOptions);
}
/**
*
* Create an index.
*
*/
public com.google.protobuf.Empty create(com.aerospike.vector.client.proto.IndexDefinition request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateMethod(), getCallOptions(), request);
}
/**
*
* Create an index.
*
*/
public com.google.protobuf.Empty update(com.aerospike.vector.client.proto.IndexUpdateRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUpdateMethod(), getCallOptions(), request);
}
/**
*
* Drop an index.
*
*/
public com.google.protobuf.Empty drop(com.aerospike.vector.client.proto.IndexId request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDropMethod(), getCallOptions(), request);
}
/**
*
* List available indices.
*
*/
public com.aerospike.vector.client.proto.IndexDefinitionList list(com.google.protobuf.Empty request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListMethod(), getCallOptions(), request);
}
/**
*
* Get the index definition.
*
*/
public com.aerospike.vector.client.proto.IndexDefinition get(com.aerospike.vector.client.proto.IndexId request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetMethod(), getCallOptions(), request);
}
/**
*
* Query status of an index.
* NOTE: API is subject to change.
*
*/
public com.aerospike.vector.client.proto.IndexStatusResponse getStatus(com.aerospike.vector.client.proto.IndexId request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetStatusMethod(), getCallOptions(), request);
}
/**
*
* Garbage collect vertices identified as invalid before cutoff timestamp.
*
*/
public com.google.protobuf.Empty gcInvalidVertices(com.aerospike.vector.client.proto.GcInvalidVerticesRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGcInvalidVerticesMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service IndexService.
*
* Service to manage indices.
*
*/
public static final class IndexServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private IndexServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IndexServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IndexServiceFutureStub(channel, callOptions);
}
/**
*
* Create an index.
*
*/
public com.google.common.util.concurrent.ListenableFuture create(
com.aerospike.vector.client.proto.IndexDefinition request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCreateMethod(), getCallOptions()), request);
}
/**
*
* Create an index.
*
*/
public com.google.common.util.concurrent.ListenableFuture update(
com.aerospike.vector.client.proto.IndexUpdateRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getUpdateMethod(), getCallOptions()), request);
}
/**
*
* Drop an index.
*
*/
public com.google.common.util.concurrent.ListenableFuture drop(
com.aerospike.vector.client.proto.IndexId request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDropMethod(), getCallOptions()), request);
}
/**
*
* List available indices.
*
*/
public com.google.common.util.concurrent.ListenableFuture list(
com.google.protobuf.Empty request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getListMethod(), getCallOptions()), request);
}
/**
*
* Get the index definition.
*
*/
public com.google.common.util.concurrent.ListenableFuture get(
com.aerospike.vector.client.proto.IndexId request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetMethod(), getCallOptions()), request);
}
/**
*
* Query status of an index.
* NOTE: API is subject to change.
*
*/
public com.google.common.util.concurrent.ListenableFuture getStatus(
com.aerospike.vector.client.proto.IndexId request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetStatusMethod(), getCallOptions()), request);
}
/**
*
* Garbage collect vertices identified as invalid before cutoff timestamp.
*
*/
public com.google.common.util.concurrent.ListenableFuture gcInvalidVertices(
com.aerospike.vector.client.proto.GcInvalidVerticesRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGcInvalidVerticesMethod(), getCallOptions()), request);
}
}
private static final int METHODID_CREATE = 0;
private static final int METHODID_UPDATE = 1;
private static final int METHODID_DROP = 2;
private static final int METHODID_LIST = 3;
private static final int METHODID_GET = 4;
private static final int METHODID_GET_STATUS = 5;
private static final int METHODID_GC_INVALID_VERTICES = 6;
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_CREATE:
serviceImpl.create((com.aerospike.vector.client.proto.IndexDefinition) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UPDATE:
serviceImpl.update((com.aerospike.vector.client.proto.IndexUpdateRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DROP:
serviceImpl.drop((com.aerospike.vector.client.proto.IndexId) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LIST:
serviceImpl.list((com.google.protobuf.Empty) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET:
serviceImpl.get((com.aerospike.vector.client.proto.IndexId) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_STATUS:
serviceImpl.getStatus((com.aerospike.vector.client.proto.IndexId) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GC_INVALID_VERTICES:
serviceImpl.gcInvalidVertices((com.aerospike.vector.client.proto.GcInvalidVerticesRequest) 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(
getCreateMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.aerospike.vector.client.proto.IndexDefinition,
com.google.protobuf.Empty>(
service, METHODID_CREATE)))
.addMethod(
getUpdateMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.aerospike.vector.client.proto.IndexUpdateRequest,
com.google.protobuf.Empty>(
service, METHODID_UPDATE)))
.addMethod(
getDropMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.aerospike.vector.client.proto.IndexId,
com.google.protobuf.Empty>(
service, METHODID_DROP)))
.addMethod(
getListMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.protobuf.Empty,
com.aerospike.vector.client.proto.IndexDefinitionList>(
service, METHODID_LIST)))
.addMethod(
getGetMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.aerospike.vector.client.proto.IndexId,
com.aerospike.vector.client.proto.IndexDefinition>(
service, METHODID_GET)))
.addMethod(
getGetStatusMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.aerospike.vector.client.proto.IndexId,
com.aerospike.vector.client.proto.IndexStatusResponse>(
service, METHODID_GET_STATUS)))
.addMethod(
getGcInvalidVerticesMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.aerospike.vector.client.proto.GcInvalidVerticesRequest,
com.google.protobuf.Empty>(
service, METHODID_GC_INVALID_VERTICES)))
.build();
}
private static abstract class IndexServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
IndexServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.aerospike.vector.client.proto.Index.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("IndexService");
}
}
private static final class IndexServiceFileDescriptorSupplier
extends IndexServiceBaseDescriptorSupplier {
IndexServiceFileDescriptorSupplier() {}
}
private static final class IndexServiceMethodDescriptorSupplier
extends IndexServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
IndexServiceMethodDescriptorSupplier(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 (IndexServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new IndexServiceFileDescriptorSupplier())
.addMethod(getCreateMethod())
.addMethod(getUpdateMethod())
.addMethod(getDropMethod())
.addMethod(getListMethod())
.addMethod(getGetMethod())
.addMethod(getGetStatusMethod())
.addMethod(getGcInvalidVerticesMethod())
.build();
}
}
}
return result;
}
}