-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make threat intel async #703
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package org.opensearch.securityanalytics.threatIntel.action; | ||
|
||
import org.opensearch.core.action.ActionResponse; | ||
import org.opensearch.core.common.io.stream.StreamInput; | ||
import org.opensearch.core.common.io.stream.StreamOutput; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
|
||
public class ThreatIntelIndicesResponse extends ActionResponse { | ||
|
||
private Boolean isAcknowledged; | ||
|
||
private List<String> indices; | ||
|
||
public ThreatIntelIndicesResponse(Boolean isAcknowledged, List<String> indices) { | ||
super(); | ||
this.isAcknowledged = isAcknowledged; | ||
this.indices = indices; | ||
} | ||
Check warning on line 24 in src/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java Codecov / codecov/patchsrc/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java#L21-L24
|
||
|
||
public ThreatIntelIndicesResponse(StreamInput sin) throws IOException { | ||
this(sin.readBoolean(), sin.readStringList()); | ||
} | ||
Check warning on line 28 in src/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java Codecov / codecov/patchsrc/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java#L27-L28
|
||
|
||
@Override | ||
public void writeTo(StreamOutput out) throws IOException { | ||
out.writeBoolean(isAcknowledged); | ||
out.writeStringCollection(indices); | ||
} | ||
Check warning on line 34 in src/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java Codecov / codecov/patchsrc/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java#L32-L34
|
||
|
||
public Boolean isAcknowledged() { | ||
return isAcknowledged; | ||
Check warning on line 37 in src/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java Codecov / codecov/patchsrc/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java#L37
|
||
} | ||
|
||
public List<String> getIndices() { | ||
return indices; | ||
Check warning on line 41 in src/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java Codecov / codecov/patchsrc/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java#L41
|
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this should be in else? Dont we need to do even when tifIndex was null and after it is populated in if?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar search request has been made in the
createThreatIntelFeedData()
method once the index creation is done.