Class LinuxParametersProps.Builder
java.lang.Object
software.amazon.awscdk.services.batch.LinuxParametersProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LinuxParametersProps>
- Enclosing interface:
LinuxParametersProps
@Stability(Stable)
public static final class LinuxParametersProps.Builder
extends Object
implements software.amazon.jsii.Builder<LinuxParametersProps>
A builder for
LinuxParametersProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.initProcessEnabled(Boolean initProcessEnabled) Sets the value ofLinuxParametersProps.getInitProcessEnabled()Sets the value ofLinuxParametersProps.getMaxSwap()sharedMemorySize(Size sharedMemorySize) Sets the value ofLinuxParametersProps.getSharedMemorySize()swappiness(Number swappiness) Sets the value ofLinuxParametersProps.getSwappiness()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
initProcessEnabled
@Stability(Stable) public LinuxParametersProps.Builder initProcessEnabled(Boolean initProcessEnabled) Sets the value ofLinuxParametersProps.getInitProcessEnabled()- Parameters:
initProcessEnabled- Specifies whether to run an init process inside the container that forwards signals and reaps processes.- Returns:
this
-
maxSwap
Sets the value ofLinuxParametersProps.getMaxSwap()- Parameters:
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.
- Returns:
this
-
swappiness
Sets the value ofLinuxParametersProps.getSwappiness()- Parameters:
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.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LinuxParametersProps>- Returns:
- a new instance of
LinuxParametersProps - Throws:
NullPointerException- if any required attribute was not provided
-