Convert AcknowledgedRequest to Writeable.Reader (#44412) (#44454)

This commit adds constructors to AcknolwedgedRequest subclasses to
implement Writeable.Reader, and ensures all future subclasses implement
the same.

relates #34389
This commit is contained in:
Ryan Ernst 2019-07-17 11:17:36 -07:00 committed by GitHub
parent 65fcaecce1
commit 0755a13c9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
109 changed files with 477 additions and 530 deletions

View File

@ -37,6 +37,11 @@ public class DeleteRepositoryRequest extends AcknowledgedRequest<DeleteRepositor
private String name;
public DeleteRepositoryRequest(StreamInput in) throws IOException {
super(in);
name = in.readString();
}
public DeleteRepositoryRequest() {
}
@ -77,12 +82,6 @@ public class DeleteRepositoryRequest extends AcknowledgedRequest<DeleteRepositor
return this.name;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
name = in.readString();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -48,7 +48,7 @@ public class TransportDeleteRepositoryAction extends TransportMasterNodeAction<D
RepositoriesService repositoriesService, ThreadPool threadPool, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) {
super(DeleteRepositoryAction.NAME, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, DeleteRepositoryRequest::new);
DeleteRepositoryRequest::new, indexNameExpressionResolver);
this.repositoriesService = repositoriesService;
}

View File

@ -55,6 +55,14 @@ public class PutRepositoryRequest extends AcknowledgedRequest<PutRepositoryReque
private Settings settings = EMPTY_SETTINGS;
public PutRepositoryRequest(StreamInput in) throws IOException {
super(in);
name = in.readString();
type = in.readString();
settings = readSettingsFromStream(in);
verify = in.readBoolean();
}
public PutRepositoryRequest() {
}
@ -216,15 +224,6 @@ public class PutRepositoryRequest extends AcknowledgedRequest<PutRepositoryReque
return this;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
name = in.readString();
type = in.readString();
settings = readSettingsFromStream(in);
verify = in.readBoolean();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -48,7 +48,7 @@ public class TransportPutRepositoryAction extends TransportMasterNodeAction<PutR
RepositoriesService repositoriesService, ThreadPool threadPool, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) {
super(PutRepositoryAction.NAME, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, PutRepositoryRequest::new);
PutRepositoryRequest::new, indexNameExpressionResolver);
this.repositoriesService = repositoriesService;
}

View File

@ -47,7 +47,7 @@ public class TransportVerifyRepositoryAction extends
RepositoriesService repositoriesService, ThreadPool threadPool, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) {
super(VerifyRepositoryAction.NAME, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, VerifyRepositoryRequest::new);
VerifyRepositoryRequest::new, indexNameExpressionResolver);
this.repositoriesService = repositoriesService;
}

View File

@ -37,6 +37,11 @@ public class VerifyRepositoryRequest extends AcknowledgedRequest<VerifyRepositor
private String name;
public VerifyRepositoryRequest(StreamInput in) throws IOException {
super(in);
name = in.readString();
}
public VerifyRepositoryRequest() {
}
@ -77,12 +82,6 @@ public class VerifyRepositoryRequest extends AcknowledgedRequest<VerifyRepositor
return this.name;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
name = in.readString();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -38,6 +38,14 @@ public class ClusterRerouteRequest extends AcknowledgedRequest<ClusterRerouteReq
private boolean explain;
private boolean retryFailed;
public ClusterRerouteRequest(StreamInput in) throws IOException {
super(in);
commands = AllocationCommands.readFrom(in);
dryRun = in.readBoolean();
explain = in.readBoolean();
retryFailed = in.readBoolean();
}
public ClusterRerouteRequest() {
}
@ -121,15 +129,6 @@ public class ClusterRerouteRequest extends AcknowledgedRequest<ClusterRerouteReq
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
commands = AllocationCommands.readFrom(in);
dryRun = in.readBoolean();
explain = in.readBoolean();
retryFailed = in.readBoolean();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -65,7 +65,7 @@ public class TransportClusterRerouteAction extends TransportMasterNodeAction<Clu
ThreadPool threadPool, AllocationService allocationService, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) {
super(ClusterRerouteAction.NAME, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, ClusterRerouteRequest::new);
ClusterRerouteRequest::new, indexNameExpressionResolver);
this.allocationService = allocationService;
}

View File

@ -61,6 +61,12 @@ public class ClusterUpdateSettingsRequest extends AcknowledgedRequest<ClusterUpd
private Settings transientSettings = EMPTY_SETTINGS;
private Settings persistentSettings = EMPTY_SETTINGS;
public ClusterUpdateSettingsRequest(StreamInput in) throws IOException {
super(in);
transientSettings = readSettingsFromStream(in);
persistentSettings = readSettingsFromStream(in);
}
public ClusterUpdateSettingsRequest() {
}
@ -157,13 +163,6 @@ public class ClusterUpdateSettingsRequest extends AcknowledgedRequest<ClusterUpd
return this;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
transientSettings = readSettingsFromStream(in);
persistentSettings = readSettingsFromStream(in);
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -55,7 +55,7 @@ public class TransportClusterUpdateSettingsAction extends
ThreadPool threadPool, AllocationService allocationService, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver, ClusterSettings clusterSettings) {
super(ClusterUpdateSettingsAction.NAME, false, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, ClusterUpdateSettingsRequest::new);
ClusterUpdateSettingsRequest::new, indexNameExpressionResolver);
this.allocationService = allocationService;
this.clusterSettings = clusterSettings;
}

View File

@ -33,6 +33,15 @@ public class DeleteStoredScriptRequest extends AcknowledgedRequest<DeleteStoredS
private String id;
public DeleteStoredScriptRequest(StreamInput in) throws IOException {
super(in);
if (in.getVersion().before(Version.V_6_0_0_alpha2)) {
in.readString(); // read lang from previous versions
}
id = in.readString();
}
DeleteStoredScriptRequest() {
super();
}
@ -66,17 +75,6 @@ public class DeleteStoredScriptRequest extends AcknowledgedRequest<DeleteStoredS
return this;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
if (in.getVersion().before(Version.V_6_0_0_alpha2)) {
in.readString(); // read lang from previous versions
}
id = in.readString();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -44,6 +44,22 @@ public class PutStoredScriptRequest extends AcknowledgedRequest<PutStoredScriptR
private XContentType xContentType;
private StoredScriptSource source;
public PutStoredScriptRequest(StreamInput in) throws IOException {
super(in);
if (in.getVersion().before(Version.V_6_0_0_alpha2)) {
in.readString(); // read lang from previous versions
}
id = in.readOptionalString();
content = in.readBytesReference();
xContentType = in.readEnum(XContentType.class);
if (in.getVersion().onOrAfter(Version.V_6_0_0_alpha2)) {
context = in.readOptionalString();
source = new StoredScriptSource(in);
} else {
source = StoredScriptSource.parse(content, xContentType == null ? XContentType.JSON : xContentType);
}
}
public PutStoredScriptRequest() {
super();
}
@ -114,24 +130,6 @@ public class PutStoredScriptRequest extends AcknowledgedRequest<PutStoredScriptR
return this;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
if (in.getVersion().before(Version.V_6_0_0_alpha2)) {
in.readString(); // read lang from previous versions
}
id = in.readOptionalString();
content = in.readBytesReference();
xContentType = in.readEnum(XContentType.class);
if (in.getVersion().onOrAfter(Version.V_6_0_0_alpha2)) {
context = in.readOptionalString();
source = new StoredScriptSource(in);
} else {
source = StoredScriptSource.parse(content, xContentType == null ? XContentType.JSON : xContentType);
}
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -45,7 +45,7 @@ public class TransportDeleteStoredScriptAction extends TransportMasterNodeAction
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver,
ScriptService scriptService) {
super(DeleteStoredScriptAction.NAME, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, DeleteStoredScriptRequest::new);
DeleteStoredScriptRequest::new, indexNameExpressionResolver);
this.scriptService = scriptService;
}

