Skip to content

Commit 940d890

Browse files
authored
Merge pull request #533 from weaviate/chore/protobufs
chore(protocol): update protobufs
2 parents 84477d3 + 3f1cf1e commit 940d890

6 files changed

Lines changed: 9398 additions & 5361 deletions

File tree

src/main/java/io/weaviate/client6/v1/internal/grpc/protocol/WeaviateGrpc.java

Lines changed: 21 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -201,60 +201,29 @@ io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoAggregate.AggregateRe
201201
return getAggregateMethod;
202202
}
203203

204-
private static volatile io.grpc.MethodDescriptor<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendRequest,
205-
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendReply> getBatchSendMethod;
206-
207-
@io.grpc.stub.annotations.RpcMethod(
208-
fullMethodName = SERVICE_NAME + '/' + "BatchSend",
209-
requestType = io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendRequest.class,
210-
responseType = io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendReply.class,
211-
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
212-
public static io.grpc.MethodDescriptor<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendRequest,
213-
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendReply> getBatchSendMethod() {
214-
io.grpc.MethodDescriptor<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendRequest, io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendReply> getBatchSendMethod;
215-
if ((getBatchSendMethod = WeaviateGrpc.getBatchSendMethod) == null) {
216-
synchronized (WeaviateGrpc.class) {
217-
if ((getBatchSendMethod = WeaviateGrpc.getBatchSendMethod) == null) {
218-
WeaviateGrpc.getBatchSendMethod = getBatchSendMethod =
219-
io.grpc.MethodDescriptor.<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendRequest, io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendReply>newBuilder()
220-
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
221-
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchSend"))
222-
.setSampledToLocalTracing(true)
223-
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
224-
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendRequest.getDefaultInstance()))
225-
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
226-
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendReply.getDefaultInstance()))
227-
.setSchemaDescriptor(new WeaviateMethodDescriptorSupplier("BatchSend"))
228-
.build();
229-
}
230-
}
231-
}
232-
return getBatchSendMethod;
233-
}
234-
235204
private static volatile io.grpc.MethodDescriptor<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest,
236-
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamMessage> getBatchStreamMethod;
205+
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamReply> getBatchStreamMethod;
237206

238207
@io.grpc.stub.annotations.RpcMethod(
239208
fullMethodName = SERVICE_NAME + '/' + "BatchStream",
240209
requestType = io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest.class,
241-
responseType = io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamMessage.class,
242-
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
210+
responseType = io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamReply.class,
211+
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
243212
public static io.grpc.MethodDescriptor<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest,
244-
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamMessage> getBatchStreamMethod() {
245-
io.grpc.MethodDescriptor<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest, io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamMessage> getBatchStreamMethod;
213+
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamReply> getBatchStreamMethod() {
214+
io.grpc.MethodDescriptor<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest, io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamReply> getBatchStreamMethod;
246215
if ((getBatchStreamMethod = WeaviateGrpc.getBatchStreamMethod) == null) {
247216
synchronized (WeaviateGrpc.class) {
248217
if ((getBatchStreamMethod = WeaviateGrpc.getBatchStreamMethod) == null) {
249218
WeaviateGrpc.getBatchStreamMethod = getBatchStreamMethod =
250-
io.grpc.MethodDescriptor.<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest, io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamMessage>newBuilder()
251-
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
219+
io.grpc.MethodDescriptor.<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest, io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamReply>newBuilder()
220+
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
252221
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchStream"))
253222
.setSampledToLocalTracing(true)
254223
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
255224
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest.getDefaultInstance()))
256225
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
257-
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamMessage.getDefaultInstance()))
226+
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamReply.getDefaultInstance()))
258227
.setSchemaDescriptor(new WeaviateMethodDescriptorSupplier("BatchStream"))
259228
.build();
260229
}
@@ -355,16 +324,9 @@ default void aggregate(io.weaviate.client6.v1.internal.grpc.protocol.WeaviatePro
355324

356325
/**
357326
*/
358-
default void batchSend(io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendRequest request,
359-
io.grpc.stub.StreamObserver<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendReply> responseObserver) {
360-
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchSendMethod(), responseObserver);
361-
}
362-
363-
/**
364-
*/
365-
default void batchStream(io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest request,
366-
io.grpc.stub.StreamObserver<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamMessage> responseObserver) {
367-
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchStreamMethod(), responseObserver);
327+
default io.grpc.stub.StreamObserver<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest> batchStream(
328+
io.grpc.stub.StreamObserver<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamReply> responseObserver) {
329+
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getBatchStreamMethod(), responseObserver);
368330
}
369331
}
370332

@@ -445,18 +407,10 @@ public void aggregate(io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProt
445407

446408
/**
447409
*/
448-
public void batchSend(io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendRequest request,
449-
io.grpc.stub.StreamObserver<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendReply> responseObserver) {
450-
io.grpc.stub.ClientCalls.asyncUnaryCall(
451-
getChannel().newCall(getBatchSendMethod(), getCallOptions()), request, responseObserver);
452-
}
453-
454-
/**
455-
*/
456-
public void batchStream(io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest request,
457-
io.grpc.stub.StreamObserver<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamMessage> responseObserver) {
458-
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
459-
getChannel().newCall(getBatchStreamMethod(), getCallOptions()), request, responseObserver);
410+
public io.grpc.stub.StreamObserver<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest> batchStream(
411+
io.grpc.stub.StreamObserver<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamReply> responseObserver) {
412+
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
413+
getChannel().newCall(getBatchStreamMethod(), getCallOptions()), responseObserver);
460414
}
461415
}
462416

@@ -517,21 +471,6 @@ public io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoAggregate.Aggr
517471
return io.grpc.stub.ClientCalls.blockingUnaryCall(
518472
getChannel(), getAggregateMethod(), getCallOptions(), request);
519473
}
520-
521-
/**
522-
*/
523-
public io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendReply batchSend(io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendRequest request) {
524-
return io.grpc.stub.ClientCalls.blockingUnaryCall(
525-
getChannel(), getBatchSendMethod(), getCallOptions(), request);
526-
}
527-
528-
/**
529-
*/
530-
public java.util.Iterator<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamMessage> batchStream(
531-
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest request) {
532-
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
533-
getChannel(), getBatchStreamMethod(), getCallOptions(), request);
534-
}
535474
}
536475

537476
/**
@@ -597,14 +536,6 @@ public com.google.common.util.concurrent.ListenableFuture<io.weaviate.client6.v1
597536
return io.grpc.stub.ClientCalls.futureUnaryCall(
598537
getChannel().newCall(getAggregateMethod(), getCallOptions()), request);
599538
}
600-
601-
/**
602-
*/
603-
public com.google.common.util.concurrent.ListenableFuture<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendReply> batchSend(
604-
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendRequest request) {
605-
return io.grpc.stub.ClientCalls.futureUnaryCall(
606-
getChannel().newCall(getBatchSendMethod(), getCallOptions()), request);
607-
}
608539
}
609540

610541
private static final int METHODID_SEARCH = 0;
@@ -613,8 +544,7 @@ public com.google.common.util.concurrent.ListenableFuture<io.weaviate.client6.v1
613544
private static final int METHODID_BATCH_DELETE = 3;
614545
private static final int METHODID_TENANTS_GET = 4;
615546
private static final int METHODID_AGGREGATE = 5;
616-
private static final int METHODID_BATCH_SEND = 6;
617-
private static final int METHODID_BATCH_STREAM = 7;
547+
private static final int METHODID_BATCH_STREAM = 6;
618548

619549
private static final class MethodHandlers<Req, Resp> implements
620550
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
@@ -657,14 +587,6 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
657587
serviceImpl.aggregate((io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoAggregate.AggregateRequest) request,
658588
(io.grpc.stub.StreamObserver<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoAggregate.AggregateReply>) responseObserver);
659589
break;
660-
case METHODID_BATCH_SEND:
661-
serviceImpl.batchSend((io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendRequest) request,
662-
(io.grpc.stub.StreamObserver<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendReply>) responseObserver);
663-
break;
664-
case METHODID_BATCH_STREAM:
665-
serviceImpl.batchStream((io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest) request,
666-
(io.grpc.stub.StreamObserver<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamMessage>) responseObserver);
667-
break;
668590
default:
669591
throw new AssertionError();
670592
}
@@ -675,6 +597,9 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
675597
public io.grpc.stub.StreamObserver<Req> invoke(
676598
io.grpc.stub.StreamObserver<Resp> responseObserver) {
677599
switch (methodId) {
600+
case METHODID_BATCH_STREAM:
601+
return (io.grpc.stub.StreamObserver<Req>) serviceImpl.batchStream(
602+
(io.grpc.stub.StreamObserver<io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamReply>) responseObserver);
678603
default:
679604
throw new AssertionError();
680605
}
@@ -725,19 +650,12 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser
725650
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoAggregate.AggregateRequest,
726651
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoAggregate.AggregateReply>(
727652
service, METHODID_AGGREGATE)))
728-
.addMethod(
729-
getBatchSendMethod(),
730-
io.grpc.stub.ServerCalls.asyncUnaryCall(
731-
new MethodHandlers<
732-
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendRequest,
733-
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchSendReply>(
734-
service, METHODID_BATCH_SEND)))
735653
.addMethod(
736654
getBatchStreamMethod(),
737-
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
655+
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
738656
new MethodHandlers<
739657
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamRequest,
740-
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamMessage>(
658+
io.weaviate.client6.v1.internal.grpc.protocol.WeaviateProtoBatch.BatchStreamReply>(
741659
service, METHODID_BATCH_STREAM)))
742660
.build();
743661
}
@@ -793,7 +711,6 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
793711
.addMethod(getBatchDeleteMethod())
794712
.addMethod(getTenantsGetMethod())
795713
.addMethod(getAggregateMethod())
796-
.addMethod(getBatchSendMethod())
797714
.addMethod(getBatchStreamMethod())
798715
.build();
799716
}

src/main/java/io/weaviate/client6/v1/internal/grpc/protocol/WeaviateProto.java

Lines changed: 6 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)