Remove static import from HLRC doc snippet (#34834)

This commit is contained in:
王振荟 2018-10-25 23:22:50 +09:00 committed by Luca Cavanna
parent 2b652f3242
commit 24df2eba80
1 changed files with 3 additions and 2 deletions

View File

@ -36,7 +36,7 @@ import org.apache.http.nio.entity.NStringEntity;
import org.apache.http.ssl.SSLContextBuilder; import org.apache.http.ssl.SSLContextBuilder;
import org.apache.http.ssl.SSLContexts; import org.apache.http.ssl.SSLContexts;
import org.apache.http.util.EntityUtils; import org.apache.http.util.EntityUtils;
import org.elasticsearch.client.HttpAsyncResponseConsumerFactory.HeapBufferedResponseConsumerFactory; import org.elasticsearch.client.HttpAsyncResponseConsumerFactory;
import org.elasticsearch.client.Node; import org.elasticsearch.client.Node;
import org.elasticsearch.client.NodeSelector; import org.elasticsearch.client.NodeSelector;
import org.elasticsearch.client.Request; import org.elasticsearch.client.Request;
@ -84,7 +84,8 @@ public class RestClientDocumentation {
RequestOptions.Builder builder = RequestOptions.DEFAULT.toBuilder(); RequestOptions.Builder builder = RequestOptions.DEFAULT.toBuilder();
builder.addHeader("Authorization", "Bearer " + TOKEN); // <1> builder.addHeader("Authorization", "Bearer " + TOKEN); // <1>
builder.setHttpAsyncResponseConsumerFactory( // <2> builder.setHttpAsyncResponseConsumerFactory( // <2>
new HeapBufferedResponseConsumerFactory(30 * 1024 * 1024 * 1024)); new HttpAsyncResponseConsumerFactory
.HeapBufferedResponseConsumerFactory(30 * 1024 * 1024 * 1024));
COMMON_OPTIONS = builder.build(); COMMON_OPTIONS = builder.build();
} }
// end::rest-client-options-singleton // end::rest-client-options-singleton