View File

@ -45,7 +45,7 @@ public class TransportPutStoredScriptAction extends TransportMasterNodeAction<Pu
ThreadPool threadPool, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver, ScriptService scriptService) {
super(PutStoredScriptAction.NAME, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, PutStoredScriptRequest::new);
PutStoredScriptRequest::new, indexNameExpressionResolver);
this.scriptService = scriptService;
}

View File

@ -70,6 +70,16 @@ public class IndicesAliasesRequest extends AcknowledgedRequest<IndicesAliasesReq
// expressions only against indices
private static final IndicesOptions INDICES_OPTIONS = IndicesOptions.fromOptions(false, false, true, false, true, false, true, false);
public IndicesAliasesRequest(StreamInput in) throws IOException {
super(in);
allAliasActions = in.readList(AliasActions::new);
if (in.getVersion().onOrAfter(Version.V_7_3_0)) {
origin = in.readOptionalString();
} else {
origin = null;
}
}
public IndicesAliasesRequest() {
}
@ -571,17 +581,6 @@ public class IndicesAliasesRequest extends AcknowledgedRequest<IndicesAliasesReq
return validationException;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
allAliasActions = in.readList(AliasActions::new);
if (in.getVersion().onOrAfter(Version.V_7_3_0)) {
origin = in.readOptionalString();
} else {
origin = null;
}
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -72,8 +72,8 @@ public class TransportIndicesAliasesAction extends TransportMasterNodeAction<Ind
final ActionFilters actionFilters,
final IndexNameExpressionResolver indexNameExpressionResolver,
final RequestValidators<IndicesAliasesRequest> requestValidators) {
super(IndicesAliasesAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
IndicesAliasesRequest::new);
super(IndicesAliasesAction.NAME, transportService, clusterService, threadPool, actionFilters, IndicesAliasesRequest::new,
indexNameExpressionResolver);
this.indexAliasesService = indexAliasesService;
this.requestValidators = Objects.requireNonNull(requestValidators);
}

View File

@ -42,6 +42,17 @@ public class CloseIndexRequest extends AcknowledgedRequest<CloseIndexRequest> im
private IndicesOptions indicesOptions = IndicesOptions.strictExpandOpen();
private ActiveShardCount waitForActiveShards = ActiveShardCount.NONE;
public CloseIndexRequest(StreamInput in) throws IOException {
super(in);
indices = in.readStringArray();
indicesOptions = IndicesOptions.readIndicesOptions(in);
if (in.getVersion().onOrAfter(Version.V_7_2_0)) {
waitForActiveShards = ActiveShardCount.readFrom(in);
} else {
waitForActiveShards = ActiveShardCount.NONE;
}
}
public CloseIndexRequest() {
}
@ -113,18 +124,6 @@ public class CloseIndexRequest extends AcknowledgedRequest<CloseIndexRequest> im
return this;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
indices = in.readStringArray();
indicesOptions = IndicesOptions.readIndicesOptions(in);
if (in.getVersion().onOrAfter(Version.V_7_2_0)) {
waitForActiveShards = ActiveShardCount.readFrom(in);
} else {
waitForActiveShards = ActiveShardCount.NONE;
}
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -60,8 +60,8 @@ public class TransportCloseIndexAction extends TransportMasterNodeAction<CloseIn
ThreadPool threadPool, MetaDataIndexStateService indexStateService,
ClusterSettings clusterSettings, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver, DestructiveOperations destructiveOperations) {
super(CloseIndexAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
CloseIndexRequest::new);
super(CloseIndexAction.NAME, transportService, clusterService, threadPool, actionFilters, CloseIndexRequest::new,
indexNameExpressionResolver);
this.indexStateService = indexStateService;
this.destructiveOperations = destructiveOperations;
this.closeIndexEnabled = CLUSTER_INDICES_CLOSE_ENABLE_SETTING.get(settings);

View File

@ -88,6 +88,39 @@ public class CreateIndexRequest extends AcknowledgedRequest<CreateIndexRequest>
private ActiveShardCount waitForActiveShards = ActiveShardCount.DEFAULT;
public CreateIndexRequest(StreamInput in) throws IOException {
super(in);
cause = in.readString();
index = in.readString();
settings = readSettingsFromStream(in);
int size = in.readVInt();
for (int i = 0; i < size; i++) {
final String type = in.readString();
String source = in.readString();
if (in.getVersion().before(Version.V_6_0_0_alpha1)) { // TODO change to 5.3.0 after backport
// we do not know the content type that comes from earlier versions so we autodetect and convert
source = XContentHelper.convertToJson(new BytesArray(source), false, false, XContentFactory.xContentType(source));
}
mappings.put(type, source);
}
if (in.getVersion().before(Version.V_6_5_0)) {
// This used to be the size of custom metadata classes
int customSize = in.readVInt();
assert customSize == 0 : "unexpected custom metadata when none is supported";
if (customSize > 0) {
throw new IllegalStateException("unexpected custom metadata when none is supported");
}
}
int aliasesSize = in.readVInt();
for (int i = 0; i < aliasesSize; i++) {
aliases.add(Alias.read(in));
}
if (in.getVersion().before(Version.V_7_0_0)) {
in.readBoolean(); // updateAllTypes
}
waitForActiveShards = ActiveShardCount.readFrom(in);
}
public CreateIndexRequest() {
}
@ -430,42 +463,7 @@ public class CreateIndexRequest extends AcknowledgedRequest<CreateIndexRequest>
public CreateIndexRequest waitForActiveShards(final int waitForActiveShards) {
return waitForActiveShards(ActiveShardCount.from(waitForActiveShards));
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
cause = in.readString();
index = in.readString();
settings = readSettingsFromStream(in);
int size = in.readVInt();
for (int i = 0; i < size; i++) {
final String type = in.readString();
String source = in.readString();
if (in.getVersion().before(Version.V_6_0_0_alpha1)) { // TODO change to 5.3.0 after backport
// we do not know the content type that comes from earlier versions so we autodetect and convert
source = XContentHelper.convertToJson(new BytesArray(source), false, false, XContentFactory.xContentType(source));
}
mappings.put(type, source);
}
if (in.getVersion().before(Version.V_6_5_0)) {
// This used to be the size of custom metadata classes
int customSize = in.readVInt();
assert customSize == 0 : "unexpected custom metadata when none is supported";
if (customSize > 0) {
throw new IllegalStateException("unexpected custom metadata when none is supported");
}
}
int aliasesSize = in.readVInt();
for (int i = 0; i < aliasesSize; i++) {
aliases.add(Alias.read(in));
}
if (in.getVersion().before(Version.V_7_0_0)) {
in.readBoolean(); // updateAllTypes
}
waitForActiveShards = ActiveShardCount.readFrom(in);
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -46,8 +46,8 @@ public class TransportCreateIndexAction extends TransportMasterNodeAction<Create
public TransportCreateIndexAction(TransportService transportService, ClusterService clusterService,
ThreadPool threadPool, MetaDataCreateIndexService createIndexService,
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
super(CreateIndexAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
CreateIndexRequest::new);
super(CreateIndexAction.NAME, transportService, clusterService, threadPool, actionFilters, CreateIndexRequest::new,
indexNameExpressionResolver);
this.createIndexService = createIndexService;
}

View File

@ -40,6 +40,12 @@ public class DeleteIndexRequest extends AcknowledgedRequest<DeleteIndexRequest>
// Delete index should work by default on both open and closed indices.
private IndicesOptions indicesOptions = IndicesOptions.fromOptions(false, true, true, true, false, false, true, false);
public DeleteIndexRequest(StreamInput in) throws IOException {
super(in);
indices = in.readStringArray();
indicesOptions = IndicesOptions.readIndicesOptions(in);
}
public DeleteIndexRequest() {
}
@ -94,13 +100,6 @@ public class DeleteIndexRequest extends AcknowledgedRequest<DeleteIndexRequest>
return indices;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
indices = in.readStringArray();
indicesOptions = IndicesOptions.readIndicesOptions(in);
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -56,8 +56,8 @@ public class TransportDeleteIndexAction extends TransportMasterNodeAction<Delete
MetaDataDeleteIndexService deleteIndexService, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver,
DestructiveOperations destructiveOperations) {
super(DeleteIndexAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
DeleteIndexRequest::new);
super(DeleteIndexAction.NAME, transportService, clusterService, threadPool, actionFilters, DeleteIndexRequest::new,
indexNameExpressionResolver );
this.deleteIndexService = deleteIndexService;
this.destructiveOperations = destructiveOperations;
}

View File

@ -77,6 +77,23 @@ public class PutMappingRequest extends AcknowledgedRequest<PutMappingRequest> im
private Index concreteIndex;
public PutMappingRequest(StreamInput in) throws IOException {
super(in);
indices = in.readStringArray();
indicesOptions = IndicesOptions.readIndicesOptions(in);
type = in.readOptionalString();
source = in.readString();
if (in.getVersion().before(Version.V_7_0_0)) {
in.readBoolean(); // updateAllTypes
}
concreteIndex = in.readOptionalWriteable(Index::new);
if (in.getVersion().onOrAfter(Version.V_6_7_0)) {
origin = in.readOptionalString();
} else {
origin = null;
}
}
public PutMappingRequest() {
}
@ -300,24 +317,6 @@ public class PutMappingRequest extends AcknowledgedRequest<PutMappingRequest> im
}
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
indices = in.readStringArray();
indicesOptions = IndicesOptions.readIndicesOptions(in);
type = in.readOptionalString();
source = in.readString();
if (in.getVersion().before(Version.V_7_0_0)) {
in.readBoolean(); // updateAllTypes
}
concreteIndex = in.readOptionalWriteable(Index::new);
if (in.getVersion().onOrAfter(Version.V_6_7_0)) {
origin = in.readOptionalString();
} else {
origin = null;
}
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -60,8 +60,8 @@ public class TransportPutMappingAction extends TransportMasterNodeAction<PutMapp
final ActionFilters actionFilters,
final IndexNameExpressionResolver indexNameExpressionResolver,
final RequestValidators<PutMappingRequest> requestValidators) {
super(PutMappingAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
PutMappingRequest::new);
super(PutMappingAction.NAME, transportService, clusterService, threadPool, actionFilters, PutMappingRequest::new,
indexNameExpressionResolver);
this.metaDataMappingService = metaDataMappingService;
this.requestValidators = Objects.requireNonNull(requestValidators);
}

