+ /**
+ * Cancels all in-progress sliced message state that matches the given filter.
+ *
+ * @param filter filters by Identifier
+ */
+ public void cancelSlicing(@Nonnull final Predicate<Identifier> filter) {
+ final Iterator<MessageSliceIdentifier> iter = stateCache.asMap().keySet().iterator();
+ while (iter.hasNext()) {
+ if (filter.test(iter.next().getClientIdentifier())) {
+ iter.remove();
+ }
+ }
+ }
+