Interface TransactionalProcessor
-
- All Superinterfaces:
io.gridgo.framework.ComponentLifecycle
,ContextAwareComponent
,io.gridgo.utils.helper.Loggable
,io.gridgo.framework.NamedComponent
public interface TransactionalProcessor extends ContextAwareComponent, io.gridgo.utils.helper.Loggable
Provides utility methods for handling transaction.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default org.joo.promise4j.Promise<io.gridgo.connector.support.transaction.Transaction,java.lang.Exception>
createTransaction(java.lang.String gateway)
GridgoContext
getContext()
default org.joo.promise4j.Promise<java.lang.Object,java.lang.Exception>
withTransaction(java.lang.String gateway, java.util.function.BiConsumer<io.gridgo.connector.support.MessageProducer,org.joo.promise4j.Deferred<io.gridgo.framework.support.Message,java.lang.Exception>> handler)
default org.joo.promise4j.Promise<java.lang.Object,java.lang.Exception>
withTransaction(java.lang.String gateway, java.util.function.Consumer<io.gridgo.connector.support.transaction.Transaction> handler)
default org.joo.promise4j.Promise<java.lang.Object,java.lang.Exception>
withTransaction(java.lang.String gateway, java.util.function.Function<io.gridgo.connector.support.MessageProducer,org.joo.promise4j.Promise<? extends java.lang.Object,java.lang.Exception>> handler)
-
Methods inherited from interface io.gridgo.core.support.ContextAwareComponent
setContext
-
-
-
-
Method Detail
-
getContext
GridgoContext getContext()
-
withTransaction
default org.joo.promise4j.Promise<java.lang.Object,java.lang.Exception> withTransaction(java.lang.String gateway, java.util.function.Consumer<io.gridgo.connector.support.transaction.Transaction> handler)
-
withTransaction
default org.joo.promise4j.Promise<java.lang.Object,java.lang.Exception> withTransaction(java.lang.String gateway, java.util.function.BiConsumer<io.gridgo.connector.support.MessageProducer,org.joo.promise4j.Deferred<io.gridgo.framework.support.Message,java.lang.Exception>> handler)
-
withTransaction
default org.joo.promise4j.Promise<java.lang.Object,java.lang.Exception> withTransaction(java.lang.String gateway, java.util.function.Function<io.gridgo.connector.support.MessageProducer,org.joo.promise4j.Promise<? extends java.lang.Object,java.lang.Exception>> handler)
-
createTransaction
default org.joo.promise4j.Promise<io.gridgo.connector.support.transaction.Transaction,java.lang.Exception> createTransaction(java.lang.String gateway)
-
-