Class CacheConstructorsFeature

java.lang.Object
io.quarkus.caffeine.runtime.graal.CacheConstructorsFeature
All Implemented Interfaces:
org.graalvm.nativeimage.hosted.Feature

public class CacheConstructorsFeature extends Object implements org.graalvm.nativeimage.hosted.Feature
This Automatic Feature for GraalVM will register for reflection the most commonly used cache implementations from Caffeine. It's implemented as an explicit @Feature rather than using the Quarkus builditems because it doesn't need to be dynamically tuned (the list is static), and to take advantage of the reachability information we can infer from @Feature.DuringAnalysisAccess. This allows us to register for reflection these resources only if Caffeine is indeed being used: only if the cache builder is reachable in the application code.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.graalvm.nativeimage.hosted.Feature

    org.graalvm.nativeimage.hosted.Feature.AfterAnalysisAccess, org.graalvm.nativeimage.hosted.Feature.AfterCompilationAccess, org.graalvm.nativeimage.hosted.Feature.AfterHeapLayoutAccess, org.graalvm.nativeimage.hosted.Feature.AfterImageWriteAccess, org.graalvm.nativeimage.hosted.Feature.AfterRegistrationAccess, org.graalvm.nativeimage.hosted.Feature.BeforeAnalysisAccess, org.graalvm.nativeimage.hosted.Feature.BeforeCompilationAccess, org.graalvm.nativeimage.hosted.Feature.BeforeImageWriteAccess, org.graalvm.nativeimage.hosted.Feature.BeforeUniverseBuildingAccess, org.graalvm.nativeimage.hosted.Feature.CompilationAccess, org.graalvm.nativeimage.hosted.Feature.DuringAnalysisAccess, org.graalvm.nativeimage.hosted.Feature.DuringSetupAccess, org.graalvm.nativeimage.hosted.Feature.FeatureAccess, org.graalvm.nativeimage.hosted.Feature.IsInConfigurationAccess, org.graalvm.nativeimage.hosted.Feature.OnAnalysisExitAccess, org.graalvm.nativeimage.hosted.Feature.QueryReachabilityAccess
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    beforeAnalysis(org.graalvm.nativeimage.hosted.Feature.BeforeAnalysisAccess access)
     
    static String[]
    This list is not complete, but a selection of the types we expect being most useful.
    static String[]
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.graalvm.nativeimage.hosted.Feature

    afterAnalysis, afterCompilation, afterHeapLayout, afterImageWrite, afterRegistration, beforeCompilation, beforeImageWrite, beforeUniverseBuilding, cleanup, duringAnalysis, duringSetup, getDescription, getRequiredFeatures, getURL, isInConfiguration, onAnalysisExit
  • Field Details

    • REGISTER_RECORD_STATS_IMPLEMENTATIONS

      public static final String REGISTER_RECORD_STATS_IMPLEMENTATIONS
      See Also:
  • Constructor Details

    • CacheConstructorsFeature

      public CacheConstructorsFeature()
  • Method Details

    • beforeAnalysis

      public void beforeAnalysis(org.graalvm.nativeimage.hosted.Feature.BeforeAnalysisAccess access)
      Specified by:
      beforeAnalysis in interface org.graalvm.nativeimage.hosted.Feature
    • typesNeedingConstructorsRegistered

      public static String[] typesNeedingConstructorsRegistered()
      This list is not complete, but a selection of the types we expect being most useful. unfortunately registering all of them has been shown to have a very significant impact on executable sizes. See https://github.com/quarkusio/quarkus/issues/12961
    • typesNeedingConstructorsRegisteredWhenRecordingStats

      public static String[] typesNeedingConstructorsRegisteredWhenRecordingStats()