Class EventStoreGrpc.EventStoreStub

  • Enclosing class:
    EventStoreGrpc

    public static final class EventStoreGrpc.EventStoreStub
    extends io.grpc.stub.AbstractAsyncStub<EventStoreGrpc.EventStoreStub>
    A stub to allow clients to do asynchronous rpc calls to service EventStore.
     Service providing operations against the EventStore functionality of Axon Server 
     
    • Method Detail

      • appendEvent

        public io.grpc.stub.StreamObserver<Event> appendEvent​(io.grpc.stub.StreamObserver<ConfirmationWithConsistencyMarker> responseObserver)
         Accepts a stream of Events returning a Confirmation when completed.
         
      • appendSnapshot

        public void appendSnapshot​(Event request,
                                   io.grpc.stub.StreamObserver<Confirmation> responseObserver)
         Accepts a Snapshot event returning a Confirmation when completed.
         
      • listAggregateEvents

        public void listAggregateEvents​(GetAggregateEventsRequest request,
                                        io.grpc.stub.StreamObserver<Event> responseObserver)
         Retrieves the Events for a given aggregate. Results are streamed rather than returned at once.
         
      • listAggregateSnapshots

        public void listAggregateSnapshots​(GetAggregateSnapshotsRequest request,
                                           io.grpc.stub.StreamObserver<Event> responseObserver)
         Retrieves the Snapshots for a given aggregate. Results are streamed rather than returned at once.
         
      • listEvents

        public io.grpc.stub.StreamObserver<GetEventsRequest> listEvents​(io.grpc.stub.StreamObserver<EventWithToken> responseObserver)
         Retrieves the Events from a given tracking token. However, if several GetEventsRequests are sent in the stream
        only first one will create the tracker, others are used for increasing number of permits or blacklisting. Results
        are streamed rather than returned at once. 
         
      • queryEvents

        public io.grpc.stub.StreamObserver<QueryEventsRequest> queryEvents​(io.grpc.stub.StreamObserver<QueryEventsResponse> responseObserver)
         Performs a query on the event store, returns a stream of results. Input is a stream to allow flow control from the
         client
         
      • getFirstToken

        public void getFirstToken​(GetFirstTokenRequest request,
                                  io.grpc.stub.StreamObserver<TrackingToken> responseObserver)
         Retrieves the first token available in event store (typically 0). Returns 0 when no events in store.
         
      • getLastToken

        public void getLastToken​(GetLastTokenRequest request,
                                 io.grpc.stub.StreamObserver<TrackingToken> responseObserver)
         Retrieves the last committed token in event store. Returns -1 when no events in store.
         
      • getTokenAt

        public void getTokenAt​(GetTokenAtRequest request,
                               io.grpc.stub.StreamObserver<TrackingToken> responseObserver)
         Retrieves the token of the first token of an event from specified time in event store. Returns -1 when no events in store.