Package org.jruby.util
Class JarCache
java.lang.Object
org.jruby.util.JarCache
Instances of JarCache provides jar index information.
Implementation is threadsafe. Since loading index information is O(jar-entries) we cache the snapshot in a WeakHashMap. The implementation pays attention to lastModified timestamp of the jar and will invalidate the cache entry if jar has been updated since the snapshot calculation.
****************************************************************************************** DANGER DANGER DANGER DANGER DANGER DANGER DANGER DANGER DANGER DANGER DANGER DANGER DANGER ****************************************************************************************** The spec for this cache is disabled currently for #2655, because of last-modified time oddities on CloudBees. Please be cautious modifying this code and make sure you run the associated spec locally.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String,JarCache.SoftJarIndex> private final ReferenceQueue<JarCache.JarIndex>private static final longThe timeout in milliseconds for caching the last modified timestamp of JAR files. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LAST_MODIFIED_EXPIRATION_TIME_MILLISECONDS
private static final long LAST_MODIFIED_EXPIRATION_TIME_MILLISECONDSThe timeout in milliseconds for caching the last modified timestamp of JAR files.- See Also:
-
indexCache
-
indexQueue
-
-
Constructor Details
-
JarCache
JarCache()
-
-
Method Details
-
getIndex
-
remove
-
cleanup
private void cleanup()
-