Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2184

Add public API methods to close query results

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Blocker
    • 4.0.0.Alpha1
    • 4.0.0.Alpha1
    • API, Query
    • None

    Description

      Query results may be buffered in temporary storage, and this temporary storage is closed and garbage collected only when the session is closed. After all, none of the JCR query-related objects has any notion of a close method.

      While this works, it may cause problems in sessions that use lots of queries or a few queries with lots of results. A better way to would be to add a public "close()" method to the QueryResults, and in fact making QueryResults extend AutoCloseable to enable it to be used within a try-with-resources block. This would give clients more control over when resources are cleaned up, although it would be optional and fall back to having the session's close() method clean up all resources.

      Attachments

        Issue Links

          Activity

            People

              rhauch Randall Hauch (Inactive)
              rhauch Randall Hauch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: