Marvel: add implementation for synced flush to SecuredClient
see elastic/elasticsearch#15396 Original commit: elastic/x-pack-elasticsearch@c60c271738
This commit is contained in:
parent
6cf8f261e1
commit
267b86c57f
|
@ -129,6 +129,10 @@ import org.elasticsearch.action.admin.indices.flush.FlushAction;
|
|||
import org.elasticsearch.action.admin.indices.flush.FlushRequest;
|
||||
import org.elasticsearch.action.admin.indices.flush.FlushRequestBuilder;
|
||||
import org.elasticsearch.action.admin.indices.flush.FlushResponse;
|
||||
import org.elasticsearch.action.admin.indices.flush.SyncedFlushAction;
|
||||
import org.elasticsearch.action.admin.indices.flush.SyncedFlushRequest;
|
||||
import org.elasticsearch.action.admin.indices.flush.SyncedFlushRequestBuilder;
|
||||
import org.elasticsearch.action.admin.indices.flush.SyncedFlushResponse;
|
||||
import org.elasticsearch.action.admin.indices.forcemerge.ForceMergeAction;
|
||||
import org.elasticsearch.action.admin.indices.forcemerge.ForceMergeRequest;
|
||||
import org.elasticsearch.action.admin.indices.forcemerge.ForceMergeRequestBuilder;
|
||||
|
@ -260,6 +264,7 @@ import org.elasticsearch.common.Nullable;
|
|||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.inject.Inject;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.indices.flush.SyncedFlushService;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
|
||||
/**
|
||||
|
@ -791,6 +796,21 @@ public class SecuredClient implements Client {
|
|||
return (new FlushRequestBuilder(this, FlushAction.INSTANCE)).setIndices(indices);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionFuture<SyncedFlushResponse> syncedFlush(SyncedFlushRequest syncedFlushRequest) {
|
||||
return this.execute(SyncedFlushAction.INSTANCE, syncedFlushRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncedFlush(SyncedFlushRequest syncedFlushRequest, ActionListener<SyncedFlushResponse> actionListener) {
|
||||
this.execute(SyncedFlushAction.INSTANCE, syncedFlushRequest, actionListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SyncedFlushRequestBuilder prepareSyncedFlush(String... indices) {
|
||||
return (new SyncedFlushRequestBuilder(this, SyncedFlushAction.INSTANCE)).setIndices(indices);
|
||||
}
|
||||
|
||||
public void getMappings(GetMappingsRequest request, ActionListener<GetMappingsResponse> listener) {
|
||||
this.execute(GetMappingsAction.INSTANCE, request, listener);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue