Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6894440

Improve robustness of MemoryCache

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 6
    • deploy
    • None
    • generic
    • generic

      MemoryCache needs to be improved in the following way:

      1) We should have special methods for CacheEntry/CachedJarFile/JarFile
          and keep reference counters for them separately

      2) Addition of references must happen in the constructors in the these objects.
         The only exception is JarFile where we can not change the constructor but may be it can be wrapped by helper function.
         All other cases should not be visible outside the cache package.

      3) If memory cache entry is not found then we should use fallback and load it from the disk.
         It should not happen in the normal circumstances, but if there will be any new problem introduced we better keep working (slower but working) instead of failing.

      4) Memory cache can only keep one version of versioned resource but it could be shared between different applets in the same VM
         and these applets may (in theory) use different versions of versioned resource.

      5) With the recent fix to MemoryCache, entries are evicted as soon as last reference get cleared. This cause some jars needs to be read twice for each launch (once from signing certificate verification and then from actual main application class loading). We need some to improve this for built-in eviction delay (customizable).

        There are no Sub-Tasks for this issue.

            vdrozdov Victor Drozdov (Inactive)
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: