Interface IOwnerBasedAlgorithmConfig

  • All Superinterfaces:
    org.aeonbits.owner.Accessible, org.aeonbits.owner.Config, org.api4.java.algorithm.IAlgorithmConfig, org.api4.java.common.control.IConfig, IOwnerBasedConfig, java.util.Map<java.lang.Object,​java.lang.Object>, org.aeonbits.owner.Mutable, org.aeonbits.owner.Reloadable, java.io.Serializable
    All Known Subinterfaces:
    IOwnerBasedRandomizedAlgorithmConfig

    public interface IOwnerBasedAlgorithmConfig
    extends IOwnerBasedConfig, org.api4.java.algorithm.IAlgorithmConfig, org.aeonbits.owner.Reloadable
    Configuration interface to defined the access properties for a database connection
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.aeonbits.owner.Config

        org.aeonbits.owner.Config.ConverterClass, org.aeonbits.owner.Config.DecryptorClass, org.aeonbits.owner.Config.DefaultValue, org.aeonbits.owner.Config.DisableableFeature, org.aeonbits.owner.Config.DisableFeature, org.aeonbits.owner.Config.EncryptedValue, org.aeonbits.owner.Config.HotReload, org.aeonbits.owner.Config.HotReloadType, org.aeonbits.owner.Config.Key, org.aeonbits.owner.Config.LoadPolicy, org.aeonbits.owner.Config.LoadType, org.aeonbits.owner.Config.PreprocessorClasses, org.aeonbits.owner.Config.Separator, org.aeonbits.owner.Config.Sources, org.aeonbits.owner.Config.TokenizerClass
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String K_CPUS  
      static java.lang.String K_MEMORY  
      static java.lang.String K_THREADS  
      static java.lang.String K_TIMEOUT  
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      int cpus()  
      default org.api4.java.algorithm.Timeout getTimeout()
      This is just a shortcut to avoid confusions about the semantics of the defined timeout, which is always defined in milliseconds.
      int memory()  
      int threads()  
      long timeout()  
      • Methods inherited from interface org.aeonbits.owner.Accessible

        fill, getProperty, getProperty, list, list, propertyNames, store, storeToXML
      • Methods inherited from interface org.api4.java.common.control.IConfig

        setProperty
      • Methods inherited from interface java.util.Map

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
      • Methods inherited from interface org.aeonbits.owner.Mutable

        addPropertyChangeListener, addPropertyChangeListener, clear, load, load, removeProperty, removePropertyChangeListener, setProperty
      • Methods inherited from interface org.aeonbits.owner.Reloadable

        addReloadListener, reload, removeReloadListener
    • Method Detail

      • cpus

        @Key("cpus")
        @DefaultValue("1")
        int cpus()
        Specified by:
        cpus in interface org.api4.java.algorithm.IAlgorithmConfig
        Returns:
        Number of CPU cores available for parallelization.
      • threads

        @Key("threads")
        @DefaultValue("-1")
        int threads()
        Specified by:
        threads in interface org.api4.java.algorithm.IAlgorithmConfig
        Returns:
        Number of threads that may be spawned by the algorithm. If set to -1, the number of CPUs is used as the number of threads. If set to 0, parallelization is deactivated.
      • memory

        @Key("memory")
        @DefaultValue("256")
        int memory()
        Specified by:
        memory in interface org.api4.java.algorithm.IAlgorithmConfig
        Returns:
        The main memory that is available to be used. This is merely a documentation variable since the true memory must be set over the JVM initialization anyway and cannot be restricted inside of it.
      • timeout

        @Key("timeout")
        @DefaultValue("-1")
        long timeout()
        Specified by:
        timeout in interface org.api4.java.algorithm.IAlgorithmConfig
        Returns:
        Overall timeout for the algorithm in milliseconds.
      • getTimeout

        default org.api4.java.algorithm.Timeout getTimeout()
        This is just a shortcut to avoid confusions about the semantics of the defined timeout, which is always defined in milliseconds.
        Returns:
        The correct Timeout object for the specified timeout.