public class AxonServerEventStoreClient extends Object
| Constructor and Description |
|---|
AxonServerEventStoreClient(AxonServerConfiguration eventStoreConfiguration,
AxonServerConnectionManager axonServerConnectionManager)
Initialize the Event Store Client using given
eventStoreConfiguration and given platformConnectionManager. |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Confirmation> |
appendSnapshot(Event snapshot) |
AppendEventTransaction |
createAppendEventConnection() |
CompletableFuture<TrackingToken> |
getFirstToken() |
CompletableFuture<TrackingToken> |
getLastToken() |
CompletableFuture<TrackingToken> |
getTokenAt(Instant instant) |
CompletableFuture<ReadHighestSequenceNrResponse> |
lastSequenceNumberFor(String aggregateIdentifier) |
Stream<Event> |
listAggregateEvents(GetAggregateEventsRequest request)
Retrieves the events for an aggregate described in given
request. |
Stream<Event> |
listAggregateSnapshots(GetAggregateSnapshotsRequest request) |
io.grpc.stub.StreamObserver<GetEventsRequest> |
listEvents(io.grpc.stub.StreamObserver<EventWithToken> responseStreamObserver) |
io.grpc.stub.StreamObserver<QueryEventsRequest> |
query(io.grpc.stub.StreamObserver<QueryEventsResponse> responseStreamObserver) |
void |
shutdown() |
public AxonServerEventStoreClient(AxonServerConfiguration eventStoreConfiguration, AxonServerConnectionManager axonServerConnectionManager)
eventStoreConfiguration and given platformConnectionManager.eventStoreConfiguration - The configuration describing the bounded context that this application operates inaxonServerConnectionManager - manager for connections to AxonServer platformpublic void shutdown()
public Stream<Event> listAggregateEvents(GetAggregateEventsRequest request) throws ExecutionException, InterruptedException
request.request - The request describing the aggregate to retrieve messages forExecutionException - when an error was reported while reading eventsInterruptedException - when the thread was interrupted while reading events from the serverpublic io.grpc.stub.StreamObserver<GetEventsRequest> listEvents(io.grpc.stub.StreamObserver<EventWithToken> responseStreamObserver)
responseStreamObserver: - observer for messages from serverpublic CompletableFuture<Confirmation> appendSnapshot(Event snapshot)
public CompletableFuture<TrackingToken> getLastToken()
public CompletableFuture<TrackingToken> getFirstToken()
public CompletableFuture<TrackingToken> getTokenAt(Instant instant)
public AppendEventTransaction createAppendEventConnection()
public io.grpc.stub.StreamObserver<QueryEventsRequest> query(io.grpc.stub.StreamObserver<QueryEventsResponse> responseStreamObserver)
public CompletableFuture<ReadHighestSequenceNrResponse> lastSequenceNumberFor(String aggregateIdentifier)
public Stream<Event> listAggregateSnapshots(GetAggregateSnapshotsRequest request) throws ExecutionException, InterruptedException
Copyright © 2010–2018. All rights reserved.