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

Have ResultIterator implement AutoCloseable

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

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

      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.

              sgrinove Sanne Grinovero (Inactive)
              sgrinove Sanne Grinovero (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: