Package org.apache.solr.jersey
Class JerseyAppHandlerCache
java.lang.Object
org.apache.solr.jersey.JerseyAppHandlerCache
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.glassfish.jersey.server.ApplicationHandlercomputeIfAbsent(String effectiveSolrConfigId, Supplier<org.glassfish.jersey.server.ApplicationHandler> createApplicationHandler) Return the 'ApplicationHandler' associated with the provided ID, creating it first if necessary.intsize()
-
Constructor Details
-
JerseyAppHandlerCache
public JerseyAppHandlerCache()
-
-
Method Details
-
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.- Parameters:
effectiveSolrConfigId- an ID to associate the ApplicationHandler with. Usually created viaSolrConfig.effectiveId().createApplicationHandler- a Supplier producing an ApplicationHandler
-
size
public int size()
-