Package org.infinispan.iteration

Examples of org.infinispan.iteration.EntryIterable


      }

      @Override
      public long getTotalSize() {
         long totalSize = 0;
         EntryIterable entryIterator = null;
         try {
            entryIterator = cache.filterEntries(AllFilter.INSTANCE);
            CloseableIterable ci = entryIterator.converter(NullConverter.INSTANCE);
            Iterator iter = ci.iterator();
            while (iter.hasNext()) {
               iter.next();
               totalSize++;
            }
            return totalSize;
         } finally {
            if (entryIterator != null) {
               try {
                  entryIterator.close();
               } catch (Exception e) {
                  log.error("Failed to close EntryIterable", e);
               }
            }
         }
View Full Code Here

TOP

Related Classes of org.infinispan.iteration.EntryIterable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.