Package ai.libs.jaicore.basic
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
-
-
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 ai.libs.jaicore.basic.IOwnerBasedConfig
copy, loadPropertiesFromFile, loadPropertiesFromFileArray, loadPropertiesFromList, loadPropertiesFromResource
-
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
-
-
-
-
Field Detail
-
K_CPUS
static final java.lang.String K_CPUS
- See Also:
- Constant Field Values
-
K_THREADS
static final java.lang.String K_THREADS
- See Also:
- Constant Field Values
-
K_MEMORY
static final java.lang.String K_MEMORY
- See Also:
- Constant Field Values
-
K_TIMEOUT
static final java.lang.String K_TIMEOUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
cpus
@Key("cpus") @DefaultValue("1") int cpus()
- Specified by:
cpus
in interfaceorg.api4.java.algorithm.IAlgorithmConfig
- Returns:
- Number of CPU cores available for parallelization.
-
threads
@Key("threads") @DefaultValue("-1") int threads()
- Specified by:
threads
in interfaceorg.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 interfaceorg.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 interfaceorg.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.
-
-