Package org.apache.camel.resume
Interface Offset<T>
-
- Type Parameters:
T
- the type of the offset
- All Superinterfaces:
Serializable
public interface Offset<T> extends Serializable
Generic offset without a concrete type
-
-
Field Summary
-
Fields inherited from interface org.apache.camel.resume.Serializable
BYTES, TYPE_FILE, TYPE_INTEGER, TYPE_LONG, TYPE_STRING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description T
getValue()
Gets the offset valuedefault <V> V
getValue(Class<V> tClass)
Gets the offset value converting it to the given typedefault ByteBuffer
serialize()
Serializes this offset into a buffer of bytesvoid
update(T offset)
Sets the current offset value-
Methods inherited from interface org.apache.camel.resume.Serializable
serialize
-
-
-
-
Method Detail
-
update
void update(T offset)
Sets the current offset value- Parameters:
offset
- the current offset value
-
getValue
T getValue()
Gets the offset value- Returns:
- the offset value
-
getValue
default <V> V getValue(Class<V> tClass)
Gets the offset value converting it to the given type- Parameters:
tClass
- type to convert the value to- Returns:
- the offset value or null if it cannot be converted
-
serialize
default ByteBuffer serialize()
Description copied from interface:Serializable
Serializes this offset into a buffer of bytes- Specified by:
serialize
in interfaceSerializable
- Returns:
- a ByteBuffer instance with the serialized contents of this object
-
-