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

io.stepfunc.dnp3.RuntimeConfig Maven / Gradle / Ivy

There is a newer version: 1.6.0
Show newest version
// This library is provided under the terms of a non-commercial license.
// 
// Please refer to the source repository for details:
// 
// https://github.com/stepfunc/dnp3/blob/master/LICENSE.txt
// 
// Please contact Step Function I/O if you are interested in commercial license:
// 
// [email protected]
package io.stepfunc.dnp3;

import org.joou.*;

/**
 * Runtime configuration
 */
public final class RuntimeConfig
{
    /**
     * Number of runtime threads to spawn. For a guess of the number of CPU cores, use 0.
     * 
     * 

Even if tons of connections are expected, it is preferred to use a value around the number of CPU cores for better performances. The library uses an efficient thread pool polling mechanism.

*/ public UShort numCoreThreads; /** * @param value New value for the 'numCoreThreads' field * @return Reference to this instance of the class with the modified value */ public RuntimeConfig withNumCoreThreads(UShort value) { this.numCoreThreads = value; return this; } /** * Initialize the configuration to default values * *

Values are initialized to: *

    *
  • {@link RuntimeConfig#numCoreThreads} : 0
  • *
* */ public RuntimeConfig() { this.numCoreThreads = UShort.valueOf(0); } private RuntimeConfig(UShort numCoreThreads) { this.numCoreThreads = numCoreThreads; } void _assertFieldsNotNull() { java.util.Objects.requireNonNull(numCoreThreads, "numCoreThreads cannot be null"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy