Skip to content

Commit

Permalink
LRA Deprecations removal
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
  • Loading branch information
danielkec committed Jun 29, 2022
1 parent eb05050 commit 97db3f5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 140 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,6 @@ public interface CoordinatorClient {
*/
void init(Supplier<URI> coordinatorUriSupplier, long timeout, TimeUnit timeoutUnit);

/**
* Ask coordinator to start new LRA and return its id.
*
* @param clientID id specifying originating method/resource
* @param timeout after what time should be LRA cancelled automatically
* @return id of the new LRA
* @deprecated Use {@link io.helidon.lra.coordinator.client.CoordinatorClient#start(String, PropagatedHeaders, long)} instead
*/
@Deprecated
default Single<URI> start(String clientID, long timeout) {
return start(clientID, PropagatedHeaders.noop(), timeout);
}

/**
* Ask coordinator to start new LRA and return its id.
*
Expand All @@ -85,21 +72,6 @@ default Single<URI> start(String clientID, long timeout) {
*/
Single<URI> start(String clientID, PropagatedHeaders headers, long timeout);

/**
* Ask coordinator to start new LRA and return its id.
*
* @param parentLRA in case new LRA should be a child of already existing one
* @param clientID id specifying originating method/resource
* @param timeout after what time should be LRA cancelled automatically
* @return id of the new LRA
* @deprecated Use
* {@link io.helidon.lra.coordinator.client.CoordinatorClient#start(java.net.URI, String, PropagatedHeaders, long)} instead
*/
@Deprecated
default Single<URI> start(URI parentLRA, String clientID, long timeout) {
return start(parentLRA, clientID, PropagatedHeaders.noop(), timeout);
}

/**
* Ask coordinator to start new LRA and return its id.
*
Expand All @@ -111,21 +83,6 @@ default Single<URI> start(URI parentLRA, String clientID, long timeout) {
*/
Single<URI> start(URI parentLRA, String clientID, PropagatedHeaders headers, long timeout);

/**
* Join existing LRA with participant.
*
* @param lraId id of existing LRA
* @param timeLimit time limit in milliseconds after which should be LRA cancelled, 0 means never
* @param participant participant metadata with URLs to be called when complete/compensate ...
* @return recovery URI if supported by coordinator or empty
* @deprecated Use
* {@link io.helidon.lra.coordinator.client.CoordinatorClient#join(java.net.URI, PropagatedHeaders, long, Participant)} instead
*/
@Deprecated
default Single<Optional<URI>> join(URI lraId, long timeLimit, Participant participant) {
return join(lraId, PropagatedHeaders.noop(), timeLimit, participant);
}

/**
* Join existing LRA with participant.
*
Expand All @@ -137,19 +94,6 @@ default Single<Optional<URI>> join(URI lraId, long timeLimit, Participant partic
*/
Single<Optional<URI>> join(URI lraId, PropagatedHeaders headers, long timeLimit, Participant participant);

/**
* Cancel LRA if its active. Should cause coordinator to compensate its participants.
*
* @param lraId id of the LRA to be cancelled
* @return single future of the cancel call
* @deprecated Use
* {@link io.helidon.lra.coordinator.client.CoordinatorClient#cancel(java.net.URI, PropagatedHeaders)} instead
*/
@Deprecated
default Single<Void> cancel(URI lraId) {
return cancel(lraId, PropagatedHeaders.noop());
}

/**
* Cancel LRA if its active. Should cause coordinator to compensate its participants.
*
Expand All @@ -159,19 +103,6 @@ default Single<Void> cancel(URI lraId) {
*/
Single<Void> cancel(URI lraId, PropagatedHeaders headers);

/**
* Close LRA if its active. Should cause coordinator to complete its participants.
*
* @param lraId id of the LRA to be closed
* @return single future of the cancel call
* @deprecated Use
* {@link io.helidon.lra.coordinator.client.CoordinatorClient#close(java.net.URI, PropagatedHeaders)} instead
*/
@Deprecated
default Single<Void> close(URI lraId) {
return close(lraId, PropagatedHeaders.noop());
}

/**
* Close LRA if its active. Should cause coordinator to complete its participants.
*
Expand All @@ -181,21 +112,6 @@ default Single<Void> close(URI lraId) {
*/
Single<Void> close(URI lraId, PropagatedHeaders headers);

/**
* Leave LRA. Supplied participant won't be part of specified LRA any more,
* no compensation or completion will be executed on it.
*
* @param lraId id of the LRA that should be left by supplied participant
* @param participant participant which will leave
* @return single future of the cancel call
* @deprecated Use
* {@link io.helidon.lra.coordinator.client.CoordinatorClient#leave(java.net.URI, PropagatedHeaders, Participant)} instead
*/
@Deprecated
default Single<Void> leave(URI lraId, Participant participant) {
return leave(lraId, PropagatedHeaders.noop(), participant);
}

/**
* Leave LRA. Supplied participant won't be part of specified LRA any more,
* no compensation or completion will be executed on it.
Expand All @@ -207,19 +123,6 @@ default Single<Void> leave(URI lraId, Participant participant) {
*/
Single<Void> leave(URI lraId, PropagatedHeaders headers, Participant participant);

/**
* Return status of specified LRA.
*
* @param lraId id of the queried LRA
* @return {@link org.eclipse.microprofile.lra.annotation.LRAStatus} of the queried LRA
* @deprecated Use
* {@link io.helidon.lra.coordinator.client.CoordinatorClient#status(java.net.URI, PropagatedHeaders)} instead
*/
@Deprecated
default Single<LRAStatus> status(URI lraId) {
return status(lraId, PropagatedHeaders.noop());
}

/**
* Return status of specified LRA.
*
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void handleJaxRsBefore(ContainerRequestContext reqCtx, ResourceInfo resou
.ifPresent(lraId -> {
URI baseUri = reqCtx.getUriInfo().getBaseUri();
Participant p = participantService.participant(baseUri, resourceInfo.getResourceClass());
coordinatorClient.leave(lraId, p);
coordinatorClient.leave(lraId, PropagatedHeaders.noop(), p);
reqCtx.getHeaders().add(LRA_HTTP_CONTEXT_HEADER, lraId.toASCIIString());
reqCtx.setProperty(LRA_HTTP_CONTEXT_HEADER, lraId);
});
Expand Down

0 comments on commit 97db3f5

Please sign in to comment.