All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.inverno.mod.boot.BootConfiguration Maven / Gradle / Ivy

There is a newer version: 1.11.0
Show newest version
 /*
 * Copyright 2021 Jeremy KUHN
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.inverno.mod.boot;

import io.inverno.mod.base.concurrent.Reactor;
import io.inverno.mod.base.net.NetService;
import io.inverno.mod.configuration.Configuration;
import io.vertx.core.Vertx;

/**
 * 

* Boot module configuration. *

* * @author Jeremy Kuhn * @since 1.0 */ @Configuration( name = "configuration" ) public interface BootConfiguration { /** *

* Net client global configuration. *

* * @return the Net client global configuration */ BootNetClientConfiguration net_client(); /** *

* Net server global configuration. *

* * @return the Net server global configuration */ BootNetServerConfiguration net_server(); /** *

* Enables/Disables native transport when available. *

* *

* Note that this settings impact both {@link Reactor} and {@link NetService} * implementations. *

* *

* Defaults to true. *

* * @return true if the option is enabled, false otherwise */ default boolean prefer_native_transport() { return true; } /** *

* Enables/Disables Vert.x reactor when available. *

* *

* If sets to true and Vert.x core is on the module path, the reactor is backed * by a {@link Vertx} instance. *

* *

* Defaults to false. *

* * @return true if the option is enabled, false otherwise */ default boolean reactor_prefer_vertx() { return false; } /** *

* The number of threads to allocate to the reactor event loop group. *

* *

* Defaults to twice the number of processors available to the JVM. *

* * @return the number of threads to allocate */ default int reactor_event_loop_group_size() { return Runtime.getRuntime().availableProcessors() * 2; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy