Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Renaming to match merge to main branch ([5362](https://github.com/opensearch-project/OpenSearch/pull/5362))
- Updated settings registration changes to reflect main ([5532](https://github.com/opensearch-project/OpenSearch/pull/5532))
- Added dependency information to Extensions ([#5438](https://github.com/opensearch-project/OpenSearch/pull/5438))
- Renaming tests to be consistent with main branch ([#5571](https://github.com/opensearch-project/OpenSearch/pull/5571))

## [Unreleased 2.x]
### Added
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
*
* @opensearch.internal
*/
public class ExtensionBooleanResponse extends TransportResponse {
public class AcknowledgedResponse extends TransportResponse {

private final boolean status;

/**
* @param status Boolean indicating the status of the parse request sent to the SDK
*/
public ExtensionBooleanResponse(boolean status) {
public AcknowledgedResponse(boolean status) {
this.status = status;
}

public ExtensionBooleanResponse(StreamInput in) throws IOException {
public AcknowledgedResponse(StreamInput in) throws IOException {
super(in);
this.status = in.readBoolean();
}
Expand All @@ -42,14 +42,14 @@ public void writeTo(StreamOutput out) throws IOException {

@Override
public String toString() {
return "ExtensionBooleanResponse{" + "status=" + this.status + "}";
return "AcknowledgedResponse{" + "status=" + this.status + "}";
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ExtensionBooleanResponse that = (ExtensionBooleanResponse) o;
AcknowledgedResponse that = (AcknowledgedResponse) o;
return Objects.equals(this.status, that.status);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public AddSettingsUpdateConsumerRequestHandler(
* Handles a {@link AddSettingsUpdateConsumerRequest}.
*
* @param addSettingsUpdateConsumerRequest The request to handle.
* @return A {@link ExtensionBooleanResponse} indicating success.
* @return A {@link AcknowledgedResponse} indicating success.
* @throws Exception if the request is not handled properly.
*/
TransportResponse handleAddSettingsUpdateConsumerRequest(AddSettingsUpdateConsumerRequest addSettingsUpdateConsumerRequest)
Expand Down Expand Up @@ -86,6 +86,6 @@ TransportResponse handleAddSettingsUpdateConsumerRequest(AddSettingsUpdateConsum
status = false;
}

return new ExtensionBooleanResponse(status);
return new AcknowledgedResponse(status);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ public ExtensionActionListenerHandler(ExtensionActionListener listener) {
* Handles a {@link ExtensionActionListenerOnFailureRequest}.
*
* @param request The request to handle.
* @return A {@link ExtensionBooleanResponse} indicating success or failure.
* @return A {@link AcknowledgedResponse} indicating success or failure.
*/
public ExtensionBooleanResponse handleExtensionActionListenerOnFailureRequest(ExtensionActionListenerOnFailureRequest request) {
public AcknowledgedResponse handleExtensionActionListenerOnFailureRequest(ExtensionActionListenerOnFailureRequest request) {
try {
listener.onFailure(new OpenSearchException(request.getFailureException()));
return new ExtensionBooleanResponse(true);
return new AcknowledgedResponse(true);
} catch (Exception e) {
logger.error(e.getMessage());
return new ExtensionBooleanResponse(false);
return new AcknowledgedResponse(false);
}
}
}
Loading