Class Offsets

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

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

    Modifier and Type
    Method
    Description
    static <T> org.apache.camel.resume.Offset<T>
    of(T offsetValue)
    Creates a new offset with the given offset value
    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

    Methods inherited from class java.lang.Object

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

    • 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