org.elasticsearch.client.transport.support
Class InternalTransportIndicesAdminClient

java.lang.Object
  extended by org.elasticsearch.client.support.AbstractIndicesAdminClient
      extended by org.elasticsearch.client.transport.support.InternalTransportIndicesAdminClient
All Implemented Interfaces:
IndicesAdminClient, InternalIndicesAdminClient

public class InternalTransportIndicesAdminClient
extends AbstractIndicesAdminClient
implements IndicesAdminClient


Constructor Summary
InternalTransportIndicesAdminClient(Settings settings, TransportClientNodesService nodesService, ThreadPool threadPool, ClientTransportIndicesExistsAction indicesExistsAction, ClientTransportIndicesStatusAction indicesStatusAction, ClientTransportIndicesStatsAction indicesStatsAction, ClientTransportIndicesSegmentsAction indicesSegmentsAction, ClientTransportCreateIndexAction createIndexAction, ClientTransportDeleteIndexAction deleteIndexAction, ClientTransportCloseIndexAction closeIndexAction, ClientTransportOpenIndexAction openIndexAction, ClientTransportRefreshAction refreshAction, ClientTransportFlushAction flushAction, ClientTransportOptimizeAction optimizeAction, ClientTransportPutMappingAction putMappingAction, ClientTransportDeleteMappingAction deleteMappingAction, ClientTransportGatewaySnapshotAction gatewaySnapshotAction, ClientTransportIndicesAliasesAction indicesAliasesAction, ClientTransportClearIndicesCacheAction clearIndicesCacheAction, ClientTransportUpdateSettingsAction updateSettingsAction, ClientTransportAnalyzeAction analyzeAction, ClientTransportPutIndexTemplateAction putIndexTemplateAction, ClientTransportDeleteIndexTemplateAction deleteIndexTemplateAction)
           
 
Method Summary
 ActionFuture<IndicesAliasesResponse> aliases(IndicesAliasesRequest request)
          Allows to add/remove aliases from indices.
 void aliases(IndicesAliasesRequest request, ActionListener<IndicesAliasesResponse> listener)
          Allows to add/remove aliases from indices.
 ActionFuture<AnalyzeResponse> analyze(AnalyzeRequest request)
          Analyze text under the provided index.
 void analyze(AnalyzeRequest request, ActionListener<AnalyzeResponse> listener)
          Analyze text under the provided index.
 ActionFuture<ClearIndicesCacheResponse> clearCache(ClearIndicesCacheRequest request)
          Clear indices cache.
 void clearCache(ClearIndicesCacheRequest request, ActionListener<ClearIndicesCacheResponse> listener)
          Clear indices cache.
 ActionFuture<CloseIndexResponse> close(CloseIndexRequest request)
          Closes an index based on the index name.
 void close(CloseIndexRequest request, ActionListener<CloseIndexResponse> listener)
          Closes an index based on the index name.
 ActionFuture<CreateIndexResponse> create(CreateIndexRequest request)
          Creates an index using an explicit request allowing to specify the settings of the index.
 void create(CreateIndexRequest request, ActionListener<CreateIndexResponse> listener)
          Creates an index using an explicit request allowing to specify the settings of the index.
 ActionFuture<DeleteIndexResponse> delete(DeleteIndexRequest request)
          Deletes an index based on the index name.
 void delete(DeleteIndexRequest request, ActionListener<DeleteIndexResponse> listener)
          Deletes an index based on the index name.
 ActionFuture<DeleteMappingResponse> deleteMapping(DeleteMappingRequest request)
          Deletes mapping (and all its data) from one or more indices.
 void deleteMapping(DeleteMappingRequest request, ActionListener<DeleteMappingResponse> listener)
          Deletes mapping definition for a type into one or more indices.
 ActionFuture<DeleteIndexTemplateResponse> deleteTemplate(DeleteIndexTemplateRequest request)
          Deletes index template.
 void deleteTemplate(DeleteIndexTemplateRequest request, ActionListener<DeleteIndexTemplateResponse> listener)
          Deletes an index template.
 ActionFuture<IndicesExistsResponse> exists(IndicesExistsRequest request)
          Indices Exists.
 void exists(IndicesExistsRequest request, ActionListener<IndicesExistsResponse> listener)
          The status of one or more indices.
 ActionFuture<FlushResponse> flush(FlushRequest request)
          Explicitly flush one or more indices (releasing memory from the node).
 void flush(FlushRequest request, ActionListener<FlushResponse> listener)
          Explicitly flush one or more indices (releasing memory from the node).
 ActionFuture<GatewaySnapshotResponse> gatewaySnapshot(GatewaySnapshotRequest request)
          Explicitly perform gateway snapshot for one or more indices.
 void gatewaySnapshot(GatewaySnapshotRequest request, ActionListener<GatewaySnapshotResponse> listener)
          Explicitly perform gateway snapshot for one or more indices.
 ActionFuture<OpenIndexResponse> open(OpenIndexRequest request)
          OPen an index based on the index name.
 void open(OpenIndexRequest request, ActionListener<OpenIndexResponse> listener)
          Open an index based on the index name.
 ActionFuture<OptimizeResponse> optimize(OptimizeRequest request)
          Explicitly optimize one or more indices into a the number of segments.
 void optimize(OptimizeRequest request, ActionListener<OptimizeResponse> listener)
          Explicitly optimize one or more indices into a the number of segments.
 ActionFuture<PutMappingResponse> putMapping(PutMappingRequest request)
          Add mapping definition for a type into one or more indices.
 void putMapping(PutMappingRequest request, ActionListener<PutMappingResponse> listener)
          Add mapping definition for a type into one or more indices.
 ActionFuture<PutIndexTemplateResponse> putTemplate(PutIndexTemplateRequest request)
          Puts an index template.
 void putTemplate(PutIndexTemplateRequest request, ActionListener<PutIndexTemplateResponse> listener)
          Puts an index template.
 ActionFuture<RefreshResponse> refresh(RefreshRequest request)
          Explicitly refresh one or more indices (making the content indexed since the last refresh searchable).
 void refresh(RefreshRequest request, ActionListener<RefreshResponse> listener)
          Explicitly refresh one or more indices (making the content indexed since the last refresh searchable).
 ActionFuture<IndicesSegmentResponse> segments(IndicesSegmentsRequest request)
          The segments of one or more indices.
 void segments(IndicesSegmentsRequest request, ActionListener<IndicesSegmentResponse> listener)
          The segments of one or more indices.
 ActionFuture<IndicesStats> stats(IndicesStatsRequest request)
          Indices stats.
 void stats(IndicesStatsRequest request, ActionListener<IndicesStats> listener)
          Indices stats.
 ActionFuture<IndicesStatusResponse> status(IndicesStatusRequest request)
          The status of one or more indices.
 void status(IndicesStatusRequest request, ActionListener<IndicesStatusResponse> listener)
          The status of one or more indices.
 ThreadPool threadPool()
           
 ActionFuture<UpdateSettingsResponse> updateSettings(UpdateSettingsRequest request)
          Updates settings of one or more indices.
 void updateSettings(UpdateSettingsRequest request, ActionListener<UpdateSettingsResponse> listener)
          Updates settings of one or more indices.
 
