Class AwsLambdaSnapstart

java.lang.Object
io.micronaut.starter.feature.aws.AwsLambdaSnapstart
All Implemented Interfaces:
io.micronaut.core.naming.Described, io.micronaut.core.naming.Named, io.micronaut.core.order.Ordered, Feature

@Requires(property="micronaut.starter.feature.snapstart.enabled", value="true", defaultValue="true") @Singleton public class AwsLambdaSnapstart extends Object implements Feature
Feature for enabling AWS Lambda SnapStart functionality.

SnapStart improves cold start performance by initializing the Lambda function ahead of time on supported CPU architectures.

  • Constructor Details

    • AwsLambdaSnapstart

      public AwsLambdaSnapstart()
  • Method Details

    • getName

      @NonNull public @NonNull String getName()
      Description copied from interface: Feature
      The name of the feature. It must be unique.
      Specified by:
      getName in interface Feature
      Specified by:
      getName in interface io.micronaut.core.naming.Named
      Returns:
      the name of the feature
    • getTitle

      @NonNull public @NonNull String getTitle()
      Specified by:
      getTitle in interface Feature
      Returns:
      The title of the feature
    • isVisible

      public boolean isVisible()
      Description copied from interface: Feature
      Some features should not be visible to the user because they are a common parent of other selectable features, or they should always be applied, or any other reason.
      Specified by:
      isVisible in interface Feature
      Returns:
      True if the feature should be able to be selected by the user
    • getThirdPartyDocumentation

      public String getThirdPartyDocumentation(GeneratorContext generatorContext)
      Specified by:
      getThirdPartyDocumentation in interface Feature
      Parameters:
      generatorContext - Generator Context
      Returns:
      Returns a link to third party. E.g. https://hazelcast.org
    • supports

      public boolean supports(@NonNull @NonNull CpuArchitecture cpuArchitecture)
      Determines if the feature supports the given CPU architecture.
      Parameters:
      cpuArchitecture - The CPU architecture to check support for
      Returns:
      true if supported, false otherwise
    • supports

      public boolean supports(Options options)
      Description copied from interface: Feature
      This method must be implemented to ensure it is only selectable for the desired application types. This method is not used for determining if a default feature should be applied.
      Specified by:
      supports in interface Feature
      Parameters:
      options - Options
      Returns:
      True if the feature can be selected by the user