View File

@ -42,6 +42,15 @@ public class OpenIndexRequest extends AcknowledgedRequest<OpenIndexRequest> impl
private IndicesOptions indicesOptions = IndicesOptions.fromOptions(false, true, false, true);
private ActiveShardCount waitForActiveShards = ActiveShardCount.DEFAULT;
public OpenIndexRequest(StreamInput in) throws IOException {
super(in);
indices = in.readStringArray();
indicesOptions = IndicesOptions.readIndicesOptions(in);
if (in.getVersion().onOrAfter(Version.V_6_1_0)) {
waitForActiveShards = ActiveShardCount.readFrom(in);
}
}
public OpenIndexRequest() {
}
@ -136,16 +145,6 @@ public class OpenIndexRequest extends AcknowledgedRequest<OpenIndexRequest> impl
return waitForActiveShards(ActiveShardCount.from(waitForActiveShards));
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
indices = in.readStringArray();
indicesOptions = IndicesOptions.readIndicesOptions(in);
if (in.getVersion().onOrAfter(Version.V_6_1_0)) {
waitForActiveShards = ActiveShardCount.readFrom(in);
}
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -53,8 +53,8 @@ public class TransportOpenIndexAction extends TransportMasterNodeAction<OpenInde
ThreadPool threadPool, MetaDataIndexStateService indexStateService,
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver,
DestructiveOperations destructiveOperations) {
super(OpenIndexAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
OpenIndexRequest::new);
super(OpenIndexAction.NAME, transportService, clusterService, threadPool, actionFilters, OpenIndexRequest::new,
indexNameExpressionResolver);
this.indexStateService = indexStateService;
this.destructiveOperations = destructiveOperations;
}

View File

@ -96,6 +96,19 @@ public class RolloverRequest extends AcknowledgedRequest<RolloverRequest> implem
//the index name "_na_" is never read back, what matters are settings, mappings and aliases
private CreateIndexRequest createIndexRequest = new CreateIndexRequest("_na_");
public RolloverRequest(StreamInput in) throws IOException {
super(in);
alias = in.readString();
newIndexName = in.readOptionalString();
dryRun = in.readBoolean();
int size = in.readVInt();
for (int i = 0; i < size; i++) {
Condition<?> condition = in.readNamedWriteable(Condition.class);
this.conditions.put(condition.name, condition);
}
createIndexRequest = new CreateIndexRequest(in);
}
RolloverRequest() {}
public RolloverRequest(String alias, String newIndexName) {
@ -112,21 +125,6 @@ public class RolloverRequest extends AcknowledgedRequest<RolloverRequest> implem
return validationException;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
alias = in.readString();
newIndexName = in.readOptionalString();
dryRun = in.readBoolean();
int size = in.readVInt();
for (int i = 0; i < size; i++) {
Condition<?> condition = in.readNamedWriteable(Condition.class);
this.conditions.put(condition.name, condition);
}
createIndexRequest = new CreateIndexRequest();
createIndexRequest.readFrom(in);
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -80,8 +80,8 @@ public class TransportRolloverAction extends TransportMasterNodeAction<RolloverR
ThreadPool threadPool, MetaDataCreateIndexService createIndexService,
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver,
MetaDataIndexAliasesService indexAliasesService, Client client) {
super(RolloverAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
RolloverRequest::new);
super(RolloverAction.NAME, transportService, clusterService, threadPool, actionFilters, RolloverRequest::new,
indexNameExpressionResolver);
this.createIndexService = createIndexService;
this.indexAliasesService = indexAliasesService;
this.client = client;

View File

@ -48,8 +48,8 @@ public class TransportUpdateSettingsAction extends TransportMasterNodeAction<Upd
public TransportUpdateSettingsAction(TransportService transportService, ClusterService clusterService,
ThreadPool threadPool, MetaDataUpdateSettingsService updateSettingsService,
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
super(UpdateSettingsAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
UpdateSettingsRequest::new);
super(UpdateSettingsAction.NAME, transportService, clusterService, threadPool, actionFilters, UpdateSettingsRequest::new,
indexNameExpressionResolver);
this.updateSettingsService = updateSettingsService;
}

View File

@ -56,6 +56,14 @@ public class UpdateSettingsRequest extends AcknowledgedRequest<UpdateSettingsReq
private Settings settings = EMPTY_SETTINGS;
private boolean preserveExisting = false;
public UpdateSettingsRequest(StreamInput in) throws IOException {
super(in);
indices = in.readStringArray();
indicesOptions = IndicesOptions.readIndicesOptions(in);
settings = readSettingsFromStream(in);
preserveExisting = in.readBoolean();
}
public UpdateSettingsRequest() {
}
@ -166,15 +174,6 @@ public class UpdateSettingsRequest extends AcknowledgedRequest<UpdateSettingsReq
return this;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
indices = in.readStringArray();
indicesOptions = IndicesOptions.readIndicesOptions(in);
settings = readSettingsFromStream(in);
preserveExisting = in.readBoolean();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -58,6 +58,22 @@ public class ResizeRequest extends AcknowledgedRequest<ResizeRequest> implements
private ResizeType type = ResizeType.SHRINK;
private Boolean copySettings = true;
public ResizeRequest(StreamInput in) throws IOException {
super(in);
targetIndexRequest = new CreateIndexRequest(in);
sourceIndex = in.readString();
if (in.getVersion().onOrAfter(ResizeAction.COMPATIBILITY_VERSION)) {
type = in.readEnum(ResizeType.class);
} else {
type = ResizeType.SHRINK; // BWC this used to be shrink only
}
if (in.getVersion().before(Version.V_6_4_0)) {
copySettings = null;
} else {
copySettings = in.readOptionalBoolean();
}
}
ResizeRequest() {}
public ResizeRequest(String targetIndex, String sourceIndex) {
@ -88,24 +104,6 @@ public class ResizeRequest extends AcknowledgedRequest<ResizeRequest> implements
this.sourceIndex = index;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
targetIndexRequest = new CreateIndexRequest();
targetIndexRequest.readFrom(in);
sourceIndex = in.readString();
if (in.getVersion().onOrAfter(ResizeAction.COMPATIBILITY_VERSION)) {
type = in.readEnum(ResizeType.class);
} else {
type = ResizeType.SHRINK; // BWC this used to be shrink only
}
if (in.getVersion().before(Version.V_6_4_0)) {
copySettings = null;
} else {
copySettings = in.readOptionalBoolean();
}
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -69,8 +69,7 @@ public class TransportResizeAction extends TransportMasterNodeAction<ResizeReque
protected TransportResizeAction(String actionName, TransportService transportService, ClusterService clusterService,
ThreadPool threadPool, MetaDataCreateIndexService createIndexService,
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, Client client) {
super(actionName, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
ResizeRequest::new);
super(actionName, transportService, clusterService, threadPool, actionFilters, ResizeRequest::new, indexNameExpressionResolver);
this.createIndexService = createIndexService;
this.client = client;
}

View File

@ -47,7 +47,7 @@ public class TransportUpgradeSettingsAction extends TransportMasterNodeAction<Up
ThreadPool threadPool, MetaDataUpdateSettingsService updateSettingsService,
IndexNameExpressionResolver indexNameExpressionResolver, ActionFilters actionFilters) {
super(UpgradeSettingsAction.NAME, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, UpgradeSettingsRequest::new);
UpgradeSettingsRequest::new, indexNameExpressionResolver);
this.updateSettingsService = updateSettingsService;
}

View File

@ -39,6 +39,18 @@ public class UpgradeSettingsRequest extends AcknowledgedRequest<UpgradeSettingsR
private Map<String, Tuple<Version, String>> versions;
public UpgradeSettingsRequest(StreamInput in) throws IOException {
super(in);
int size = in.readVInt();
versions = new HashMap<>();
for (int i=0; i<size; i++) {
String index = in.readString();
Version upgradeVersion = Version.readVersion(in);
String oldestLuceneSegment = in.readString();
versions.put(index, new Tuple<>(upgradeVersion, oldestLuceneSegment));
}
}
public UpgradeSettingsRequest() {
}
@ -74,20 +86,6 @@ public class UpgradeSettingsRequest extends AcknowledgedRequest<UpgradeSettingsR
return this;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
int size = in.readVInt();
versions = new HashMap<>();
for (int i=0; i<size; i++) {
String index = in.readString();
Version upgradeVersion = Version.readVersion(in);
String oldestLuceneSegment = in.readString();
versions.put(index, new Tuple<>(upgradeVersion, oldestLuceneSegment));
}
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -39,6 +39,11 @@ public class DeletePipelineRequest extends AcknowledgedRequest<DeletePipelineReq
this.id = id;
}
public DeletePipelineRequest(StreamInput in) throws IOException {
super(in);
id = in.readString();
}
DeletePipelineRequest() {
}
@ -55,12 +60,6 @@ public class DeletePipelineRequest extends AcknowledgedRequest<DeletePipelineReq
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
id = in.readString();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -43,7 +43,7 @@ public class DeletePipelineTransportAction extends TransportMasterNodeAction<Del
public DeletePipelineTransportAction(ThreadPool threadPool, IngestService ingestService, TransportService transportService,
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
super(DeletePipelineAction.NAME, transportService, ingestService.getClusterService(),
threadPool, actionFilters, indexNameExpressionResolver, DeletePipelineRequest::new);
threadPool, actionFilters, DeletePipelineRequest::new, indexNameExpressionResolver);
this.ingestService = ingestService;
}

View File