Methods inherited from class org.elasticsearch.client.support.AbstractIndicesAdminClient
prepareAliases, prepareAnalyze, prepareClearCache, prepareClose, prepareCreate, prepareDelete, prepareDeleteMapping, prepareDeleteTemplate, prepareExists, prepareFlush, prepareGatewaySnapshot, prepareOpen, prepareOptimize, preparePutMapping, preparePutTemplate, prepareRefresh, prepareSegments, prepareStats, prepareStatus, prepareUpdateSettings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.elasticsearch.client.IndicesAdminClient
prepareAliases, prepareAnalyze, prepareClearCache, prepareClose, prepareCreate, prepareDelete, prepareDeleteMapping, prepareDeleteTemplate, prepareExists, prepareFlush, prepareGatewaySnapshot, prepareOpen, prepareOptimize, preparePutMapping, preparePutTemplate, prepareRefresh, prepareSegments, prepareStats, prepareStatus, prepareUpdateSettings
 

Constructor Detail

InternalTransportIndicesAdminClient

@Inject
public InternalTransportIndicesAdminClient(Settings settings,
                                                  TransportClientNodesService nodesService,
                                                  ThreadPool threadPool,
                                                  ClientTransportIndicesExistsAction indicesExistsAction,
                                                  ClientTransportIndicesStatusAction indicesStatusAction,
                                                  ClientTransportIndicesStatsAction indicesStatsAction,
                                                  ClientTransportIndicesSegmentsAction indicesSegmentsAction,
                                                  ClientTransportCreateIndexAction createIndexAction,
                                                  ClientTransportDeleteIndexAction deleteIndexAction,
                                                  ClientTransportCloseIndexAction closeIndexAction,
                                                  ClientTransportOpenIndexAction openIndexAction,
                                                  ClientTransportRefreshAction refreshAction,
                                                  ClientTransportFlushAction flushAction,
                                                  ClientTransportOptimizeAction optimizeAction,
                                                  ClientTransportPutMappingAction putMappingAction,
                                                  ClientTransportDeleteMappingAction deleteMappingAction,
                                                  ClientTransportGatewaySnapshotAction gatewaySnapshotAction,
                                                  ClientTransportIndicesAliasesAction indicesAliasesAction,
                                                  ClientTransportClearIndicesCacheAction clearIndicesCacheAction,
                                                  ClientTransportUpdateSettingsAction updateSettingsAction,
                                                  ClientTransportAnalyzeAction analyzeAction,
                                                  ClientTransportPutIndexTemplateAction putIndexTemplateAction,
                                                  ClientTransportDeleteIndexTemplateAction deleteIndexTemplateAction)
Method Detail

threadPool

public ThreadPool threadPool()
Specified by:
threadPool in interface InternalIndicesAdminClient

exists

public ActionFuture<IndicesExistsResponse> exists(IndicesExistsRequest request)
Description copied from interface: IndicesAdminClient
Indices Exists.

Specified by:
exists in interface IndicesAdminClient
Parameters:
request - The indices exists request
Returns:
The result future
See Also:
Requests.indicesExistsRequest(String...)

exists

public void exists(IndicesExistsRequest request,
                   ActionListener<IndicesExistsResponse> listener)
Description copied from interface: IndicesAdminClient
The status of one or more indices.

Specified by:
exists in interface IndicesAdminClient
Parameters:
request - The indices status request
listener - A listener to be notified with a result
See Also:
Requests.indicesExistsRequest(String...)

stats

public ActionFuture<IndicesStats> stats(IndicesStatsRequest request)
Description copied from interface: IndicesAdminClient
Indices stats.

Specified by:
stats in interface IndicesAdminClient

stats

public void stats(IndicesStatsRequest request,
                  ActionListener<IndicesStats> listener)
Description copied from interface: IndicesAdminClient
Indices stats.

Specified by:
stats in interface IndicesAdminClient

status

public ActionFuture<IndicesStatusResponse> status(IndicesStatusRequest request)
Description copied from interface: IndicesAdminClient
The status of one or more indices.

Specified by:
status in interface IndicesAdminClient
Parameters:
request - The indices status request
Returns:
The result future
See Also:
Requests.indicesStatusRequest(String...)

status

public void status(IndicesStatusRequest request,
                   ActionListener<IndicesStatusResponse> listener)
Description copied from interface: IndicesAdminClient
The status of one or more indices.

Specified by:
status in interface IndicesAdminClient
Parameters:
request - The indices status request
listener - A listener to be notified with a result
See Also:
Requests.indicesStatusRequest(String...)

segments

public ActionFuture<IndicesSegmentResponse> segments(IndicesSegmentsRequest request)
Description copied from interface: IndicesAdminClient
The segments of one or more indices.

Specified by:
segments in interface IndicesAdminClient
Parameters:
request - The indices segments request
Returns:
The result future
See Also:
Requests.indicesSegmentsRequest(String...)

segments

public void segments(IndicesSegmentsRequest request,
                     ActionListener<IndicesSegmentResponse> listener)
Description copied from interface: IndicesAdminClient
The segments of one or more indices.

Specified by:
segments in interface IndicesAdminClient
Parameters:
request - The indices segments request
listener - A listener to be notified with a result
See Also:
Requests.indicesSegmentsRequest(String...)

create

public ActionFuture<CreateIndexResponse> create(CreateIndexRequest request)
Description copied from interface: IndicesAdminClient
Creates an index using an explicit request allowing to specify the settings of the index.

Specified by:
create in interface IndicesAdminClient
Parameters:
request - The create index request
Returns:
The result future
See Also:
Requests.createIndexRequest(String)

create

public void create(CreateIndexRequest request,
                   ActionListener<CreateIndexResponse> listener)
Description copied from interface: IndicesAdminClient
Creates an index using an explicit request allowing to specify the settings of the index.

Specified by:
create in interface IndicesAdminClient
Parameters:
request - The create index request
listener - A listener to be notified with a result
See Also:
Requests.createIndexRequest(String)

delete

public ActionFuture<DeleteIndexResponse> delete(DeleteIndexRequest request)
Description copied from interface: IndicesAdminClient
Deletes an index based on the index name.

Specified by:
delete in interface IndicesAdminClient
Parameters:
request - The delete index request
Returns:
The result future
See Also:
Requests.deleteIndexRequest(String)

delete

public void delete(DeleteIndexRequest request,
                   ActionListener<DeleteIndexResponse> listener)
Description copied from interface: IndicesAdminClient
Deletes an index based on the index name.

Specified by:
delete in interface IndicesAdminClient
Parameters:
request - The delete index request
listener - A listener to be notified with a result
See Also:
Requests.deleteIndexRequest(String)

close

public ActionFuture<CloseIndexResponse> close(CloseIndexRequest request)
Description copied from interface: IndicesAdminClient
Closes an index based on the index name.

Specified by:
close in interface IndicesAdminClient
Parameters:
request - The close index request
Returns:
The result future
See Also:
Requests.closeIndexRequest(String)

close

public void close(CloseIndexRequest request,
                  ActionListener<CloseIndexResponse> listener)
Description copied from interface: IndicesAdminClient
Closes an index based on the index name.

Specified by:
close in interface IndicesAdminClient
Parameters:
request - The close index request
listener - A listener to be notified with a result
See Also:
Requests.closeIndexRequest(String)

open

public ActionFuture<OpenIndexResponse> open(OpenIndexRequest request)
Description copied from interface: IndicesAdminClient
OPen an index based on the index name.

Specified by:
open in interface IndicesAdminClient
Parameters:
request - The close index request
Returns:
The result future
See Also:
Requests.openIndexRequest(String)

open

public void open(OpenIndexRequest request,
                 ActionListener<OpenIndexResponse> listener)
Description copied from interface: IndicesAdminClient
Open an index based on the index name.

Specified by:
open in interface IndicesAdminClient
Parameters:
request - The close index request
listener - A listener to be notified with a result
See Also:
Requests.openIndexRequest(String)

refresh

public ActionFuture<RefreshResponse> refresh(RefreshRequest request)
Description copied from interface: IndicesAdminClient
Explicitly refresh one or more indices (making the content indexed since the last refresh searchable).

Specified by:
refresh in interface IndicesAdminClient
Parameters:
request - The refresh request
Returns:
The result future
See Also:
Requests.refreshRequest(String...)

refresh

public void refresh(RefreshRequest request,
                    ActionListener<RefreshResponse> listener)
Description copied from interface: IndicesAdminClient
Explicitly refresh one or more indices (making the content indexed since the last refresh searchable).

Specified by:
refresh in interface IndicesAdminClient
Parameters:
request - The refresh request
listener - A listener to be notified with a result
See Also:
Requests.refreshRequest(String...)

flush

public ActionFuture<FlushResponse> flush(FlushRequest request)
Description copied from interface: IndicesAdminClient
Explicitly flush one or more indices (releasing memory from the node).

Specified by:
flush in interface IndicesAdminClient
Parameters:
request - The flush request
Returns:
A result future
See Also:
Requests.flushRequest(String...)

flush

public void flush(FlushRequest request,
                  ActionListener<FlushResponse> listener)
Description copied from interface: IndicesAdminClient
Explicitly flush one or more indices (releasing memory from the node).

Specified by:
flush in interface IndicesAdminClient
Parameters:
request - The flush request
listener - A listener to be notified with a result
See Also:
Requests.flushRequest(String...)

optimize

public ActionFuture<OptimizeResponse> optimize(OptimizeRequest request)
Description copied from interface: IndicesAdminClient
Explicitly optimize one or more indices into a the number of segments.

Specified by:
optimize in interface IndicesAdminClient
Parameters:
request - The optimize request
Returns:
A result future
See Also:
Requests.optimizeRequest(String...)

optimize

public void optimize(OptimizeRequest request,
                     ActionListener<OptimizeResponse> listener)
Description copied from interface: IndicesAdminClient
Explicitly optimize one or more indices into a the number of segments.

Specified by:
optimize in interface IndicesAdminClient
Parameters:
request - The optimize request
listener - A listener to be notified with a result
See Also:
Requests.optimizeRequest(String...)

putMapping

public ActionFuture<PutMappingResponse> putMapping(PutMappingRequest request)
Description copied from interface: IndicesAdminClient
Add mapping definition for a type into one or more indices.

Specified by:
putMapping in interface IndicesAdminClient
Parameters:
request - The create mapping request
Returns:
A result future
See Also:
Requests.putMappingRequest(String...)

putMapping

public void putMapping(PutMappingRequest request,
                       ActionListener<PutMappingResponse> listener)
Description copied from interface: IndicesAdminClient
Add mapping definition for a type into one or more indices.

Specified by:
putMapping in interface IndicesAdminClient
Parameters:
request - The create mapping request
listener - A listener to be notified with a result
See Also:
Requests.putMappingRequest(String...)

deleteMapping

public ActionFuture<DeleteMappingResponse> deleteMapping(DeleteMappingRequest request)
Description copied from interface: IndicesAdminClient
Deletes mapping (and all its data) from one or more indices.

Specified by:
deleteMapping in interface IndicesAdminClient
Parameters:
request - The delete mapping request
Returns:
A result future
See Also:
Requests.deleteMappingRequest(String...)

deleteMapping

public void deleteMapping(DeleteMappingRequest request,
                          ActionListener<DeleteMappingResponse> listener)
Description copied from interface: IndicesAdminClient
Deletes mapping definition for a type into one or more indices.

Specified by:
deleteMapping in interface IndicesAdminClient
Parameters:
request - The delete mapping request
listener - A listener to be notified with a result
See Also:
Requests.deleteMappingRequest(String...)

gatewaySnapshot

public ActionFuture<GatewaySnapshotResponse> gatewaySnapshot(GatewaySnapshotRequest request)
Description copied from interface: IndicesAdminClient
Explicitly perform gateway snapshot for one or more indices.

Specified by:
gatewaySnapshot in interface IndicesAdminClient
Parameters:
request - The gateway snapshot request
Returns:
The result future
See Also:
Requests.gatewaySnapshotRequest(String...)

gatewaySnapshot

public void gatewaySnapshot(GatewaySnapshotRequest request,
                            ActionListener<GatewaySnapshotResponse> listener)
Description copied from interface: IndicesAdminClient
Explicitly perform gateway snapshot for one or more indices.

