diff --git a/server/src/main/java/org/elasticsearch/snapshots/RestoreInfo.java b/server/src/main/java/org/elasticsearch/snapshots/RestoreInfo.java index 6a58b52f72a..15d5d1ca268 100644 --- a/server/src/main/java/org/elasticsearch/snapshots/RestoreInfo.java +++ b/server/src/main/java/org/elasticsearch/snapshots/RestoreInfo.java @@ -183,18 +183,6 @@ public class RestoreInfo implements ToXContentObject, Streamable { out.writeVInt(successfulShards); } - /** - * Reads restore info from {@link StreamInput} - * - * @param in stream input - * @return restore info - */ - public static RestoreInfo readRestoreInfo(StreamInput in) throws IOException { - RestoreInfo snapshotInfo = new RestoreInfo(); - snapshotInfo.readFrom(in); - return snapshotInfo; - } - /** * Reads optional restore info from {@link StreamInput} * diff --git a/server/src/main/java/org/elasticsearch/snapshots/SnapshotCreationException.java b/server/src/main/java/org/elasticsearch/snapshots/SnapshotCreationException.java index 32d3992f243..b21ec99019c 100644 --- a/server/src/main/java/org/elasticsearch/snapshots/SnapshotCreationException.java +++ b/server/src/main/java/org/elasticsearch/snapshots/SnapshotCreationException.java @@ -28,18 +28,10 @@ import java.io.IOException; */ public class SnapshotCreationException extends SnapshotException { - public SnapshotCreationException(final String repositoryName, final String snapshotName, final Throwable cause) { - super(repositoryName, snapshotName, "failed to create snapshot", cause); - } - public SnapshotCreationException(final String repositoryName, final SnapshotId snapshotId, final Throwable cause) { super(repositoryName, snapshotId, "failed to create snapshot", cause); } - public SnapshotCreationException(final String repositoryName, final SnapshotId snapshotId, final String msg) { - super(repositoryName, snapshotId, msg); - } - public SnapshotCreationException(StreamInput in) throws IOException { super(in); } diff --git a/server/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java b/server/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java index e4a6f3a3098..b512a570a85 100644 --- a/server/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java +++ b/server/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java @@ -562,14 +562,6 @@ public final class SnapshotInfo implements Comparable, ToXContent, return builder; } - /** - * This method creates a SnapshotInfo from external x-content. It does not - * handle x-content written with the internal version. - */ - public static SnapshotInfo fromXContent(final XContentParser parser) throws IOException { - return SNAPSHOT_INFO_PARSER.parse(parser, null).build(); - } - /** * This method creates a SnapshotInfo from internal x-content. It does not * handle x-content written with the external version as external x-content diff --git a/server/src/main/java/org/elasticsearch/snapshots/SnapshotMissingException.java b/server/src/main/java/org/elasticsearch/snapshots/SnapshotMissingException.java index 5f0979e38d8..93fa6af2c3f 100644 --- a/server/src/main/java/org/elasticsearch/snapshots/SnapshotMissingException.java +++ b/server/src/main/java/org/elasticsearch/snapshots/SnapshotMissingException.java @@ -33,10 +33,6 @@ public class SnapshotMissingException extends SnapshotException { super(repositoryName, snapshotId, "is missing", cause); } - public SnapshotMissingException(final String repositoryName, final SnapshotId snapshotId) { - super(repositoryName, snapshotId, "is missing"); - } - public SnapshotMissingException(final String repositoryName, final String snapshotName) { super(repositoryName, snapshotName, "is missing"); } @@ -49,5 +45,4 @@ public class SnapshotMissingException extends SnapshotException { public RestStatus status() { return RestStatus.NOT_FOUND; } - } diff --git a/server/src/main/java/org/elasticsearch/snapshots/SnapshotRestoreException.java b/server/src/main/java/org/elasticsearch/snapshots/SnapshotRestoreException.java index 9003a08a54a..8bd3d3dcbd8 100644 --- a/server/src/main/java/org/elasticsearch/snapshots/SnapshotRestoreException.java +++ b/server/src/main/java/org/elasticsearch/snapshots/SnapshotRestoreException.java @@ -31,10 +31,6 @@ public class SnapshotRestoreException extends SnapshotException { super(repositoryName, snapshotName, message); } - public SnapshotRestoreException(final String repositoryName, final String snapshotName, final String message, final Throwable cause) { - super(repositoryName, snapshotName, message, cause); - } - public SnapshotRestoreException(final Snapshot snapshot, final String message) { super(snapshot, message); } diff --git a/server/src/main/java/org/elasticsearch/snapshots/SnapshotShardFailure.java b/server/src/main/java/org/elasticsearch/snapshots/SnapshotShardFailure.java index 67bf9c6069f..a4971609672 100644 --- a/server/src/main/java/org/elasticsearch/snapshots/SnapshotShardFailure.java +++ b/server/src/main/java/org/elasticsearch/snapshots/SnapshotShardFailure.java @@ -27,7 +27,6 @@ import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.xcontent.ConstructingObjectParser; -import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.shard.ShardId; @@ -125,19 +124,6 @@ public class SnapshotShardFailure extends ShardOperationFailedException { '}'; } - /** - * Serializes snapshot failure information into JSON - * - * @param snapshotShardFailure snapshot failure information - * @param builder XContent builder - * @param params additional parameters - */ - public static void toXContent(SnapshotShardFailure snapshotShardFailure, XContentBuilder builder, ToXContent.Params params) throws IOException { - builder.startObject(); - snapshotShardFailure.toXContent(builder, params); - builder.endObject(); - } - static final ConstructingObjectParser SNAPSHOT_SHARD_FAILURE_PARSER = new ConstructingObjectParser<>("shard_failure", true, SnapshotShardFailure::constructSnapshotShardFailure);