4 bytes - length of user data, i.e. N 8 bytes - long representing log instant N bytes of supplied data 4 bytes - length of user data, i.e. N
| Modifier and Type | Field and Description |
|---|---|
| pack-priv long | |
| pack-priv long | |
| pack-priv long | |
| pack-priv long | |
| pack-priv long | |
| pack-priv long | |
| pack-priv static final int | |
| pack-priv LogToFile | |
| pack-priv int | nextRecordLength
The length of the next record. |
| pack-priv boolean | |
| pack-priv boolean | readNextRecordLength
Flag to indicate that the length of the next log record has been read by currentLogFileHasUnflushedRecord. |
| private StorageRandomAccessFile |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private boolean | |
| public long | getInstant()
Implements org. Return the log instant (as an integer) the scan is currently on - this is the log instant of the log record that was returned by getNextRecord. |
| public LogInstant | getLogInstant()
Implements org. Return the log instant the scan is currently on - this is the log instant of the log record that was returned by getNextRecord. |
| public long | Returns: INVALID_LOG_INSTANT if this is not a FORWARD scan or, no record have been returned yet or the scan has completed.Implements org. Get the log instant that is right after the record just retrived |
| public LogRecord | Returns: the length of the data written into data, or -1 if the end of the scan has been reached.the ArrayInputStream to put the log record input, TransactionId if non-null, only log record that equals tranId
will be returned. If null, log records are not
filtered on transaction Id. tranId, int if non-zero, only log record whose Loggable's group
value is included in the groupmask is returned.
groupmask can be a bit wise OR of many Loggable
groups. If zero, log records are not filtered on
the Loggable's group. groupmask)Implements org. Read a log record into the byte array provided. |
| public boolean | isLogEndFuzzy()
Implements org. returns true if there is partially writen log records before the crash in the last log file. |
| private boolean | |
| public void | resetPosition(LogInstant
the position to reset to instant)Implements org. Reset the scan to the given LogInstant. |
| private void | |
| private void | |
| private void |
| currentInstant | back to summary |
|---|---|
| pack-priv long currentInstant | |
| currentLogFileFirstUnflushedPosition | back to summary |
|---|---|
| pack-priv long currentLogFileFirstUnflushedPosition | |
| currentLogFileNumber | back to summary |
|---|---|
| pack-priv long currentLogFileNumber | |
| firstUnflushed | back to summary |
|---|---|
| pack-priv long firstUnflushed | |
| firstUnflushedFileNumber | back to summary |
|---|---|
| pack-priv long firstUnflushedFileNumber | |
| firstUnflushedFilePosition | back to summary |
|---|---|
| pack-priv long firstUnflushedFilePosition | |
| LOG_REC_LEN_BYTE_LENGTH | back to summary |
|---|---|
| pack-priv static final int LOG_REC_LEN_BYTE_LENGTH | |
| logFactory | back to summary |
|---|---|
| pack-priv LogToFile logFactory | |
| nextRecordLength | back to summary |
|---|---|
| pack-priv int nextRecordLength The length of the next record. Read from scan and set by currentLogFileHasUnflushedRecord. This is used to retain the length of a log record in the case currentLogFileHasUnflushedRecord reads the length and determines that some bytes in the log record are not yet flushed. | |
| open | back to summary |
|---|---|
| pack-priv boolean open | |
| readNextRecordLength | back to summary |
|---|---|
| pack-priv boolean readNextRecordLength Flag to indicate that the length of the next log record has been read by currentLogFileHasUnflushedRecord. This flag gets reset in two ways:
| |
| scan | back to summary |
|---|---|
| private StorageRandomAccessFile scan | |
| FlushedScan | back to summary |
|---|---|
| public FlushedScan(LogToFile logFactory, long startAt) throws StandardException | |
| close | back to summary |
|---|---|
| public void close() Implements org. Close the scan. | |
| currentLogFileHasUnflushedRecord | back to summary |
|---|---|
| private boolean currentLogFileHasUnflushedRecord() throws IOException | |
| getInstant | back to summary |
|---|---|
| public long getInstant() Implements org. Return the log instant (as an integer) the scan is currently on - this is the log instant of the log record that was returned by getNextRecord.
| |
| getLogInstant | back to summary |
|---|---|
| public LogInstant getLogInstant() Implements org. Return the log instant the scan is currently on - this is the log instant of the log record that was returned by getNextRecord.
| |
| getLogRecordEnd | back to summary |
|---|---|
| public long getLogRecordEnd() Implements org. Get the log instant that is right after the record just retrived
| |
| getNextRecord | back to summary |
|---|---|
| public LogRecord getNextRecord(ArrayInputStream input, TransactionId tranId, int groupmask) throws StandardException Implements org. Read a log record into the byte array provided. Resize the input stream byte array if necessary.
| |
| isLogEndFuzzy | back to summary |
|---|---|
| public boolean isLogEndFuzzy() Implements org. returns true if there is partially writen log records before the crash in the last log file. Partiall wrires are identified during forward scans for log recovery.
| |
| positionToNextRecord | back to summary |
|---|---|
| private boolean positionToNextRecord() throws StandardException, IOException | |
| resetPosition | back to summary |
|---|---|
| public void resetPosition(LogInstant instant) throws IOException Implements org. Reset the scan to the given LogInstant.
| |
| setCurrentLogFileFirstUnflushedPosition | back to summary |
|---|---|
| private void setCurrentLogFileFirstUnflushedPosition() throws IOException | |
| setFirstUnflushed | back to summary |
|---|---|
| private void setFirstUnflushed() throws StandardException, IOException | |
| switchLogFile | back to summary |
|---|---|
| private void switchLogFile() throws StandardException | |