Specified by:
gatewaySnapshot in interface IndicesAdminClient
Parameters:
request - The gateway snapshot request
listener - A listener to be notified with a result
See Also:
Requests.gatewaySnapshotRequest(String...)

aliases

public ActionFuture<IndicesAliasesResponse> aliases(IndicesAliasesRequest request)
Description copied from interface: IndicesAdminClient
Allows to add/remove aliases from indices.

Specified by:
aliases in interface IndicesAdminClient
Parameters:
request - The index aliases request
Returns:
The result future
See Also:
Requests.indexAliasesRequest()

aliases

public void aliases(IndicesAliasesRequest request,
                    ActionListener<IndicesAliasesResponse> listener)
Description copied from interface: IndicesAdminClient
Allows to add/remove aliases from indices.

Specified by:
aliases in interface IndicesAdminClient
Parameters:
request - The index aliases request
listener - A listener to be notified with a result
See Also:
Requests.indexAliasesRequest()

clearCache

public ActionFuture<ClearIndicesCacheResponse> clearCache(ClearIndicesCacheRequest request)
Description copied from interface: IndicesAdminClient
Clear indices cache.

Specified by:
clearCache in interface IndicesAdminClient
Parameters:
request - The clear indices cache request
Returns:
The result future
See Also:
Requests.clearIndicesCacheRequest(String...)

clearCache

public void clearCache(ClearIndicesCacheRequest request,
                       ActionListener<ClearIndicesCacheResponse> listener)
Description copied from interface: IndicesAdminClient
Clear indices cache.

Specified by:
clearCache in interface IndicesAdminClient
Parameters:
request - The clear indices cache request
listener - A listener to be notified with a result
See Also:
Requests.clearIndicesCacheRequest(String...)

updateSettings

public ActionFuture<UpdateSettingsResponse> updateSettings(UpdateSettingsRequest request)
Description copied from interface: IndicesAdminClient
Updates settings of one or more indices.

Specified by:
updateSettings in interface IndicesAdminClient
Parameters:
request - the update settings request
Returns:
The result future

updateSettings

public void updateSettings(UpdateSettingsRequest request,
                           ActionListener<UpdateSettingsResponse> listener)
Description copied from interface: IndicesAdminClient
Updates settings of one or more indices.

Specified by:
updateSettings in interface IndicesAdminClient
Parameters:
request - the update settings request
listener - A listener to be notified with the response

analyze

public ActionFuture<AnalyzeResponse> analyze(AnalyzeRequest request)
Description copied from interface: IndicesAdminClient
Analyze text under the provided index.

Specified by:
analyze in interface IndicesAdminClient

analyze

public void analyze(AnalyzeRequest request,
                    ActionListener<AnalyzeResponse> listener)
Description copied from interface: IndicesAdminClient
Analyze text under the provided index.

Specified by:
analyze in interface IndicesAdminClient

putTemplate

public ActionFuture<PutIndexTemplateResponse> putTemplate(PutIndexTemplateRequest request)
Description copied from interface: IndicesAdminClient
Puts an index template.

Specified by:
putTemplate in interface IndicesAdminClient

putTemplate

public void putTemplate(PutIndexTemplateRequest request,
                        ActionListener<PutIndexTemplateResponse> listener)
Description copied from interface: IndicesAdminClient
Puts an index template.

Specified by:
putTemplate in interface IndicesAdminClient

deleteTemplate

public ActionFuture<DeleteIndexTemplateResponse> deleteTemplate(DeleteIndexTemplateRequest request)
Description copied from interface: IndicesAdminClient
Deletes index template.

Specified by:
deleteTemplate in interface IndicesAdminClient

deleteTemplate

public void deleteTemplate(DeleteIndexTemplateRequest request,
                           ActionListener<DeleteIndexTemplateResponse> listener)
Description copied from interface: IndicesAdminClient
Deletes an index template.

Specified by:
deleteTemplate in interface IndicesAdminClient