Interface FileHandleManager
-
- All Known Implementing Classes:
FileHandleManagerImpl,FsyncFileHandleManagerImpl
public interface FileHandleManagerManager ofFileWriteHandle.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WALPointerflush(WALPointer ptr, boolean explicitFsync)FileWriteHandleinitHandle(SegmentIO fileIO, long position, RecordSerializer serializer)InitializeFileWriteHandlefor first time.FileWriteHandlenextHandle(SegmentIO fileIO, RecordSerializer serializer)Create next file handle.voidonDeactivate()On deactivate.voidresumeLogging()Resume logging.
-
-
-
Method Detail
-
initHandle
FileWriteHandle initHandle(SegmentIO fileIO, long position, RecordSerializer serializer) throws IOException
InitializeFileWriteHandlefor first time.- Parameters:
fileIO- FileIO.position- Init position.serializer- Serializer for file handle.- Returns:
- Created file handle.
- Throws:
IOException- if creation was not success.
-
nextHandle
FileWriteHandle nextHandle(SegmentIO fileIO, RecordSerializer serializer) throws IOException
Create next file handle.- Parameters:
fileIO- FileIO.serializer- Serializer for file handle.- Returns:
- Created file handle.
- Throws:
IOException- if creation was not success.
-
onDeactivate
void onDeactivate() throws IgniteCheckedExceptionOn deactivate.- Throws:
IgniteCheckedException- if fail.
-
resumeLogging
void resumeLogging()
Resume logging.
-
flush
WALPointer flush(WALPointer ptr, boolean explicitFsync) throws IgniteCheckedException, StorageException
- Parameters:
ptr- Pointer until need to flush.explicitFsync-trueif fsync required.- Returns:
- Last WAL position which was flushed to WAL segment file. May be greater than or equal to a
ptr. May benull, it means nothing has been flushed. - Throws:
IgniteCheckedException- if fail.StorageException- if storage was fail.
-
-