Class LinuxParameters.Builder
java.lang.Object
software.amazon.awscdk.services.batch.LinuxParameters.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LinuxParameters>
- Enclosing class:
LinuxParameters
@Stability(Stable)
public static final class LinuxParameters.Builder
extends Object
implements software.amazon.jsii.Builder<LinuxParameters>
A fluent builder for
LinuxParameters.-
Method Summary
Modifier and TypeMethodDescriptionbuild()static LinuxParameters.BuilderinitProcessEnabled(Boolean initProcessEnabled) Specifies whether to run an init process inside the container that forwards signals and reaps processes.The total amount of swap memory a container can use.sharedMemorySize(Size sharedMemorySize) The value for the size of the /dev/shm volume.swappiness(Number swappiness) This allows you to tune a container's memory swappiness behavior.
-
Method Details
-
create
@Stability(Stable) public static LinuxParameters.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- This parameter is required.id- This parameter is required.- Returns:
- a new instance of
LinuxParameters.Builder.
-
initProcessEnabled
Specifies whether to run an init process inside the container that forwards signals and reaps processes.Default: false
- Parameters:
initProcessEnabled- Specifies whether to run an init process inside the container that forwards signals and reaps processes. This parameter is required.- Returns:
this
-
maxSwap
The total amount of swap memory a container can use.This parameter will be translated to the --memory-swap option to docker run.
This parameter is only supported when you are using the EC2 launch type. Accepted values are positive integers.
Default: No swap.
- Parameters:
maxSwap- The total amount of swap memory a container can use. This parameter is required.- Returns:
this
-
swappiness
This allows you to tune a container's memory swappiness behavior.This parameter maps to the --memory-swappiness option to docker run. The swappiness relates to the kernel's tendency to swap memory. A value of 0 will cause swapping to not happen unless absolutely necessary. A value of 100 will cause pages to be swapped very aggressively.
This parameter is only supported when you are using the EC2 launch type. Accepted values are whole numbers between 0 and 100. If a value is not specified for maxSwap then this parameter is ignored.
Default: 60
- Parameters:
swappiness- This allows you to tune a container's memory swappiness behavior. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LinuxParameters>- Returns:
- a newly built instance of
LinuxParameters.
-