-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
Signed-off-by: Ryan Bogan <[email protected]>
- Loading branch information
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
93f105c2e923f0ab90521cc0e6e729b9c8304ad8 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
70dcc08887f2d70a8f812bf00d4fa10390fab3fd |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
84054ca8a6660eb77910925d71f70330fd3d83aa |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
670748292899c53b1963730d9eb7f8ab71314e90 |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.cluster; | ||
|
||
import org.opensearch.cluster.service.ClusterService; | ||
import org.opensearch.common.io.stream.StreamInput; | ||
import org.opensearch.common.io.stream.StreamOutput; | ||
import org.opensearch.common.settings.Settings; | ||
import org.opensearch.transport.TransportResponse; | ||
|
||
import java.io.IOException; | ||
import java.util.Objects; | ||
|
||
/** | ||
* PluginSettings Response for Extensibility | ||
* | ||
* @opensearch.internal | ||
*/ | ||
public class ClusterSettingsResponse extends TransportResponse { | ||
private final Settings clusterSettings; | ||
|
||
public ClusterSettingsResponse(ClusterService clusterService) { | ||
this.clusterSettings = clusterService.getSettings(); | ||
} | ||
|
||
public ClusterSettingsResponse(StreamInput in) throws IOException { | ||
super(in); | ||
this.clusterSettings = Settings.readSettingsFromStream(in); | ||
} | ||
|
||
@Override | ||
public void writeTo(StreamOutput out) throws IOException { | ||
Settings.writeSettingsToStream(clusterSettings, out); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ClusterSettingsResponse{" + "clusterSettings=" + clusterSettings + '}'; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
ClusterSettingsResponse that = (ClusterSettingsResponse) o; | ||
return Objects.equals(clusterSettings, that.clusterSettings); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(clusterSettings); | ||
} | ||
|
||
} |