Please wait. This can take some minutes ...
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.
io.axoniq.eventstore.grpc.EventStoreGrpc Maven / Gradle / Ivy
package io.axoniq.eventstore.grpc;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.1.2)",
comments = "Source: eventstore_api.proto")
public class EventStoreGrpc {
private EventStoreGrpc() {}
public static final String SERVICE_NAME = "io.axoniq.eventstore.grpc.EventStore";
// Static method descriptors that strictly reflect the proto.
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_APPEND_EVENT =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING,
generateFullMethodName(
"io.axoniq.eventstore.grpc.EventStore", "AppendEvent"),
io.grpc.protobuf.ProtoUtils.marshaller(io.axoniq.eventstore.Event.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(io.axoniq.eventstore.grpc.Confirmation.getDefaultInstance()));
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_APPEND_SNAPSHOT =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"io.axoniq.eventstore.grpc.EventStore", "AppendSnapshot"),
io.grpc.protobuf.ProtoUtils.marshaller(io.axoniq.eventstore.Event.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(io.axoniq.eventstore.grpc.Confirmation.getDefaultInstance()));
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_LIST_AGGREGATE_EVENTS =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING,
generateFullMethodName(
"io.axoniq.eventstore.grpc.EventStore", "ListAggregateEvents"),
io.grpc.protobuf.ProtoUtils.marshaller(io.axoniq.eventstore.grpc.GetAggregateEventsRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(io.axoniq.eventstore.Event.getDefaultInstance()));
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_LIST_EVENTS =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING,
generateFullMethodName(
"io.axoniq.eventstore.grpc.EventStore", "ListEvents"),
io.grpc.protobuf.ProtoUtils.marshaller(io.axoniq.eventstore.grpc.GetEventsRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(io.axoniq.eventstore.grpc.EventWithToken.getDefaultInstance()));
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
public static final io.grpc.MethodDescriptor METHOD_READ_HIGHEST_SEQUENCE_NR =
io.grpc.MethodDescriptor.create(
io.grpc.MethodDescriptor.MethodType.UNARY,
generateFullMethodName(
"io.axoniq.eventstore.grpc.EventStore", "ReadHighestSequenceNr"),
io.grpc.protobuf.ProtoUtils.marshaller(io.axoniq.eventstore.grpc.ReadHighestSequenceNrRequest.getDefaultInstance()),
io.grpc.protobuf.ProtoUtils.marshaller(io.axoniq.eventstore.grpc.ReadHighestSequenceNrResponse.getDefaultInstance()));
/**
* Creates a new async stub that supports all call types for the service
*/
public static EventStoreStub newStub(io.grpc.Channel channel) {
return new EventStoreStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static EventStoreBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new EventStoreBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service
*/
public static EventStoreFutureStub newFutureStub(
io.grpc.Channel channel) {
return new EventStoreFutureStub(channel);
}
/**
*/
public static abstract class EventStoreImplBase implements io.grpc.BindableService {
/**
*
* Accepts a stream of Events returning a Confirmation when completed.
*
*/
public io.grpc.stub.StreamObserver appendEvent(
io.grpc.stub.StreamObserver responseObserver) {
return asyncUnimplementedStreamingCall(METHOD_APPEND_EVENT, responseObserver);
}
/**
*
* Accepts a Snapshot event returning a Confirmation when completed.
*
*/
public void appendSnapshot(io.axoniq.eventstore.Event request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_APPEND_SNAPSHOT, responseObserver);
}
/**
*
* Retrieves the Eevents for a given aggregate. Results are streamed rather than returned at once.
*
*/
public void listAggregateEvents(io.axoniq.eventstore.grpc.GetAggregateEventsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_LIST_AGGREGATE_EVENTS, responseObserver);
}
/**
*
* Retrieves the Events from a given tracking token. Results are streamed rather than returned at once.
*
*/
public io.grpc.stub.StreamObserver listEvents(
io.grpc.stub.StreamObserver responseObserver) {
return asyncUnimplementedStreamingCall(METHOD_LIST_EVENTS, responseObserver);
}
/**
*
* Gets the highest sequence number for a specific aggregate.
*
*/
public void readHighestSequenceNr(io.axoniq.eventstore.grpc.ReadHighestSequenceNrRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(METHOD_READ_HIGHEST_SEQUENCE_NR, responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
METHOD_APPEND_EVENT,
asyncClientStreamingCall(
new MethodHandlers<
io.axoniq.eventstore.Event,
io.axoniq.eventstore.grpc.Confirmation>(
this, METHODID_APPEND_EVENT)))
.addMethod(
METHOD_APPEND_SNAPSHOT,
asyncUnaryCall(
new MethodHandlers<
io.axoniq.eventstore.Event,
io.axoniq.eventstore.grpc.Confirmation>(
this, METHODID_APPEND_SNAPSHOT)))
.addMethod(
METHOD_LIST_AGGREGATE_EVENTS,
asyncServerStreamingCall(
new MethodHandlers<
io.axoniq.eventstore.grpc.GetAggregateEventsRequest,
io.axoniq.eventstore.Event>(
this, METHODID_LIST_AGGREGATE_EVENTS)))
.addMethod(
METHOD_LIST_EVENTS,
asyncBidiStreamingCall(
new MethodHandlers<
io.axoniq.eventstore.grpc.GetEventsRequest,
io.axoniq.eventstore.grpc.EventWithToken>(
this, METHODID_LIST_EVENTS)))
.addMethod(
METHOD_READ_HIGHEST_SEQUENCE_NR,
asyncUnaryCall(
new MethodHandlers<
io.axoniq.eventstore.grpc.ReadHighestSequenceNrRequest,
io.axoniq.eventstore.grpc.ReadHighestSequenceNrResponse>(
this, METHODID_READ_HIGHEST_SEQUENCE_NR)))
.build();
}
}
/**
*/
public static final class EventStoreStub extends io.grpc.stub.AbstractStub {
private EventStoreStub(io.grpc.Channel channel) {
super(channel);
}
private EventStoreStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected EventStoreStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new EventStoreStub(channel, callOptions);
}
/**
*
* Accepts a stream of Events returning a Confirmation when completed.
*
*/
public io.grpc.stub.StreamObserver appendEvent(
io.grpc.stub.StreamObserver responseObserver) {
return asyncClientStreamingCall(
getChannel().newCall(METHOD_APPEND_EVENT, getCallOptions()), responseObserver);
}
/**
*
* Accepts a Snapshot event returning a Confirmation when completed.
*
*/
public void appendSnapshot(io.axoniq.eventstore.Event request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_APPEND_SNAPSHOT, getCallOptions()), request, responseObserver);
}
/**
*
* Retrieves the Eevents for a given aggregate. Results are streamed rather than returned at once.
*
*/
public void listAggregateEvents(io.axoniq.eventstore.grpc.GetAggregateEventsRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncServerStreamingCall(
getChannel().newCall(METHOD_LIST_AGGREGATE_EVENTS, getCallOptions()), request, responseObserver);
}
/**
*
* Retrieves the Events from a given tracking token. Results are streamed rather than returned at once.
*
*/
public io.grpc.stub.StreamObserver listEvents(
io.grpc.stub.StreamObserver responseObserver) {
return asyncBidiStreamingCall(
getChannel().newCall(METHOD_LIST_EVENTS, getCallOptions()), responseObserver);
}
/**
*
* Gets the highest sequence number for a specific aggregate.
*
*/
public void readHighestSequenceNr(io.axoniq.eventstore.grpc.ReadHighestSequenceNrRequest request,
io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_READ_HIGHEST_SEQUENCE_NR, getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class EventStoreBlockingStub extends io.grpc.stub.AbstractStub {
private EventStoreBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private EventStoreBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected EventStoreBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new EventStoreBlockingStub(channel, callOptions);
}
/**
*
* Accepts a Snapshot event returning a Confirmation when completed.
*
*/
public io.axoniq.eventstore.grpc.Confirmation appendSnapshot(io.axoniq.eventstore.Event request) {
return blockingUnaryCall(
getChannel(), METHOD_APPEND_SNAPSHOT, getCallOptions(), request);
}
/**
*
* Retrieves the Eevents for a given aggregate. Results are streamed rather than returned at once.
*
*/
public java.util.Iterator listAggregateEvents(
io.axoniq.eventstore.grpc.GetAggregateEventsRequest request) {
return blockingServerStreamingCall(
getChannel(), METHOD_LIST_AGGREGATE_EVENTS, getCallOptions(), request);
}
/**
*
* Gets the highest sequence number for a specific aggregate.
*
*/
public io.axoniq.eventstore.grpc.ReadHighestSequenceNrResponse readHighestSequenceNr(io.axoniq.eventstore.grpc.ReadHighestSequenceNrRequest request) {
return blockingUnaryCall(
getChannel(), METHOD_READ_HIGHEST_SEQUENCE_NR, getCallOptions(), request);
}
}
/**
*/
public static final class EventStoreFutureStub extends io.grpc.stub.AbstractStub {
private EventStoreFutureStub(io.grpc.Channel channel) {
super(channel);
}
private EventStoreFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected EventStoreFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new EventStoreFutureStub(channel, callOptions);
}
/**
*
* Accepts a Snapshot event returning a Confirmation when completed.
*
*/
public com.google.common.util.concurrent.ListenableFuture appendSnapshot(
io.axoniq.eventstore.Event request) {
return futureUnaryCall(
getChannel().newCall(METHOD_APPEND_SNAPSHOT, getCallOptions()), request);
}
/**
*
* Gets the highest sequence number for a specific aggregate.
*
*/
public com.google.common.util.concurrent.ListenableFuture readHighestSequenceNr(
io.axoniq.eventstore.grpc.ReadHighestSequenceNrRequest request) {
return futureUnaryCall(
getChannel().newCall(METHOD_READ_HIGHEST_SEQUENCE_NR, getCallOptions()), request);
}
}
private static final int METHODID_APPEND_SNAPSHOT = 0;
private static final int METHODID_LIST_AGGREGATE_EVENTS = 1;
private static final int METHODID_READ_HIGHEST_SEQUENCE_NR = 2;
private static final int METHODID_APPEND_EVENT = 3;
private static final int METHODID_LIST_EVENTS = 4;
private static 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 EventStoreImplBase serviceImpl;
private final int methodId;
public MethodHandlers(EventStoreImplBase 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_APPEND_SNAPSHOT:
serviceImpl.appendSnapshot((io.axoniq.eventstore.Event) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_LIST_AGGREGATE_EVENTS:
serviceImpl.listAggregateEvents((io.axoniq.eventstore.grpc.GetAggregateEventsRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_READ_HIGHEST_SEQUENCE_NR:
serviceImpl.readHighestSequenceNr((io.axoniq.eventstore.grpc.ReadHighestSequenceNrRequest) 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) {
case METHODID_APPEND_EVENT:
return (io.grpc.stub.StreamObserver) serviceImpl.appendEvent(
(io.grpc.stub.StreamObserver) responseObserver);
case METHODID_LIST_EVENTS:
return (io.grpc.stub.StreamObserver) serviceImpl.listEvents(
(io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
private static final class EventStoreDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.axoniq.eventstore.grpc.EventstoreApi.getDescriptor();
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (EventStoreGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new EventStoreDescriptorSupplier())
.addMethod(METHOD_APPEND_EVENT)
.addMethod(METHOD_APPEND_SNAPSHOT)
.addMethod(METHOD_LIST_AGGREGATE_EVENTS)
.addMethod(METHOD_LIST_EVENTS)
.addMethod(METHOD_READ_HIGHEST_SEQUENCE_NR)
.build();
}
}
}
return result;
}
}