@Override public LogRecordWithDLSN nextRecord() throws IOException { if (numRecords <= 0) { return null; } int recordLen = reader.getInt(); byte[] recordData = new byte[recordLen]; reader.get(recordData); DLSN dlsn = new DLSN(logSegmentSeqNo, entryId, slotId); LogRecordWithDLSN record = new LogRecordWithDLSN(dlsn, startSequenceId); record.setPositionWithinLogSegment(position); record.setTransactionId(transactionId); record.setPayload(recordData); ++slotId; ++position; --numRecords; return record; }
public static LogRecordWithDLSN getLogRecordWithDLSNInstance(DLSN dlsn, long txId, boolean isControlRecord) { LogRecordWithDLSN record = new LogRecordWithDLSN(dlsn, txId, generatePayload(txId), 1L); record.setPositionWithinLogSegment((int)txId + 1); if (isControlRecord) { record.setControl(); } return record; }
LogRecordWithDLSN record = new LogRecordWithDLSN(recordStream.getCurrentPosition(), startSequenceId); record.setMetadata(flags); record.setTransactionId(currTxId);
nextRecordInStream = new LogRecordWithDLSN(recordStream.getCurrentPosition(), startSequenceId); nextRecordInStream.setMetadata(metadata); nextRecordInStream.setTransactionId(in.readLong());
@Override public LogRecordWithDLSN nextRecord() throws IOException { if (numRecords <= 0) { return null; } int recordLen = reader.getInt(); byte[] recordData = new byte[recordLen]; reader.get(recordData); DLSN dlsn = new DLSN(logSegmentSeqNo, entryId, slotId); LogRecordWithDLSN record = new LogRecordWithDLSN(dlsn, startSequenceId); record.setPositionWithinLogSegment(position); record.setTransactionId(transactionId); record.setPayload(recordData); ++slotId; ++position; --numRecords; return record; }
LogRecordWithDLSN record = new LogRecordWithDLSN(recordStream.getCurrentPosition(), startSequenceId); record.setMetadata(flags); record.setTransactionId(currTxId);
nextRecordInStream = new LogRecordWithDLSN(recordStream.getCurrentPosition(), startSequenceId); nextRecordInStream.setMetadata(metadata); nextRecordInStream.setTransactionId(in.readLong());