Class JerseyAppHandlerCache

  • public class JerseyAppHandlerCache
    extends Object
    Stores Jersey 'ApplicationHandler' instances by an ID or hash derived from their ConfigSet.

    ApplicationHandler creation is expensive; caching these objects allows them to be shared by multiple cores with the same configuration.

    • Constructor Detail

      • JerseyAppHandlerCache

        public JerseyAppHandlerCache()
    • Method Detail

      • computeIfAbsent

        public org.glassfish.jersey.server.ApplicationHandler computeIfAbsent​(String effectiveSolrConfigId,
                                                                              Supplier<org.glassfish.jersey.server.ApplicationHandler> createApplicationHandler)
        Return the 'ApplicationHandler' associated with the provided ID, creating it first if necessary.

        This method is thread-safe by virtue of its delegation to Cache.get(Object, Function) internally.

        effectiveSolrConfigId - an ID to associate the ApplicationHandler with. Usually created via SolrConfig.effectiveId().
        createApplicationHandler - a Supplier producing an ApplicationHandler
      • size

        public int size()