Class DefaultPreStartConfig
java.lang.Object
software.xdev.tci.factory.prestart.config.DefaultPreStartConfig
- All Implemented Interfaces:
PreStartConfig
Default implementation of
PreStartConfig using system properties.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected final intprotected final intprotected static final Stringprotected final booleanprotected static final Stringprotected final booleanprotected final booleanprotected static final Stringprotected static final Stringprotected final intprotected static final Stringprotected final intprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintAmount of CPU that needs to be idle to allow PreStarting of containers.intHow often PreStarting should be tried (one factory per schedule!)booleanShould PreStarting be stopped when tests are ending?booleandirectNetworkAttachIfPossible(String preStartName) Tries to directly attach the container to the network if possible.booleanenabled()protected booleanprotected booleangetBool(String property, BooleanSupplier defaultValueSupplier) protected intprotected intgetInt(String property, IntSupplier defaultValueSupplier) intHow many infrastructures sintmaxStartSimultan(String preStartName)
-
Field Details
-
PROPERTY_PREFIX
- See Also:
-
KEEP_READY
- See Also:
-
MAX_START_SIMULTAN
- See Also:
-
DIRECT_NETWORK_ATTACH_IF_POSSIBLE
- See Also:
-
JUNIT_JUPITER_EXECUTION_PARALLEL_CONFIG_FIXED_MAX_POOL_SIZE
- See Also:
-
COORDINATOR_IDLE_CPU_PERCENT
- See Also:
-
COORDINATOR_SCHEDULE_PERIOD_MS
- See Also:
-
DETECT_ENDING_TESTS
- See Also:
-
enabled
protected final boolean enabled -
keepReady
protected final int keepReady -
maxStartSimultan
protected final int maxStartSimultan -
directNetworkAttachIfPossible
protected final boolean directNetworkAttachIfPossible -
coordinatorIdleCPUPercent
protected final int coordinatorIdleCPUPercent -
coordinatorSchedulePeriodMs
protected final int coordinatorSchedulePeriodMs -
detectEndingTests
protected final boolean detectEndingTests
-
-
Constructor Details
-
DefaultPreStartConfig
public DefaultPreStartConfig()
-
-
Method Details
-
enabled
public boolean enabled()- Specified by:
enabledin interfacePreStartConfig
-
keepReady
Description copied from interface:PreStartConfigHow many infrastructures s- Specified by:
keepReadyin interfacePreStartConfig
-
maxStartSimultan
- Specified by:
maxStartSimultanin interfacePreStartConfig
-
directNetworkAttachIfPossible
Description copied from interface:PreStartConfigTries to directly attach the container to the network if possible.This speeds up overall time but (as no
docker network connectis needed) but it's a different behavior then PreStarting (if implemented incorrectly may cause "random" problems)DEBUG-Option - default value should be fine.
- Specified by:
directNetworkAttachIfPossiblein interfacePreStartConfig
-
coordinatorIdleCPUPercent
public int coordinatorIdleCPUPercent()Description copied from interface:PreStartConfigAmount of CPU that needs to be idle to allow PreStarting of containers.- Specified by:
coordinatorIdleCPUPercentin interfacePreStartConfig
-
coordinatorSchedulePeriodMs
public int coordinatorSchedulePeriodMs()Description copied from interface:PreStartConfigHow often PreStarting should be tried (one factory per schedule!)- Specified by:
coordinatorSchedulePeriodMsin interfacePreStartConfig
-
detectEndingTests
public boolean detectEndingTests()Description copied from interface:PreStartConfigShould PreStarting be stopped when tests are ending?DEBUG-Option - default value should be fine.
- Specified by:
detectEndingTestsin interfacePreStartConfig
-
getBool
-
getBool
-
getInt
-
getInt
-