Class Resumables

java.lang.Object
org.apache.camel.support.resume.Resumables

public final class Resumables extends Object
A wrapper for resumable entities
  • Method Summary

    Modifier and Type
    Method
    Description
    static <K, V> org.apache.camel.resume.Resumable
    of(K addressable, V offset)
    Creates a new resumable for an addressable
    static <T> T[]
    resumeEach(T[] input, Predicate<T> resumableCheck)
    Iterates over the set of input checking if they should be resumed or not.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • of

      public static <K, V> org.apache.camel.resume.Resumable of(K addressable, V offset)
      Creates a new resumable for an addressable
      Type Parameters:
      K - the type of the key, name or object that can be addressed by the given offset (aka addressable)
      V - the type of offset
      Parameters:
      addressable - the key, name or object that can be addressed by the given offset
      offset - the offset value
      Returns:
      A new resumable entity for the given addressable with the given offset value
    • resumeEach

      public static <T> T[] resumeEach(T[] input, Predicate<T> resumableCheck)
      Iterates over the set of input checking if they should be resumed or not.
      Parameters:
      input - the input array to check for resumables
      resumableCheck - a checker method that returns true if a single entry of the input should be resumed or false otherwise. For instance: given a set A, B and C, where B has already been processed, then a test for A and C returns true, whereas a test for B returns false.
      Returns:
      a new array containing the elements that still need to be processed