-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for RemoteDocLevelMonitorInput (#1564)
Signed-off-by: Subhobrata Dey <[email protected]>
- Loading branch information
Showing
7 changed files
with
130 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...rc/main/java/org/opensearch/alerting/monitor/inputs/SampleRemoteDocLevelMonitorInput.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.alerting.monitor.inputs; | ||
|
||
import org.opensearch.core.common.io.stream.StreamInput; | ||
import org.opensearch.core.common.io.stream.StreamOutput; | ||
import org.opensearch.core.common.io.stream.Writeable; | ||
|
||
import java.io.IOException; | ||
import java.util.Map; | ||
|
||
public class SampleRemoteDocLevelMonitorInput implements Writeable { | ||
|
||
private String a; | ||
|
||
private Map<String, Object> b; | ||
|
||
private int c; | ||
|
||
public SampleRemoteDocLevelMonitorInput(String a, Map<String, Object> b, int c) { | ||
this.a = a; | ||
this.b = b; | ||
this.c = c; | ||
} | ||
|
||
public SampleRemoteDocLevelMonitorInput(StreamInput sin) throws IOException { | ||
this( | ||
sin.readString(), | ||
sin.readMap(), | ||
sin.readInt() | ||
); | ||
} | ||
|
||
@Override | ||
public void writeTo(StreamOutput out) throws IOException { | ||
out.writeString(a); | ||
out.writeMap(b); | ||
out.writeInt(c); | ||
} | ||
|
||
public int getC() { | ||
return c; | ||
} | ||
|
||
public Map<String, Object> getB() { | ||
return b; | ||
} | ||
|
||
public String getA() { | ||
return a; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters