Interface CoordinatorClient
- All Known Implementing Classes:
NarayanaClient
public interface CoordinatorClient
Abstraction over specific coordinator.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault coordinator url.static final StringPrefix of headers which should be propagated to the coordinator.static final StringTimeout for synchronous communication with coordinator.static final StringTimeout unit for synchronous communication with coordinator.static final StringURL of the coordinator to be used for orchestrating Long Running Actions. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.cancel(URI lraId, PropagatedHeaders headers) Cancel LRA if its active.Deprecated.Useclose(java.net.URI, PropagatedHeaders)insteadclose(URI lraId, PropagatedHeaders headers) Close LRA if its active.voidInitialization of the properties provided by LRA client.join(URI lraId, long timeLimit, Participant participant) Deprecated.join(URI lraId, PropagatedHeaders headers, long timeLimit, Participant participant) Join existing LRA with participant.leave(URI lraId, Participant participant) Deprecated.leave(URI lraId, PropagatedHeaders headers, Participant participant) Leave LRA.Deprecated.Usestart(String, PropagatedHeaders, long)insteadstart(String clientID, PropagatedHeaders headers, long timeout) Ask coordinator to start new LRA and return its id.Deprecated.start(URI parentLRA, String clientID, PropagatedHeaders headers, long timeout) Ask coordinator to start new LRA and return its id.Deprecated.Usestatus(java.net.URI, PropagatedHeaders)insteadstatus(URI lraId, PropagatedHeaders headers) Return status of specified LRA.
-
Field Details
-
CONF_KEY_COORDINATOR_HEADERS_PROPAGATION_PREFIX
Prefix of headers which should be propagated to the coordinator.- See Also:
-
CONF_KEY_COORDINATOR_URL
URL of the coordinator to be used for orchestrating Long Running Actions.- See Also:
-
CONF_KEY_COORDINATOR_TIMEOUT
Timeout for synchronous communication with coordinator.- See Also:
-
CONF_KEY_COORDINATOR_TIMEOUT_UNIT
Timeout unit for synchronous communication with coordinator. Values of enumTimeUnitare expected.- See Also:
-
CONF_DEFAULT_COORDINATOR_URL
Default coordinator url.- See Also:
-
-
Method Details
-
init
Initialization of the properties provided by LRA client.- Parameters:
coordinatorUriSupplier- url of the coordinatortimeout- general timeout for coordinator callstimeoutUnit- timeout unit for coordinator calls
-
start
Deprecated.Usestart(String, PropagatedHeaders, long)insteadAsk coordinator to start new LRA and return its id.- Parameters:
clientID- id specifying originating method/resourcetimeout- after what time should be LRA cancelled automatically- Returns:
- id of the new LRA
-
start
Ask coordinator to start new LRA and return its id.- Parameters:
clientID- id specifying originating method/resourceheaders- headers to be propagated to the coordinatortimeout- after what time should be LRA cancelled automatically- Returns:
- id of the new LRA
-
start
Deprecated.Ask coordinator to start new LRA and return its id.- Parameters:
parentLRA- in case new LRA should be a child of already existing oneclientID- id specifying originating method/resourcetimeout- after what time should be LRA cancelled automatically- Returns:
- id of the new LRA
-
start
Ask coordinator to start new LRA and return its id.- Parameters:
parentLRA- in case new LRA should be a child of already existing oneclientID- id specifying originating method/resourceheaders- headers to be propagated to the coordinatortimeout- after what time should be LRA cancelled automatically- Returns:
- id of the new LRA
-
join
Deprecated.Join existing LRA with participant.- Parameters:
lraId- id of existing LRAtimeLimit- time limit in milliseconds after which should be LRA cancelled, 0 means neverparticipant- participant metadata with URLs to be called when complete/compensate ...- Returns:
- recovery URI if supported by coordinator or empty
-
join
Single<Optional<URI>> join(URI lraId, PropagatedHeaders headers, long timeLimit, Participant participant) Join existing LRA with participant.- Parameters:
lraId- id of existing LRAheaders- headers to be propagated to the coordinatortimeLimit- time limit in milliseconds after which should be LRA cancelled, 0 means neverparticipant- participant metadata with URLs to be called when complete/compensate ...- Returns:
- recovery URI if supported by coordinator or empty
-
cancel
Deprecated.Usecancel(java.net.URI, PropagatedHeaders)insteadCancel LRA if its active. Should cause coordinator to compensate its participants.- Parameters:
lraId- id of the LRA to be cancelled- Returns:
- single future of the cancel call
-
cancel
Cancel LRA if its active. Should cause coordinator to compensate its participants.- Parameters:
lraId- id of the LRA to be cancelledheaders- headers to be propagated to the coordinator- Returns:
- single future of the cancel call
-
close
Deprecated.Useclose(java.net.URI, PropagatedHeaders)insteadClose LRA if its active. Should cause coordinator to complete its participants.- Parameters:
lraId- id of the LRA to be closed- Returns:
- single future of the cancel call
-
close
Close LRA if its active. Should cause coordinator to complete its participants.- Parameters:
lraId- id of the LRA to be closedheaders- headers to be propagated to the coordinator- Returns:
- single future of the cancel call
-
leave
Deprecated.Leave LRA. Supplied participant won't be part of specified LRA any more, no compensation or completion will be executed on it.- Parameters:
lraId- id of the LRA that should be left by supplied participantparticipant- participant which will leave- Returns:
- single future of the cancel call
-
leave
Leave LRA. Supplied participant won't be part of specified LRA any more, no compensation or completion will be executed on it.- Parameters:
lraId- id of the LRA that should be left by supplied participantheaders- headers to be propagated to the coordinatorparticipant- participant which will leave- Returns:
- single future of the cancel call
-
status
Deprecated.Usestatus(java.net.URI, PropagatedHeaders)insteadReturn status of specified LRA.- Parameters:
lraId- id of the queried LRA- Returns:
LRAStatusof the queried LRA
-
status
Return status of specified LRA.- Parameters:
lraId- id of the queried LRAheaders- headers to be propagated to the coordinator- Returns:
LRAStatusof the queried LRA
-
cancel(java.net.URI, PropagatedHeaders)instead