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)
Deprecated.
in favor of
appendSnapshot(String, Event), as the context should always be
specified when dealing with an Event Store |
CompletableFuture<Confirmation> |
appendSnapshot(String context,
Event snapshot)
Add a snapshot event to the Event Store.
|
AppendEventTransaction |
createAppendEventConnection()
Deprecated.
in favor of
createAppendEventConnection(String), as the context should
always be specified when dealing with an Event Store |
AppendEventTransaction |
createAppendEventConnection(String context)
Create a transaction to append events with.
|
CompletableFuture<TrackingToken> |
getFirstToken()
Deprecated.
in favor of
getFirstToken(String), as the context should always be specified
when dealing with an Event Store |
CompletableFuture<TrackingToken> |
getFirstToken(String context)
Asynchronously returns the first
TrackingToken available in Event Store. |
CompletableFuture<TrackingToken> |
getLastToken()
Deprecated.
in favor of
getLastToken(String), as the context should always be specified
when dealing with an Event Store |
CompletableFuture<TrackingToken> |
getLastToken(String context)
Asynchronously returns the last
TrackingToken committed in Event Store. |
CompletableFuture<TrackingToken> |
getTokenAt(Instant instant)
Deprecated.
in favor of
getTokenAt(String, Instant), as the context should always be
specified when dealing with an Event Store |
CompletableFuture<TrackingToken> |
getTokenAt(String context,
Instant instant)
Asynchronously returns a
TrackingToken at the given instant from the Event Store. |
CompletableFuture<ReadHighestSequenceNrResponse> |
lastSequenceNumberFor(String aggregateIdentifier)
Deprecated.
in favor of
lastSequenceNumberFor(String, String), as the context should
always be specified when dealing with an Event Store |
CompletableFuture<ReadHighestSequenceNrResponse> |
lastSequenceNumberFor(String context,
String aggregateIdentifier)
Asynchronously retrieve the last sequence number used for the aggregate referenced through the given
aggregateIdentifier. |
Stream<Event> |
listAggregateEvents(GetAggregateEventsRequest request)
Deprecated.
in favor of
listAggregateEvents(String, GetAggregateEventsRequest), as the context
should always be specified when dealing with an Event Store |
Stream<Event> |
listAggregateEvents(String context,
GetAggregateEventsRequest request)
Retrieves the events for an aggregate described in given
request. |
Stream<Event> |
listAggregateSnapshots(GetAggregateSnapshotsRequest request)
Deprecated.
in favor of
listAggregateSnapshots(String, GetAggregateSnapshotsRequest), as the
context should always be specified when dealing with an Event Store |
Stream<Event> |
listAggregateSnapshots(String context,
GetAggregateSnapshotsRequest request)
Retrieve a stream of all the snapshot events utilizing the given
GetAggregateSnapshotsRequest |
io.grpc.stub.StreamObserver<GetEventsRequest> |
listEvents(io.grpc.stub.StreamObserver<EventWithToken> responseStreamObserver)
Deprecated.
in favor of
listEvents(String, StreamObserver), as the context should always
be specified when dealing with an Event Store |
io.grpc.stub.StreamObserver<GetEventsRequest> |
listEvents(String context,
io.grpc.stub.StreamObserver<EventWithToken> responseStreamObserver)
Provide a list of events by using a
StreamObserver for type GetEventsRequest. |
io.grpc.stub.StreamObserver<QueryEventsRequest> |
query(io.grpc.stub.StreamObserver<QueryEventsResponse> responseStreamObserver)
Deprecated.
in favor of
query(String, StreamObserver), as the context should always be
specified when dealing with an Event Store |
io.grpc.stub.StreamObserver<QueryEventsRequest> |
query(String context,
io.grpc.stub.StreamObserver<QueryEventsResponse> responseStreamObserver)
Query the Event Store using the given
responseStreamObserver to put results on and the returned
StreamObserver of type QueryEventsRequest to populate with the query request. |
void |
shutdown()
Deprecated.
no-op method. To close connections, call
AxonServerConnectionManager.shutdown() instead. |
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 platform@Deprecated public void shutdown()
AxonServerConnectionManager.shutdown() instead.@Deprecated public Stream<Event> listAggregateEvents(GetAggregateEventsRequest request)
listAggregateEvents(String, GetAggregateEventsRequest), as the context
should always be specified when dealing with an Event Storerequest.request - the request describing the aggregate to retrieve messages forpublic Stream<Event> listAggregateEvents(String context, GetAggregateEventsRequest request)
request.context - defines the (Bounded) Context within which a list of events for a given Aggregate should be
retrievedrequest - the request describing the aggregate to retrieve messages for@Deprecated public io.grpc.stub.StreamObserver<GetEventsRequest> listEvents(io.grpc.stub.StreamObserver<EventWithToken> responseStreamObserver)
listEvents(String, StreamObserver), as the context should always
be specified when dealing with an Event StoreStreamObserver for type GetEventsRequest.responseStreamObserver - a StreamObserver for messages from the serverStreamObserver to send request messages to server withpublic io.grpc.stub.StreamObserver<GetEventsRequest> listEvents(String context, io.grpc.stub.StreamObserver<EventWithToken> responseStreamObserver)
StreamObserver for type GetEventsRequest.context - defines the (Bounded) Context within which a list of events should be retrievedresponseStreamObserver - a StreamObserver for messages from the serverStreamObserver to send request messages to server with@Deprecated public CompletableFuture<Confirmation> appendSnapshot(Event snapshot)
appendSnapshot(String, Event), as the context should always be
specified when dealing with an Event Storesnapshot - the snapshot-event to storepublic CompletableFuture<Confirmation> appendSnapshot(String context, Event snapshot)
context - defines the (Bounded) Context within which the snapshot-event should be addedsnapshot - the snapshot-event to store@Deprecated public CompletableFuture<TrackingToken> getLastToken()
getLastToken(String), as the context should always be specified
when dealing with an Event StoreTrackingToken committed in Event Store.TrackingToken committed in Event Store asynchronouslypublic CompletableFuture<TrackingToken> getLastToken(String context)
TrackingToken committed in Event Store.context - defines the (Bounded) Context from which the last committed TrackingToken should be retrievedTrackingToken committed in Event Store asynchronously@Deprecated public CompletableFuture<TrackingToken> getFirstToken()
getFirstToken(String), as the context should always be specified
when dealing with an Event StoreTrackingToken available in Event Store.TrackingToken available in Event Store asynchronouslypublic CompletableFuture<TrackingToken> getFirstToken(String context)
TrackingToken available in Event Store.context - defines the (Bounded) Context from which the first available TrackingToken should be retrievedTrackingToken available in Event Store asynchronously@Deprecated public CompletableFuture<TrackingToken> getTokenAt(Instant instant)
getTokenAt(String, Instant), as the context should always be
specified when dealing with an Event StoreTrackingToken at the given instant from the Event Store.instant - the moment in time the returned TrackingToken should correspond toTrackingToken at the given instant from the Event Store asynchronouslypublic CompletableFuture<TrackingToken> getTokenAt(String context, Instant instant)
TrackingToken at the given instant from the Event Store.context - defines the (Bounded) Context from which the TrackingToken should be retrievedinstant - the moment in time the returned TrackingToken should correspond toTrackingToken at the given instant from the Event Store asynchronously@Deprecated public AppendEventTransaction createAppendEventConnection()
createAppendEventConnection(String), as the context should
always be specified when dealing with an Event Storepublic AppendEventTransaction createAppendEventConnection(String context)
context - defines the (Bounded) Context within which the transaction should append new events@Deprecated public io.grpc.stub.StreamObserver<QueryEventsRequest> query(io.grpc.stub.StreamObserver<QueryEventsResponse> responseStreamObserver)
query(String, StreamObserver), as the context should always be
specified when dealing with an Event StoreresponseStreamObserver to put results on and the returned
StreamObserver of type QueryEventsRequest to populate with the query request.responseStreamObserver - used to stream the query responses onpublic io.grpc.stub.StreamObserver<QueryEventsRequest> query(String context, io.grpc.stub.StreamObserver<QueryEventsResponse> responseStreamObserver)
responseStreamObserver to put results on and the returned
StreamObserver of type QueryEventsRequest to populate with the query request.context - defines the (Bounded) Context within which the query on the Event Store should be
performedresponseStreamObserver - used to stream the query responses on@Deprecated public CompletableFuture<ReadHighestSequenceNrResponse> lastSequenceNumberFor(String aggregateIdentifier)
lastSequenceNumberFor(String, String), as the context should
always be specified when dealing with an Event StoreaggregateIdentifier.aggregateIdentifier - specifies the aggregate for which the last sequence number should be returnedaggregateIdentifierpublic CompletableFuture<ReadHighestSequenceNrResponse> lastSequenceNumberFor(String context, String aggregateIdentifier)
aggregateIdentifier.context - defines the (Bounded) Context where the aggregate resides in, for which the last
sequence number should be returnedaggregateIdentifier - specifies the aggregate for which the last sequence number should be returnedaggregateIdentifier@Deprecated public Stream<Event> listAggregateSnapshots(GetAggregateSnapshotsRequest request)
listAggregateSnapshots(String, GetAggregateSnapshotsRequest), as the
context should always be specified when dealing with an Event StoreGetAggregateSnapshotsRequestrequest - the object describing the exact snapshot event stream requestrequestpublic Stream<Event> listAggregateSnapshots(String context, GetAggregateSnapshotsRequest request)
GetAggregateSnapshotsRequestcontext - defines the (Bounded) Context where the aggregate resides in, for which the stream of snapshot
events should be retrievedrequest - the object describing the exact snapshot event stream requestrequestCopyright © 2010–2020. All rights reserved.