List of usage examples for io.vertx.core VertxOptions setPreferNativeTransport
public VertxOptions setPreferNativeTransport(boolean preferNativeTransport)
From source file:io.gravitee.am.gateway.handler.vertx.RxVertxTestBase.java
License:Apache License
protected VertxOptions getOptions() { VertxOptions options = new VertxOptions(); options.setPreferNativeTransport(USE_NATIVE_TRANSPORT); return options; }
From source file:io.reactiverse.pgclient.PgClient.java
License:Apache License
/** * Create a connection pool to the database configured with the given {@code options}. * * @param options the options for creating the pool * @return the connection pool/* w w w.j ava 2 s . c o m*/ */ static PgPool pool(PgPoolOptions options) { if (Vertx.currentContext() != null) { throw new IllegalStateException( "Running in a Vertx context => use PgPool#pool(Vertx, PgPoolOptions) instead"); } VertxOptions vertxOptions = new VertxOptions(); if (options.isUsingDomainSocket()) { vertxOptions.setPreferNativeTransport(true); } Vertx vertx = Vertx.vertx(vertxOptions); return new PgPoolImpl(vertx, true, options); }