Class AppendEventsTransactionImpl
- java.lang.Object
-
- io.axoniq.axonserver.connector.event.impl.AppendEventsTransactionImpl
-
- All Implemented Interfaces:
AppendEventsTransaction
public class AppendEventsTransactionImpl extends Object implements AppendEventsTransaction
Implementation of theAppendEventsTransactionused to append events to the Event Store.
-
-
Constructor Summary
Constructors Constructor Description AppendEventsTransactionImpl(io.grpc.stub.StreamObserver<Event> stream, CompletableFuture<ConfirmationWithConsistencyMarker> result)Constructs aAppendEventsTransactionImplused to append events to the Event Store.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AppendEventsTransactionappendEvent(Event event)Append the given event to be committed as part of this transaction.CompletableFuture<ConfirmationWithConsistencyMarker>commit()Commit this transaction, appending all registered events into the Event Store.voidrollback()Rolls back the transaction.
-
-
-
Constructor Detail
-
AppendEventsTransactionImpl
public AppendEventsTransactionImpl(io.grpc.stub.StreamObserver<Event> stream, CompletableFuture<ConfirmationWithConsistencyMarker> result)
Constructs aAppendEventsTransactionImplused to append events to the Event Store.- Parameters:
stream- theStreamObserverofEventinstances which should be appendedresult- aCompletableFutureresolving theConfirmationWithConsistencyMarkerof the successful processing of this transaction
-
-
Method Detail
-
appendEvent
public AppendEventsTransaction appendEvent(Event event)
Description copied from interface:AppendEventsTransactionAppend the given event to be committed as part of this transaction.- Specified by:
appendEventin interfaceAppendEventsTransaction- Parameters:
event- the event to append- Returns:
- this instance for fluent interfacing
-
commit
public CompletableFuture<ConfirmationWithConsistencyMarker> commit()
Description copied from interface:AppendEventsTransactionCommit this transaction, appending all registered events into the Event Store.- Specified by:
commitin interfaceAppendEventsTransaction- Returns:
- a CompletableFuture resolving the confirmation of the successful processing of the transaction
-
rollback
public void rollback()
Description copied from interface:AppendEventsTransactionRolls back the transaction.- Specified by:
rollbackin interfaceAppendEventsTransaction
-
-