2 Replies Latest reply on Jan 30, 2018 8:53 AM by william.burns

    What is the recommended approach to iterate and remove entries in Infinispan 8.0.1?


      From Infinispan 7.0.x onwards the filterEntries method returned an iterator that supported remove as documented here:




      > The remove operation on the iterator is fully supported and will perform the operation in the current transactional context if there is one.


      This method has now been marked as deprecated and the javadoc says:


      Please use Collection#stream() method on either Cache#entrySet(), Cache#keySet()} or Cache#values().


      These sets do however not support the remove operation, they throw a java.lang.UnsupportedOperationException when one calls remove on their iterator which has worked fine in Infinispan 7.0.x