Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-2879

Have ResultIterator implement AutoCloseable

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • Minor
    • None
    • None
    • Embedded Querying
    • None

    Description

      Assuming we'll baseline on Java7, it would be very nice to have the following code valid and changing the default Fetch to LAZY:

      Query query = queryBuilder.all().createQuery();
      CacheQuery cacheQuery = searchManager.getQuery(query, Bean.class);
      for (Object object : cacheQuery) {
        ...
      }

      the problem is the implicit iterable opened needs to be closed.

      see also ISPN-2874.

      Attachments

        Issue Links

          Activity

            People

              sgrinove Sanne Grinovero
              sgrinove Sanne Grinovero
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: