Merge pull request #13218 from brwe/resolve-index-default-impl

add default impl for resolveIndex()
This commit is contained in:
Britta Weber 2015-08-31 15:53:57 +02:00
commit a7e240077d
3 changed files with 3 additions and 11 deletions

View File

@ -94,11 +94,6 @@ public class TransportDeleteAction extends TransportReplicationAction<DeleteRequ
}
}
@Override
protected boolean resolveIndex() {
return true;
}
@Override
protected void resolveRequest(final ClusterState state, final InternalRequest request, final ActionListener<DeleteResponse> listener) {
request.request().routing(state.metaData().resolveIndexRouting(request.request().routing(), request.request().index()));

View File

@ -120,11 +120,6 @@ public class TransportIndexAction extends TransportReplicationAction<IndexReques
}
}
@Override
protected boolean resolveIndex() {
return true;
}
@Override
protected void resolveRequest(ClusterState state, InternalRequest request, ActionListener<IndexResponse> indexResponseActionListener) {
MetaData metaData = clusterService.state().metaData();

View File

@ -142,7 +142,9 @@ public abstract class TransportReplicationAction<Request extends ReplicationRequ
return state.blocks().indexBlockedException(ClusterBlockLevel.WRITE, request.concreteIndex());
}
protected abstract boolean resolveIndex();
protected boolean resolveIndex() {
return true;
}
/**
* Resolves the request, by default doing nothing. Can be subclassed to do