Package org.apache.camel.support.resume
Class Offsets
- java.lang.Object
-
- org.apache.camel.support.resume.Offsets
-
public final class Offsets extends Object
Offset handling support
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> org.apache.camel.resume.Offset<T>
of(T offsetValue)
Creates a new offset with the given offset valuestatic <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
-
-
-
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 valuedefaultValue
- 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
-
-