@ -46,6 +46,13 @@ public class PutPipelineRequest extends AcknowledgedRequest<PutPipelineRequest>
this.xContentType = Objects.requireNonNull(xContentType);
}
public PutPipelineRequest(StreamInput in) throws IOException {
super(in);
id = in.readString();
source = in.readBytesReference();
xContentType = in.readEnum(XContentType.class);
}
PutPipelineRequest() {
}
@ -66,14 +73,6 @@ public class PutPipelineRequest extends AcknowledgedRequest<PutPipelineRequest>
return xContentType;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
id = in.readString();
source = in.readBytesReference();
xContentType = in.readEnum(XContentType.class);
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -53,7 +53,7 @@ public class PutPipelineTransportAction extends TransportMasterNodeAction<PutPip
IngestService ingestService, NodeClient client) {
super(
PutPipelineAction.NAME, transportService, ingestService.getClusterService(),
threadPool, actionFilters, indexNameExpressionResolver, PutPipelineRequest::new
threadPool, actionFilters, PutPipelineRequest::new, indexNameExpressionResolver
);
this.client = client;
this.ingestService = ingestService;

View File

@ -82,9 +82,8 @@ public abstract class AcknowledgedRequest<Request extends MasterNodeRequest<Requ
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
timeout = in.readTimeValue();
public final void readFrom(StreamInput in) throws IOException {
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
}
@Override

View File

@ -165,9 +165,7 @@ public class ClusterRerouteRequestTests extends ESTestCase {
try (BytesStreamOutput output = new BytesStreamOutput()) {
original.writeTo(output);
try (StreamInput in = new NamedWriteableAwareStreamInput(output.bytes().streamInput(), namedWriteableRegistry)) {
ClusterRerouteRequest copy = new ClusterRerouteRequest();
copy.readFrom(in);
return copy;
return new ClusterRerouteRequest(in);
}
}
}

View File

@ -68,8 +68,7 @@ public class ClusterRerouteTests extends ESAllocationTestCase {
NamedWriteableRegistry namedWriteableRegistry = new NamedWriteableRegistry(NetworkModule.getNamedWriteables());
StreamInput wrap = new NamedWriteableAwareStreamInput(bytes.streamInput(),
namedWriteableRegistry);
ClusterRerouteRequest deserializedReq = new ClusterRerouteRequest();
deserializedReq.readFrom(wrap);
ClusterRerouteRequest deserializedReq = new ClusterRerouteRequest(wrap);
assertEquals(req.isRetryFailed(), deserializedReq.isRetryFailed());
assertEquals(req.dryRun(), deserializedReq.dryRun());

View File

@ -43,8 +43,7 @@ public class PutStoredScriptRequestTests extends ESTestCase {
storedScriptRequest.writeTo(output);
try (StreamInput in = output.bytes().streamInput()) {
PutStoredScriptRequest serialized = new PutStoredScriptRequest();
serialized.readFrom(in);
PutStoredScriptRequest serialized = new PutStoredScriptRequest(in);
assertEquals(XContentType.JSON, serialized.xContentType());
assertEquals(storedScriptRequest.id(), serialized.id());
assertEquals(storedScriptRequest.context(), serialized.context());

View File

@ -37,9 +37,9 @@ public class CloseIndexRequestTests extends ESTestCase {
try (BytesStreamOutput out = new BytesStreamOutput()) {
request.writeTo(out);
final CloseIndexRequest deserializedRequest = new CloseIndexRequest();
final CloseIndexRequest deserializedRequest;
try (StreamInput in = out.bytes().streamInput()) {
deserializedRequest.readFrom(in);
deserializedRequest = new CloseIndexRequest(in);
}
assertEquals(request.timeout(), deserializedRequest.timeout());
assertEquals(request.masterNodeTimeout(), deserializedRequest.masterNodeTimeout());
@ -75,10 +75,10 @@ public class CloseIndexRequestTests extends ESTestCase {
out.writeStringArray(sample.indices());
sample.indicesOptions().writeIndicesOptions(out);
final CloseIndexRequest deserializedRequest = new CloseIndexRequest();
final CloseIndexRequest deserializedRequest;
try (StreamInput in = out.bytes().streamInput()) {
in.setVersion(randomVersionBetween(random(), Version.V_6_4_0, VersionUtils.getPreviousVersion(Version.V_7_2_0)));
deserializedRequest.readFrom(in);
deserializedRequest = new CloseIndexRequest(in);
}
assertEquals(sample.getParentTask(), deserializedRequest.getParentTask());
assertEquals(sample.masterNodeTimeout(), deserializedRequest.masterNodeTimeout());

View File

@ -53,8 +53,7 @@ public class CreateIndexRequestTests extends ESTestCase {
request.writeTo(output);
try (StreamInput in = output.bytes().streamInput()) {
CreateIndexRequest serialized = new CreateIndexRequest();
serialized.readFrom(in);
CreateIndexRequest serialized = new CreateIndexRequest(in);
assertEquals(request.index(), serialized.index());
assertEquals(mapping, serialized.mappings().get("my_type"));
}

View File

@ -124,8 +124,7 @@ public class RolloverRequestTests extends ESTestCase {
originalRequest.writeTo(out);
BytesReference bytes = out.bytes();
try (StreamInput in = new NamedWriteableAwareStreamInput(bytes.streamInput(), writeableRegistry)) {
RolloverRequest cloneRequest = new RolloverRequest();
cloneRequest.readFrom(in);
RolloverRequest cloneRequest = new RolloverRequest(in);
assertThat(cloneRequest.getNewIndexName(), equalTo(originalRequest.getNewIndexName()));
assertThat(cloneRequest.getAlias(), equalTo(originalRequest.getAlias()));
for (Map.Entry<String, Condition<?>> entry : cloneRequest.getConditions().entrySet()) {

View File

@ -20,11 +20,12 @@
package org.elasticsearch.action.admin.indices.settings.put;
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.Settings.Builder;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.util.CollectionUtils;
import org.elasticsearch.test.AbstractStreamableTestCase;
import org.elasticsearch.test.AbstractWireSerializingTestCase;
import org.elasticsearch.test.ESTestCase;
import java.util.ArrayList;
@ -35,7 +36,7 @@ import java.util.Set;
import java.util.StringJoiner;
import java.util.function.Supplier;
public class UpdateSettingsRequestStreamableTests extends AbstractStreamableTestCase<UpdateSettingsRequest> {
public class UpdateSettingsRequestSerializationTests extends AbstractWireSerializingTestCase<UpdateSettingsRequest> {
@Override
protected UpdateSettingsRequest mutateInstance(UpdateSettingsRequest request) {
@ -60,8 +61,8 @@ public class UpdateSettingsRequestStreamableTests extends AbstractStreamableTest
}
@Override
protected UpdateSettingsRequest createBlankInstance() {
return new UpdateSettingsRequest();
protected Writeable.Reader<UpdateSettingsRequest> instanceReader() {
return UpdateSettingsRequest::new;
}
public static UpdateSettingsRequest createTestItem() {

View File

@ -32,7 +32,7 @@ public class UpdateSettingsRequestTests extends AbstractXContentTestCase<UpdateS
@Override
protected UpdateSettingsRequest createTestInstance() {
UpdateSettingsRequest testRequest = UpdateSettingsRequestStreamableTests.createTestItem();
UpdateSettingsRequest testRequest = UpdateSettingsRequestSerializationTests.createTestItem();
if (enclosedSettings) {
UpdateSettingsRequest requestWithEnclosingSettings = new UpdateSettingsRequest(testRequest.settings()) {
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {

View File

@ -42,8 +42,7 @@ public class PutPipelineRequestTests extends ESTestCase {
request.writeTo(output);
StreamInput in = StreamInput.wrap(output.bytes().toBytesRef().bytes);
PutPipelineRequest serialized = new PutPipelineRequest();
serialized.readFrom(in);
PutPipelineRequest serialized = new PutPipelineRequest(in);
assertEquals(XContentType.JSON, serialized.getXContentType());
assertEquals("{}", serialized.getSource().utf8ToString());
}

View File

@ -16,6 +16,13 @@ public class PostStartBasicRequest extends AcknowledgedRequest<PostStartBasicReq
private boolean acknowledge = false;
public PostStartBasicRequest() {}
public PostStartBasicRequest(StreamInput in) throws IOException {
super(in);
acknowledge = in.readBoolean();
}
@Override
public ActionRequestValidationException validate() {
return null;
@ -30,12 +37,6 @@ public class PostStartBasicRequest extends AcknowledgedRequest<PostStartBasicReq
return acknowledge;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
acknowledge = in.readBoolean();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -21,6 +21,12 @@ public class PutLicenseRequest extends AcknowledgedRequest<PutLicenseRequest> {
private License license;
private boolean acknowledge = false;
public PutLicenseRequest(StreamInput in) throws IOException {
super(in);
license = License.readLicense(in);
acknowledge = in.readBoolean();
}
public PutLicenseRequest() {
}
@ -61,13 +67,6 @@ public class PutLicenseRequest extends AcknowledgedRequest<PutLicenseRequest> {
return acknowledge;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
license = License.readLicense(in);
acknowledge = in.readBoolean();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -33,7 +33,7 @@ public class TransportDeleteLicenseAction extends TransportMasterNodeAction<Dele
LicenseService licenseService, ThreadPool threadPool, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) {
super(DeleteLicenseAction.NAME, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, DeleteLicenseRequest::new);
DeleteLicenseRequest::new, indexNameExpressionResolver);
this.licenseService = licenseService;
}

View File

@ -29,7 +29,7 @@ public class TransportPostStartBasicAction extends TransportMasterNodeAction<Pos
LicenseService licenseService, ThreadPool threadPool, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) {
super(PostStartBasicAction.NAME, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, PostStartBasicRequest::new);
PostStartBasicRequest::new, indexNameExpressionResolver);
this.licenseService = licenseService;
}

View File

@ -30,8 +30,8 @@ public class TransportPutLicenseAction extends TransportMasterNodeAction<PutLice
public TransportPutLicenseAction(TransportService transportService, ClusterService clusterService,
LicenseService licenseService, ThreadPool threadPool, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) {
super(PutLicenseAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
PutLicenseRequest::new);
super(PutLicenseAction.NAME, transportService, clusterService, threadPool, actionFilters, PutLicenseRequest::new,
indexNameExpressionResolver);
this.licenseService = licenseService;
}

View File

@ -7,10 +7,19 @@ package org.elasticsearch.protocol.xpack.license;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.support.master.AcknowledgedRequest;
import org.elasticsearch.common.io.stream.StreamInput;
import java.io.IOException;
public class DeleteLicenseRequest extends AcknowledgedRequest<DeleteLicenseRequest> {
public DeleteLicenseRequest() {}
public DeleteLicenseRequest(StreamInput in) throws IOException {
super(in);
}
@Override
public ActionRequestValidationException validate() {
return null;

View File

@ -7,12 +7,20 @@ package org.elasticsearch.protocol.xpack.license;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.support.master.AcknowledgedRequest;
import org.elasticsearch.common.io.stream.StreamInput;
import java.io.IOException;
public class PutLicenseRequest extends AcknowledgedRequest<PutLicenseRequest> {
private String licenseDefinition;
private boolean acknowledge = false;
public PutLicenseRequest(StreamInput in) throws IOException {
super(in);
}
public PutLicenseRequest() {
}

View File

@ -8,9 +8,17 @@ package org.elasticsearch.xpack.core.indexlifecycle;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.support.master.AcknowledgedRequest;
import org.elasticsearch.common.io.stream.StreamInput;
import java.io.IOException;
public class StartILMRequest extends AcknowledgedRequest<StartILMRequest> {
public StartILMRequest(StreamInput in) throws IOException {
super(in);
}
public StartILMRequest() {
}

View File

@ -8,9 +8,17 @@ package org.elasticsearch.xpack.core.indexlifecycle;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.support.master.AcknowledgedRequest;
import org.elasticsearch.common.io.stream.StreamInput;
import java.io.IOException;
public class StopILMRequest extends AcknowledgedRequest<StopILMRequest> {
public StopILMRequest(StreamInput in) throws IOException {
super(in);
}
public StopILMRequest() {
}

View File

@ -53,6 +53,11 @@ public class DeleteLifecycleAction extends ActionType<DeleteLifecycleAction.Resp
this.policyName = policyName;
}
public Request(StreamInput in) throws IOException {
super(in);
policyName = in.readString();
}
public Request() {
}
@ -65,12 +70,6 @@ public class DeleteLifecycleAction extends ActionType<DeleteLifecycleAction.Resp
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
policyName = in.readString();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -109,6 +109,11 @@ public class GetLifecycleAction extends StreamableResponseActionType<GetLifecycl
this.policyNames = policyNames;
}
public Request(StreamInput in) throws IOException {
super(in);
policyNames = in.readStringArray();
}
public Request() {
policyNames = Strings.EMPTY_ARRAY;
}
@ -122,12 +127,6 @@ public class GetLifecycleAction extends StreamableResponseActionType<GetLifecycl
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
policyNames = in.readStringArray();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -92,6 +92,10 @@ public class GetStatusAction extends StreamableResponseActionType<GetStatusActio
public static class Request extends AcknowledgedRequest<Request> {
public Request(StreamInput in) throws IOException {
super(in);
}
public Request() {
}
@ -100,11 +104,6 @@ public class GetStatusAction extends StreamableResponseActionType<GetStatusActio
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -73,6 +73,13 @@ public class MoveToStepAction extends ActionType<MoveToStepAction.Response> {
this.nextStepKey = nextStepKey;
}
public Request(StreamInput in) throws IOException {
super(in);
this.index = in.readString();
this.currentStepKey = new StepKey(in);
this.nextStepKey = new StepKey(in);
}
public Request() {
}
@ -97,14 +104,6 @@ public class MoveToStepAction extends ActionType<MoveToStepAction.Response> {
return PARSER.apply(parser, name);
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
this.index = in.readString();
this.currentStepKey = new StepKey(in);
this.nextStepKey = new StepKey(in);
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -62,6 +62,11 @@ public class PutLifecycleAction extends ActionType<PutLifecycleAction.Response>
this.policy = policy;
}
public Request(StreamInput in) throws IOException {
super(in);
policy = new LifecyclePolicy(in);
}
public Request() {
}
@ -86,12 +91,6 @@ public class PutLifecycleAction extends ActionType<PutLifecycleAction.Response>
return builder;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
policy = new LifecyclePolicy(in);
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -114,6 +114,12 @@ public class RemoveIndexLifecyclePolicyAction extends StreamableResponseActionTy
private String[] indices;
private IndicesOptions indicesOptions = IndicesOptions.strictExpandOpen();
public Request(StreamInput in) throws IOException {
super(in);
indices = in.readStringArray();
indicesOptions = IndicesOptions.readIndicesOptions(in);
}
public Request() {
}
@ -148,13 +154,6 @@ public class RemoveIndexLifecyclePolicyAction extends StreamableResponseActionTy
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
indices = in.readStringArray();
indicesOptions = IndicesOptions.readIndicesOptions(in);
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -54,6 +54,12 @@ public class RetryAction extends ActionType<RetryAction.Response> {
this.indices = indices;
}
public Request(StreamInput in) throws IOException {
super(in);
this.indices = in.readStringArray();
this.indicesOptions = IndicesOptions.readIndicesOptions(in);
}
public Request() {
}
@ -83,13 +89,6 @@ public class RetryAction extends ActionType<RetryAction.Response> {
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
this.indices = in.readStringArray();
this.indicesOptions = IndicesOptions.readIndicesOptions(in);
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -39,6 +39,11 @@ public class DeleteCalendarAction extends ActionType<AcknowledgedResponse> {
private String calendarId;
public Request(StreamInput in) throws IOException {
super(in);
calendarId = in.readString();
}
public Request() {
}
@ -55,12 +60,6 @@ public class DeleteCalendarAction extends ActionType<AcknowledgedResponse> {
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
calendarId = in.readString();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -39,6 +39,12 @@ public class DeleteCalendarEventAction extends ActionType<AcknowledgedResponse>
private String calendarId;
private String eventId;
public Request(StreamInput in) throws IOException {
super(in);
calendarId = in.readString();
eventId = in.readString();
}
public Request() {
}
@ -60,13 +66,6 @@ public class DeleteCalendarEventAction extends ActionType<AcknowledgedResponse>
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
calendarId = in.readString();
eventId = in.readString();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -74,11 +74,6 @@ public class DeleteDatafeedAction extends ActionType<AcknowledgedResponse> {
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -41,6 +41,11 @@ public class DeleteFilterAction extends ActionType<AcknowledgedResponse> {
private String filterId;
public Request(StreamInput in) throws IOException {
super(in);
filterId = in.readString();
}
public Request() {
}
@ -58,12 +63,6 @@ public class DeleteFilterAction extends ActionType<AcknowledgedResponse> {
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
filterId = in.readString();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -40,6 +40,13 @@ public class DeleteForecastAction extends ActionType<AcknowledgedResponse> {
private String forecastId;
private boolean allowNoForecasts = true;
public Request(StreamInput in) throws IOException {
super(in);
jobId = in.readString();
forecastId = in.readString();
allowNoForecasts = in.readBoolean();
}
public Request() {
}
@ -69,14 +76,6 @@ public class DeleteForecastAction extends ActionType<AcknowledgedResponse> {
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
jobId = in.readString();
forecastId = in.readString();
allowNoForecasts = in.readBoolean();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -98,11 +98,6 @@ public class DeleteJobAction extends ActionType<AcknowledgedResponse> {
return new JobDeletionTask(id, type, action, "delete-job-" + jobId, parentTaskId, headers);
}
@Override
public void readFrom(StreamInput in) throws IOException {
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -60,11 +60,6 @@ public class PutDataFrameAnalyticsAction extends ActionType<PutDataFrameAnalytic
this.config = config;
}
@Override
public void readFrom(StreamInput in) throws IOException {
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -62,11 +62,6 @@ public class PutDatafeedAction extends ActionType<PutDatafeedAction.Response> {
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -86,11 +86,6 @@ public class PutJobAction extends ActionType<PutJobAction.Response> {
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -102,11 +102,6 @@ public class RevertModelSnapshotAction extends ActionType<RevertModelSnapshotAct
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -53,7 +53,8 @@ public class SetUpgradeModeAction extends ActionType<AcknowledgedResponse> {
}
public Request(StreamInput in) throws IOException {
readFrom(in);
super(in);
this.enabled = in.readBoolean();
}
public Request() {
@ -68,12 +69,6 @@ public class SetUpgradeModeAction extends ActionType<AcknowledgedResponse> {
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
this.enabled = in.readBoolean();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -60,11 +60,6 @@ public class UpdateDatafeedAction extends ActionType<PutDatafeedAction.Response>
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -96,11 +96,6 @@ public class UpdateJobAction extends ActionType<PutJobAction.Response> {
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -49,6 +49,11 @@ public class PutRollupJobAction extends ActionType<AcknowledgedResponse> {
this.config = config;
}
public Request(StreamInput in) throws IOException {
super(in);
this.config = new RollupJobConfig(in);
}
public Request() {
}
@ -65,12 +70,6 @@ public class PutRollupJobAction extends ActionType<AcknowledgedResponse> {
this.config = config;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
this.config = new RollupJobConfig(in);
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -35,6 +35,11 @@ public class DeleteSnapshotLifecycleAction extends ActionType<DeleteSnapshotLife
private String lifecycleId;
public Request(StreamInput in) throws IOException {
super(in);
lifecycleId = in.readString();
}
public Request() { }
public Request(String lifecycleId) {
@ -50,12 +55,6 @@ public class DeleteSnapshotLifecycleAction extends ActionType<DeleteSnapshotLife
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
lifecycleId = in.readString();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -45,18 +45,17 @@ public class ExecuteSnapshotLifecycleAction extends ActionType<ExecuteSnapshotLi
this.lifecycleId = lifecycleId;
}
public Request(StreamInput in) throws IOException {
super(in);
lifecycleId = in.readString();
}
public Request() { }
public String getLifecycleId() {
return this.lifecycleId;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
lifecycleId = in.readString();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -44,6 +44,11 @@ public class GetSnapshotLifecycleAction extends ActionType<GetSnapshotLifecycleA
this.lifecycleIds = Objects.requireNonNull(lifecycleIds, "ids may not be null");
}
public Request(StreamInput in) throws IOException {
super(in);
lifecycleIds = in.readStringArray();
}
public Request() {
this.lifecycleIds = Strings.EMPTY_ARRAY;
}
@ -57,12 +62,6 @@ public class GetSnapshotLifecycleAction extends ActionType<GetSnapshotLifecycleA
return null;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
lifecycleIds = in.readStringArray();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -45,6 +45,12 @@ public class PutSnapshotLifecycleAction extends ActionType<PutSnapshotLifecycleA
this.lifecycle = lifecycle;
}
public Request(StreamInput in) throws IOException {
super(in);
lifecycleId = in.readString();
lifecycle = new SnapshotLifecyclePolicy(in);
}
public Request() { }
public String getLifecycleId() {
@ -59,13 +65,6 @@ public class PutSnapshotLifecycleAction extends ActionType<PutSnapshotLifecycleA
return new Request(lifecycleId, SnapshotLifecyclePolicy.parse(parser, lifecycleId));
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
lifecycleId = in.readString();
lifecycle = new SnapshotLifecyclePolicy(in);
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);

View File

@ -6,20 +6,21 @@
package org.elasticsearch.xpack.core.indexlifecycle;
import org.elasticsearch.test.AbstractStreamableTestCase;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.test.AbstractWireSerializingTestCase;
public class StartILMRequestTests extends AbstractStreamableTestCase<StartILMRequest> {
@Override
protected StartILMRequest createBlankInstance() {
return new StartILMRequest();
}
public class StartILMRequestTests extends AbstractWireSerializingTestCase<StartILMRequest> {
@Override
protected StartILMRequest createTestInstance() {
return new StartILMRequest();
}
@Override
protected Writeable.Reader<StartILMRequest> instanceReader() {
return StartILMRequest::new;
}
public void testValidate() {
StartILMRequest request = createTestInstance();
assertNull(request.validate());

View File

@ -6,20 +6,21 @@
package org.elasticsearch.xpack.core.indexlifecycle;
import org.elasticsearch.test.AbstractStreamableTestCase;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.test.AbstractWireSerializingTestCase;
public class StopILMRequestTests extends AbstractStreamableTestCase<StopILMRequest> {
@Override
protected StopILMRequest createBlankInstance() {
return new StopILMRequest();
}
public class StopILMRequestTests extends AbstractWireSerializingTestCase<StopILMRequest> {
@Override
protected StopILMRequest createTestInstance() {
return new StopILMRequest();
}
@Override
protected Writeable.Reader<StopILMRequest> instanceReader() {
return StopILMRequest::new;
}
public void testValidate() {
StopILMRequest request = createTestInstance();
assertNull(request.validate());

View File

@ -5,10 +5,11 @@
*/
package org.elasticsearch.xpack.core.indexlifecycle.action;
import org.elasticsearch.test.AbstractStreamableTestCase;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.test.AbstractWireSerializingTestCase;
import org.elasticsearch.xpack.core.indexlifecycle.action.DeleteLifecycleAction.Request;
public class DeleteLifecycleRequestTests extends AbstractStreamableTestCase<DeleteLifecycleAction.Request> {
public class DeleteLifecycleRequestTests extends AbstractWireSerializingTestCase<Request> {
@Override
protected Request createTestInstance() {
@ -16,8 +17,8 @@ public class DeleteLifecycleRequestTests extends AbstractStreamableTestCase<Dele
}
@Override
protected Request createBlankInstance() {
return new Request();
protected Writeable.Reader<Request> instanceReader() {
return Request::new;
}
@Override

View File

@ -5,12 +5,13 @@
*/
package org.elasticsearch.xpack.core.indexlifecycle.action;
import org.elasticsearch.test.AbstractStreamableTestCase;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.test.AbstractWireSerializingTestCase;
import org.elasticsearch.xpack.core.indexlifecycle.action.GetLifecycleAction.Request;
import java.util.Arrays;
public class GetLifecycleRequestTests extends AbstractStreamableTestCase<GetLifecycleAction.Request> {
public class GetLifecycleRequestTests extends AbstractWireSerializingTestCase<Request> {
@Override
protected Request createTestInstance() {
@ -18,8 +19,8 @@ public class GetLifecycleRequestTests extends AbstractStreamableTestCase<GetLife
}
@Override
protected Request createBlankInstance() {
return new Request();
protected Writeable.Reader<Request> instanceReader() {
return Request::new;
}
@Override

View File

@ -6,14 +6,15 @@
*/
package org.elasticsearch.xpack.core.indexlifecycle.action;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.test.AbstractStreamableXContentTestCase;
import org.elasticsearch.test.AbstractSerializingTestCase;
import org.elasticsearch.xpack.core.indexlifecycle.Step.StepKey;
import org.elasticsearch.xpack.core.indexlifecycle.StepKeyTests;
import org.elasticsearch.xpack.core.indexlifecycle.action.MoveToStepAction.Request;
import org.junit.Before;
public class MoveToStepRequestTests extends AbstractStreamableXContentTestCase<Request> {
public class MoveToStepRequestTests extends AbstractSerializingTestCase<Request> {
private String index;
private static final StepKeyTests stepKeyTests = new StepKeyTests();
@ -29,8 +30,8 @@ public class MoveToStepRequestTests extends AbstractStreamableXContentTestCase<R
}
@Override
protected Request createBlankInstance() {
return new Request();
protected Writeable.Reader<Request> instanceReader() {
return Request::new;
}
@Override

View File

@ -8,9 +8,10 @@ package org.elasticsearch.xpack.core.indexlifecycle.action;
import org.elasticsearch.cluster.ClusterModule;
import org.elasticsearch.common.ParseField;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.test.AbstractStreamableXContentTestCase;
import org.elasticsearch.test.AbstractSerializingTestCase;
import org.elasticsearch.xpack.core.indexlifecycle.AllocateAction;
import org.elasticsearch.xpack.core.indexlifecycle.DeleteAction;
import org.elasticsearch.xpack.core.indexlifecycle.ForceMergeAction;
@ -32,7 +33,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class PutLifecycleRequestTests extends AbstractStreamableXContentTestCase<PutLifecycleAction.Request> {
public class PutLifecycleRequestTests extends AbstractSerializingTestCase<Request> {
private String lifecycleName;
@ -47,8 +48,8 @@ public class PutLifecycleRequestTests extends AbstractStreamableXContentTestCase
}
@Override
protected Request createBlankInstance() {
return new Request();
protected Writeable.Reader<Request> instanceReader() {
return Request::new;
}
@Override

View File

@ -7,13 +7,14 @@
package org.elasticsearch.xpack.core.indexlifecycle.action;
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.test.AbstractStreamableTestCase;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.test.AbstractWireSerializingTestCase;
import org.elasticsearch.xpack.core.indexlifecycle.action.RemoveIndexLifecyclePolicyAction.Request;
import java.io.IOException;
import java.util.Arrays;
public class RemoveIndexLifecyclePolicyRequestTests extends AbstractStreamableTestCase<RemoveIndexLifecyclePolicyAction.Request> {
public class RemoveIndexLifecyclePolicyRequestTests extends AbstractWireSerializingTestCase<Request> {
@Override
protected Request createTestInstance() {
@ -30,10 +31,10 @@ public class RemoveIndexLifecyclePolicyRequestTests extends AbstractStreamableTe
}
@Override
protected Request createBlankInstance() {
return new Request();
protected Writeable.Reader<Request> instanceReader() {
return Request::new;
}
@Override
protected Request mutateInstance(Request instance) throws IOException {
String[] indices = instance.indices();

View File

@ -7,13 +7,14 @@
package org.elasticsearch.xpack.core.indexlifecycle.action;
import org.elasticsearch.action.support.IndicesOptions;
import org.elasticsearch.test.AbstractStreamableTestCase;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.test.AbstractWireSerializingTestCase;
import org.elasticsearch.xpack.core.indexlifecycle.action.RetryAction.Request;
import java.io.IOException;
import java.util.Arrays;
public class RetryRequestTests extends AbstractStreamableTestCase<Request> {
public class RetryRequestTests extends AbstractWireSerializingTestCase<Request> {
@Override
protected Request createTestInstance() {
@ -29,6 +30,11 @@ public class RetryRequestTests extends AbstractStreamableTestCase<Request> {
return request;
}
@Override
protected Writeable.Reader<Request> instanceReader() {
return Request::new;
}
@Override
protected Request mutateInstance(Request instance) throws IOException {
String[] indices = instance.indices();
@ -50,9 +56,4 @@ public class RetryRequestTests extends AbstractStreamableTestCase<Request> {
newRequest.indicesOptions(indicesOptions);
return newRequest;
}
@Override
protected Request createBlankInstance() {
return new Request();
}
}

View File

@ -5,10 +5,11 @@
*/
package org.elasticsearch.xpack.core.ml.action;
import org.elasticsearch.test.AbstractStreamableTestCase;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.test.AbstractWireSerializingTestCase;
import org.elasticsearch.xpack.core.ml.action.DeleteCalendarEventAction.Request;
public class DeleteCalendarEventActionRequestTests extends AbstractStreamableTestCase<DeleteCalendarEventAction.Request> {
public class DeleteCalendarEventActionRequestTests extends AbstractWireSerializingTestCase<Request> {
@Override
protected Request createTestInstance() {
@ -16,7 +17,7 @@ public class DeleteCalendarEventActionRequestTests extends AbstractStreamableTes
}
@Override
protected Request createBlankInstance() {
return new Request();
protected Writeable.Reader<Request> instanceReader() {
return Request::new;
}
}

View File

@ -59,8 +59,8 @@ public final class TransportFreezeIndexAction extends
IndexNameExpressionResolver indexNameExpressionResolver,
DestructiveOperations destructiveOperations,
TransportCloseIndexAction transportCloseIndexAction) {
super(FreezeIndexAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
FreezeRequest::new);
super(FreezeIndexAction.NAME, transportService, clusterService, threadPool, actionFilters, FreezeRequest::new,
indexNameExpressionResolver);
this.destructiveOperations = destructiveOperations;
this.indexStateService = indexStateService;
this.transportCloseIndexAction = transportCloseIndexAction;

View File

@ -45,7 +45,7 @@ public class TransportDeleteLifecycleAction extends TransportMasterNodeAction<Re
public TransportDeleteLifecycleAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
super(DeleteLifecycleAction.NAME, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, Request::new);
Request::new, indexNameExpressionResolver);
}
@Override

View File

@ -35,8 +35,8 @@ public class TransportGetLifecycleAction extends StreamableTransportMasterNodeAc
@Inject
public TransportGetLifecycleAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
super(GetLifecycleAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
Request::new);
super(GetLifecycleAction.NAME, transportService, clusterService, threadPool, actionFilters, Request::new,
indexNameExpressionResolver);
}
@Override

View File

@ -29,7 +29,7 @@ public class TransportGetStatusAction extends StreamableTransportMasterNodeActio
public TransportGetStatusAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
super(GetStatusAction.NAME, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, Request::new);
Request::new, indexNameExpressionResolver);
}
@Override

View File

@ -37,8 +37,8 @@ public class TransportMoveToStepAction extends TransportMasterNodeAction<Request
public TransportMoveToStepAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver,
IndexLifecycleService indexLifecycleService) {
super(MoveToStepAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
Request::new);
super(MoveToStepAction.NAME, transportService, clusterService, threadPool, actionFilters, Request::new,
indexNameExpressionResolver);
this.indexLifecycleService = indexLifecycleService;
}

View File

@ -44,8 +44,8 @@ public class TransportPutLifecycleAction extends TransportMasterNodeAction<Reque
@Inject
public TransportPutLifecycleAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
super(PutLifecycleAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
Request::new);
super(PutLifecycleAction.NAME, transportService, clusterService, threadPool, actionFilters, Request::new,
indexNameExpressionResolver);
}
@Override

View File

@ -34,7 +34,7 @@ public class TransportRemoveIndexLifecyclePolicyAction extends StreamableTranspo
ThreadPool threadPool, ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver) {
super(RemoveIndexLifecyclePolicyAction.NAME, transportService, clusterService, threadPool, actionFilters,
indexNameExpressionResolver, Request::new);
Request::new, indexNameExpressionResolver);
}
@Override

View File

@ -37,8 +37,7 @@ public class TransportRetryAction extends TransportMasterNodeAction<Request, Res
public TransportRetryAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver,
IndexLifecycleService indexLifecycleService) {
super(RetryAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
Request::new);
super(RetryAction.NAME, transportService, clusterService, threadPool, actionFilters, Request::new, indexNameExpressionResolver);
this.indexLifecycleService = indexLifecycleService;
}

View File

@ -32,8 +32,8 @@ public class TransportStartILMAction extends TransportMasterNodeAction<StartILMR
@Inject
public TransportStartILMAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
super(StartILMAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,
StartILMRequest::new);
super(StartILMAction.NAME, transportService, clusterService, threadPool, actionFilters, StartILMRequest::new,
indexNameExpressionResolver);
}
@Override

Some files were not shown because too many files have changed in this diff Show More