Class 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 Detail

      • REGISTER_RECORD_STATS_IMPLEMENTATIONS

        public static final String REGISTER_RECORD_STATS_IMPLEMENTATIONS
        See Also:
        Constant Field Values
    • Constructor Detail

      • CacheConstructorsFeature

        public CacheConstructorsFeature()
    • Method Detail

      • 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()