Class Offsets


  • public final class Offsets
    extends Object
    Offset handling support
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.apache.camel.resume.Offset<Long> INITIAL_LONG
      Default initial offset when using long offsets
    • Field Detail

      • INITIAL_LONG

        public static final org.apache.camel.resume.Offset<Long> INITIAL_LONG
        Default initial offset when using long offsets
    • Method Detail

      • of

        public static <T> org.apache.camel.resume.Offset<T> of​(T offsetValue)
        Creates a new offset with the given offset value
        Type Parameters:
        T - The type of the offset
        Parameters:
        offsetValue - the offset value
        Returns:
        A new Offset holder with the given offset value
      • ofNullable

        public static <T> org.apache.camel.resume.Offset<T> ofNullable​(T offsetValue,
                                                                       T defaultValue)
        Creates a new offset with a default value in case of the offset value is null
        Type Parameters:
        T - the type of the offset
        Parameters:
        offsetValue - the offset value
        defaultValue - the default offset value to use if the provided offset value is null
        Returns:
        A new Offset holder with the given offset value or the default one if the offset value is null