RequestT
- The type of the request to execute.RequestResultT
- The type of the result to return.public interface Transaction<RequestT extends AbstractRemoteFunctionRequest<RequestT,RequestResultT>,RequestResultT extends AbstractRemoteFunctionRequestResult<RequestT,RequestResultT>>
RemoteFunctionRequestExecutor
.Modifier and Type | Method and Description |
---|---|
void |
after()
This method gets called *in any case* after the transactional calls are done.
|
void |
before(Destination destination,
RequestT request)
This method gets called before anything else gets called in the
RemoteFunctionRequestExecutor . |
void |
commit(Destination destination,
RequestT request)
If
execute(Destination, AbstractRemoteFunctionRequest) succeeded, this method is called to actually
commit the changes. |
RequestResultT |
execute(Destination destination,
RequestT request)
The actual logic to be executed.
|
void |
rollback(Destination destination,
RequestT request)
If there was a problem with
execute(Destination, AbstractRemoteFunctionRequest) or
commit(Destination, AbstractRemoteFunctionRequest) this method will get called to rollback any unwanted
changes. |
void before(@Nonnull Destination destination, @Nonnull RequestT request)
RemoteFunctionRequestExecutor
.destination
- The Destination
of this call.request
- The AbstractRemoteFunctionRequest
going to be executed.@Nonnull RequestResultT execute(@Nonnull Destination destination, @Nonnull RequestT request) throws RequestExecutionException
destination
- The Destination
of this call.request
- The AbstractRemoteFunctionRequest
going to execute.AbstractRemoteFunctionRequestResult
created by the request.RequestExecutionException
- if an exception occurred during the execute
implementation.void commit(@Nonnull Destination destination, @Nonnull RequestT request) throws RequestExecutionException
execute(Destination, AbstractRemoteFunctionRequest)
succeeded, this method is called to actually
commit the changes.destination
- The Destination
of this call.request
- The AbstractRemoteFunctionRequest
that was executed.RequestExecutionException
- If an exception occurred during the commit
implementation.void rollback(@Nonnull Destination destination, @Nonnull RequestT request) throws RequestExecutionException
execute(Destination, AbstractRemoteFunctionRequest)
or
commit(Destination, AbstractRemoteFunctionRequest)
this method will get called to rollback any unwanted
changes.destination
- The Destination
of this call.request
- The AbstractRemoteFunctionRequest
that was executed.RequestExecutionException
- If an exception occurred during the rollback
implementation.void after() throws RemoteFunctionException
RemoteFunctionException
- If an exception occurred during the after
implementation.Copyright © 2020 SAP SE. All rights reserved.