org.apache.ignite.internal.processors.cache.persistence.wal.filehandle

## Interface FileHandleManager

All Known Implementing Classes:
  FileHandleManagerImpl, FsyncFileHandleManagerImpl

    public interface FileHandleManager

Manager of `FileWriteHandle`.

### Method Summary

All Methods Instance Methods Abstract Methods
`WALPointer` `flush(WALPointer ptr, boolean explicitFsync)`
`FileWriteHandle` `initHandle(SegmentIO fileIO, long position, RecordSerializer serializer)` Initialize `FileWriteHandle` for first time.
`FileWriteHandle` `nextHandle(SegmentIO fileIO, RecordSerializer serializer)` Create next file handle.
`void` `onDeactivate()` On deactivate.
`void` `resumeLogging()` Resume logging.

### Method Detail

#### initHandle

    FileWriteHandle initHandle(SegmentIO fileIO,
                               long position,
                               RecordSerializer serializer)
                        throws IOException

Initialize `FileWriteHandle` for 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 IgniteCheckedException

On 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` - `true` if fsync required.
Returns:
  Last WAL position which was flushed to WAL segment file. May be greater than or equal to a `ptr`. May be `null`, it means nothing has been flushed.
Throws:
  `IgniteCheckedException` - if fail.
  `StorageException` - if storage was fail.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.14.0
Release Date | : September 29 2022