Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1586

New extension point: a strategy for retaining objects in the ObjectStore

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1M2
    • 3.1M3
    • Core Library
    • None

    Description

      Currently ObjectStore.objectMap uses WEAK references to objects, often causing premature garbage collection of cached objects and extra queries on relationship resolving, etc. In many cases using SOFT (or HARD) retain strategy may be desirable. So I suggest to make it a configurable via DI.

      To achieve that we can create a pluggable strategy class that is used whenever DataContext/ObjectStore are created. Should probably also deprecate the following ObjectStore constructors to reduce confusion:

      public ObjectStore() {
      this(null);
      }

      public ObjectStore(DataRowStore dataRowCache) {
      this(dataRowCache, null);
      }

      Attachments

        Activity

          People

            demitri Dzmitry Kazimirchyk
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: