public class FileHandleManagerImpl extends Object implements FileHandleManager
FileWriteHandleImpl
.Modifier and Type | Class and Description |
---|---|
class |
FileHandleManagerImpl.WALWriter
WAL writer worker.
|
Modifier and Type | Field and Description |
---|---|
protected GridCacheSharedContext |
cctx
Context.
|
static long |
DFLT_WAL_SEGMENT_SYNC_TIMEOUT
Default wal segment sync timeout.
|
Constructor and Description |
---|
FileHandleManagerImpl(GridCacheSharedContext cctx,
DataStorageMetricsImpl metrics,
boolean mmap,
RecordSerializer serializer,
Supplier<FileWriteHandle> currentHandleSupplier,
WALMode mode,
int walBufferSize,
long maxWalSegmentSize,
long fsyncDelay) |
Modifier and Type | Method and Description |
---|---|
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.
|
public static final long DFLT_WAL_SEGMENT_SYNC_TIMEOUT
protected final GridCacheSharedContext cctx
public FileHandleManagerImpl(GridCacheSharedContext cctx, DataStorageMetricsImpl metrics, boolean mmap, RecordSerializer serializer, Supplier<FileWriteHandle> currentHandleSupplier, WALMode mode, int walBufferSize, long maxWalSegmentSize, long fsyncDelay)
cctx
- Context.metrics
- Data storage metrics.mmap
- Mmap.serializer
- Serializer.currentHandleSupplier
- Current handle supplier.mode
- WAL mode.walBufferSize
- WAL buffer size.maxWalSegmentSize
- Max WAL segment size.fsyncDelay
- Fsync delay.public FileWriteHandle initHandle(SegmentIO fileIO, long position, RecordSerializer serializer) throws IOException
FileWriteHandle
for first time.initHandle
in interface FileHandleManager
fileIO
- FileIO.position
- Init position.serializer
- Serializer for file handle.IOException
- if creation was not success.public FileWriteHandle nextHandle(SegmentIO fileIO, RecordSerializer serializer) throws IOException
nextHandle
in interface FileHandleManager
fileIO
- FileIO.serializer
- Serializer for file handle.IOException
- if creation was not success.public void onDeactivate() throws IgniteCheckedException
onDeactivate
in interface FileHandleManager
IgniteCheckedException
- if fail.public void resumeLogging()
resumeLogging
in interface FileHandleManager
public WALPointer flush(WALPointer ptr, boolean explicitFsync) throws IgniteCheckedException, StorageException
flush
in interface FileHandleManager
ptr
- Pointer until need to flush.explicitFsync
- true
if fsync required.ptr
.
May be null
, it means nothing has been flushed.IgniteCheckedException
- if fail.StorageException
- if storage was fail.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021