org.elasticsearch.action.ActionType Java Examples
The following examples show how to use
org.elasticsearch.action.ActionType.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClientUtil.java From anomaly-detection with Apache License 2.0 | 5 votes |
/** * Execute a transport action and handle response with the provided listener. * @param <Request> ActionRequest * @param <Response> ActionResponse * @param action transport action * @param request request body * @param listener needed to handle response */ public <Request extends ActionRequest, Response extends ActionResponse> void execute( ActionType<Response> action, Request request, ActionListener<Response> listener ) { client .execute( action, request, ActionListener.wrap(response -> { listener.onResponse(response); }, exception -> { listener.onFailure(exception); }) ); }
Example #2
Source File: FessEsClient.java From fess with Apache License 2.0 | 4 votes |
@Override public <Request extends ActionRequest, Response extends ActionResponse> ActionFuture<Response> execute( final ActionType<Response> action, final Request request) { return client.execute(action, request); }
Example #3
Source File: FessEsClient.java From fess with Apache License 2.0 | 4 votes |
@Override public <Request extends ActionRequest, Response extends ActionResponse> void execute(final ActionType<Response> action, final Request request, final ActionListener<Response> listener) { client.execute(action, request, listener); }