diff --git a/lra/coordinator/client/spi/src/main/java/io/helidon/lra/coordinator/client/CoordinatorClient.java b/lra/coordinator/client/spi/src/main/java/io/helidon/lra/coordinator/client/CoordinatorClient.java index 52ecf195a57..01ab239c17f 100644 --- a/lra/coordinator/client/spi/src/main/java/io/helidon/lra/coordinator/client/CoordinatorClient.java +++ b/lra/coordinator/client/spi/src/main/java/io/helidon/lra/coordinator/client/CoordinatorClient.java @@ -62,19 +62,6 @@ public interface CoordinatorClient { */ void init(Supplier 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 start(String clientID, long timeout) { - return start(clientID, PropagatedHeaders.noop(), timeout); - } - /** * Ask coordinator to start new LRA and return its id. * @@ -85,21 +72,6 @@ default Single start(String clientID, long timeout) { */ Single 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 start(URI parentLRA, String clientID, long timeout) { - return start(parentLRA, clientID, PropagatedHeaders.noop(), timeout); - } - /** * Ask coordinator to start new LRA and return its id. * @@ -111,21 +83,6 @@ default Single start(URI parentLRA, String clientID, long timeout) { */ Single 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> join(URI lraId, long timeLimit, Participant participant) { - return join(lraId, PropagatedHeaders.noop(), timeLimit, participant); - } - /** * Join existing LRA with participant. * @@ -137,19 +94,6 @@ default Single> join(URI lraId, long timeLimit, Participant partic */ Single> 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 cancel(URI lraId) { - return cancel(lraId, PropagatedHeaders.noop()); - } - /** * Cancel LRA if its active. Should cause coordinator to compensate its participants. * @@ -159,19 +103,6 @@ default Single cancel(URI lraId) { */ Single 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 close(URI lraId) { - return close(lraId, PropagatedHeaders.noop()); - } - /** * Close LRA if its active. Should cause coordinator to complete its participants. * @@ -181,21 +112,6 @@ default Single close(URI lraId) { */ Single 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 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. @@ -207,19 +123,6 @@ default Single leave(URI lraId, Participant participant) { */ Single 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 status(URI lraId) { - return status(lraId, PropagatedHeaders.noop()); - } - /** * Return status of specified LRA. * diff --git a/lra/coordinator/client/spi/src/main/java/io/helidon/lra/coordinator/client/Headers.java b/lra/coordinator/client/spi/src/main/java/io/helidon/lra/coordinator/client/Headers.java deleted file mode 100644 index 91f8adea2d5..00000000000 --- a/lra/coordinator/client/spi/src/main/java/io/helidon/lra/coordinator/client/Headers.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2021, 2022 Oracle and/or its affiliates. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.helidon.lra.coordinator.client; - -import java.util.List; - -/** - * Abstraction over the structure used for sending LRA id by coordinatior. - */ -@Deprecated -public interface Headers { - - /** - * Returns a list of the values for provided key. - * - * @param name key - * @return list of the values - */ - List get(String name); - - /** - * Replace any existing values of the given key by single provided value. - * - * @param name key - * @param value value - */ - void putSingle(String name, String value); -} diff --git a/microprofile/lra/jax-rs/src/main/java/io/helidon/microprofile/lra/LeaveAnnotationHandler.java b/microprofile/lra/jax-rs/src/main/java/io/helidon/microprofile/lra/LeaveAnnotationHandler.java index d6e8c0dc4fe..20b48ac6f9c 100644 --- a/microprofile/lra/jax-rs/src/main/java/io/helidon/microprofile/lra/LeaveAnnotationHandler.java +++ b/microprofile/lra/jax-rs/src/main/java/io/helidon/microprofile/lra/LeaveAnnotationHandler.java @@ -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); });