Class EventTransformationChannelImpl
- java.lang.Object
-
- io.axoniq.axonserver.connector.impl.AbstractAxonServerChannel<Void>
-
- io.axoniq.axonserver.connector.event.transformation.impl.EventTransformationChannelImpl
-
- All Implemented Interfaces:
EventTransformationChannel
public class EventTransformationChannelImpl extends AbstractAxonServerChannel<Void> implements EventTransformationChannel
Implementation of theEventTransformationChannelthat uses theEventTransformationServiceto interact with Axon Server- Since:
- 2023.1.0
- Author:
- Sara Pellegrini
-
-
Constructor Summary
Constructors Constructor Description EventTransformationChannelImpl(ClientIdentification clientIdentification, ScheduledExecutorService executor, AxonServerManagedChannel axonServerManagedChannel)Constructs an instance based on aGrpcEventTransformationService.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<ActiveTransformation>activeTransformation()Returns the completable future of the active transformation.voidconnect()Connect this channel with AxonServer.voiddisconnect()Disconnect this channel from AxonServer.booleanisReady()Validate whether this channel has all required streams connected with AxonServer.CompletableFuture<ActiveTransformation>newTransformation(String description)Starts a new transformation to append events change actions.voidreconnect()Reconnect this channel with AxonServer.CompletableFuture<Void>startCompacting()Starts the compaction of the event store.CompletableFuture<Iterable<EventTransformation>>transformations()Returns the completable future of the all transformations.-
Methods inherited from class io.axoniq.axonserver.connector.impl.AbstractAxonServerChannel
processAck, scheduleImmediateReconnect, scheduleReconnect, sendInstruction
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.axoniq.axonserver.connector.event.transformation.EventTransformationChannel
transform
-
-
-
-
Constructor Detail
-
EventTransformationChannelImpl
public EventTransformationChannelImpl(ClientIdentification clientIdentification, ScheduledExecutorService executor, AxonServerManagedChannel axonServerManagedChannel)
Constructs an instance based on aGrpcEventTransformationService.- Parameters:
clientIdentification- the identification of the clientexecutor- aScheduledExecutorServiceused to schedule reconnectionsaxonServerManagedChannel- theAxonServerManagedChannelused to connect to AxonServer
-
-
Method Detail
-
transformations
public CompletableFuture<Iterable<EventTransformation>> transformations()
Description copied from interface:EventTransformationChannelReturns the completable future of the all transformations.- Specified by:
transformationsin interfaceEventTransformationChannel- Returns:
- the completable future of the all transformations.
-
activeTransformation
public CompletableFuture<ActiveTransformation> activeTransformation()
Description copied from interface:EventTransformationChannelReturns the completable future of the active transformation.- Specified by:
activeTransformationin interfaceEventTransformationChannel- Returns:
- The completable future of the active transformation.
-
newTransformation
public CompletableFuture<ActiveTransformation> newTransformation(String description)
Description copied from interface:EventTransformationChannelStarts a new transformation to append events change actions. It- Specified by:
newTransformationin interfaceEventTransformationChannel- Parameters:
description- the description of the transformation to start.- Returns:
- The completable future of the active transformation reference onto which to register events transformation actions.
-
startCompacting
public CompletableFuture<Void> startCompacting()
Description copied from interface:EventTransformationChannelStarts the compaction of the event store. The invocation of this method requests Axon Server to permanently delete all the obsoleted version of the event store, in order to save storage space.- Specified by:
startCompactingin interfaceEventTransformationChannel- Returns:
- a CompletableFuture that completes when the compaction request has been received by Axon Server.
-
connect
public void connect()
Description copied from class:AbstractAxonServerChannelConnect this channel with AxonServer.- Specified by:
connectin classAbstractAxonServerChannel<Void>
-
reconnect
public void reconnect()
Description copied from class:AbstractAxonServerChannelReconnect this channel with AxonServer.- Specified by:
reconnectin classAbstractAxonServerChannel<Void>
-
disconnect
public void disconnect()
Description copied from class:AbstractAxonServerChannelDisconnect this channel from AxonServer.- Specified by:
disconnectin classAbstractAxonServerChannel<Void>
-
isReady
public boolean isReady()
Description copied from class:AbstractAxonServerChannelValidate whether this channel has all required streams connected with AxonServer. If the state of the channel does not require any active streams, it is considered ready and will returntrue.- Specified by:
isReadyin classAbstractAxonServerChannel<Void>- Returns:
trueif this channel is connected with AxonServer or does not require any active connections,falseotherwise
-
-