use of org.apache.ignite.internal.pagemem.wal.record.TxRecord in project ignite by apache.
the class WalStat method registerRecord.
/**
* Handles WAL record.
*
* @param record record to handle.
* @param walPointer pointer, used to extract segment index.
* @param workDir true for work, false for archive folder.
*/
void registerRecord(WALRecord record, WALPointer walPointer, boolean workDir) {
WALRecord.RecordType type = record.type();
if (type == WALRecord.RecordType.PAGE_RECORD)
registerPageSnapshot((PageSnapshot) record);
else if (type == WALRecord.RecordType.DATA_RECORD)
registerDataRecord((DataRecord) record);
else if (type == WALRecord.RecordType.TX_RECORD)
registerTxRecord((TxRecord) record);
incrementStat(type.toString(), record, recTypeSizes);
if (walPointer instanceof FileWALPointer) {
final FileWALPointer fPtr = (FileWALPointer) walPointer;
incrementStat(Long.toString(fPtr.index()), record, segmentsIndexes);
incrementStat(workDir ? "work" : "archive", record, segmentsFolder);
}
}
Aggregations