Class DefaultGenericFileResumeAdapter
- java.lang.Object
-
- org.apache.camel.component.file.consumer.adapters.DefaultGenericFileResumeAdapter
-
- All Implemented Interfaces:
FileResumeAdapter<GenericFileResumable<File>>,GenericFileResumeAdapter,org.apache.camel.resume.ResumeAdapter
public class DefaultGenericFileResumeAdapter extends Object implements GenericFileResumeAdapter
An implementation of theGenericFileResumeAdapterthat can be used to handle resume operations for file offsets (where the offsets are of Long format).
-
-
Constructor Summary
Constructors Constructor Description DefaultGenericFileResumeAdapter(org.apache.camel.resume.cache.SingleEntryCache<File,Long> cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Long>getLastOffset(File addressable)Gets the last offset for the given filevoidresume()voidresume(GenericFileResumable<File> resumable)Returns the last offset read for the given file.
-
-
-
Method Detail
-
getLastOffset
public Optional<Long> getLastOffset(File addressable)
Description copied from interface:GenericFileResumeAdapterGets the last offset for the given file- Specified by:
getLastOffsetin interfaceGenericFileResumeAdapter- Parameters:
addressable- the file instance- Returns:
- An Optional with the offset value
-
resume
public void resume(GenericFileResumable<File> resumable)
Description copied from interface:FileResumeAdapterReturns the last offset read for the given file.- Specified by:
resumein interfaceFileResumeAdapter<GenericFileResumable<File>>- Parameters:
resumable- the resumable file or resumable set to run the resume
-
resume
public void resume()
- Specified by:
resumein interfaceorg.apache.camel.resume.ResumeAdapter
-
-