public class LogManager extends Object
| Constructor and Description |
|---|
LogManager(EnvironmentImpl envImpl,
boolean readOnly)
There is a single log manager per database environment.
|
| Modifier and Type | Method and Description |
|---|---|
void |
countObsoleteNode(long lsn,
LogEntryType type,
int size,
boolean countExact)
Count node as obsolete under the log write latch.
|
void |
countObsoleteNodeDupsAllowed(long lsn,
LogEntryType type,
int size)
A flavor of countObsoleteNode which does not fire an assert if the
offset has already been counted.
|
void |
flushNoSync()
Flush all log entries to the log but do not fsync.
|
void |
flushSync()
Flush all log entries to the log and perform an fsync.
|
Object |
getEntry(long lsn)
Fault in the first object in the log entry log entry at this LSN.
|
Object |
getEntryHandleNotFound(long lsn) |
long |
getLastLsnAtRecovery() |
LogEntry |
getLogEntry(long lsn)
Instantiate all the objects in the log entry at this LSN.
|
WholeEntry |
getLogEntryAllowInvisible(long lsn)
Instantiate all the objects in the log entry at this LSN.
|
WholeEntry |
getLogEntryAllowInvisibleAtRecovery(long lsn,
int size)
Instantiate all the objects in the log entry at this LSN.
|
WholeEntry |
getLogEntryDirectFromFile(long lsn)
Reads a log entry using a FileSource, and returns null (rather than
throwing a ChecksumException) if the entry exists in a log buffer that
was not flushed.
|
LogEntry |
getLogEntryHandleNotFound(long lsn) |
LogSource |
getLogSource(long lsn)
Find the LSN, whether in a file or still in the log buffers.
|
long |
getNCacheMiss()
Return the current number of cache misses in a lightweight fashion,
without incurring the cost of loading all the stats, and without
clearing any stats.
|
LogBuffer |
getReadBufferByLsn(long lsn)
Return a log buffer locked for reading, or null if no log buffer
holds this LSN location.
|
TrackedFileSummary |
getUnflushableTrackedSummary(long file)
Returns a tracked summary for the given file which will not be flushed.
|
WholeEntry |
getWholeLogEntry(long lsn) |
WholeEntry |
getWholeLogEntryHandleNotFound(long lsn) |
void |
incRepeatIteratorReads() |
void |
initExpirationTracker(ExpirationTracker tracker)
Called at the end of recovery to begin expiration tracking using the
given tracker.
|
StatGroup |
loadStats(StatsConfig config) |
long |
log(LogEntry entry,
ReplicationContext repContext)
Write a log entry.
|
LogItem |
log(LogParams params)
Log an item, first logging any items on the lazyLogQueue, and finally
flushing and sync'ing (if requested).
|
long |
logForceFlip(LogEntry entry)
Log this single object and force a flip of the log files.
|
long |
logForceFlush(LogEntry entry,
boolean fsyncRequired,
ReplicationContext repContext)
Log this single object and force a write of the log files.
|
void |
removeTrackedFile(TrackedFileSummary tfs)
Removes the tracked summary for the given file.
|
void |
resetPool(DbConfigManager configManager)
Reset the pool when the cache is resized.
|
void |
setDelayVLSNRegisterHook(TestHook<Object> hook) |
void |
setFlushLogHook(TestHook<Object> hook) |
void |
setLastLsnAtRecovery(long lastLsnAtRecovery) |
void |
setReadHook(TestHook hook) |
void |
transferToUtilizationTracker(LocalUtilizationTracker localTracker) |
public LogManager(EnvironmentImpl envImpl, boolean readOnly) throws DatabaseException
DatabaseExceptionpublic long getLastLsnAtRecovery()
public void setLastLsnAtRecovery(long lastLsnAtRecovery)
public void initExpirationTracker(ExpirationTracker tracker)
public void resetPool(DbConfigManager configManager) throws DatabaseException
DatabaseExceptionpublic long logForceFlush(LogEntry entry, boolean fsyncRequired, ReplicationContext repContext) throws DatabaseException
entry - object to be loggedfsyncRequired - if true, log files should also be fsynced.DatabaseExceptionpublic long logForceFlip(LogEntry entry) throws DatabaseException
entry - object to be loggedDatabaseExceptionpublic long log(LogEntry entry, ReplicationContext repContext) throws DatabaseException
entry - object to be loggedDatabaseExceptionpublic LogItem log(LogParams params) throws DatabaseException
DatabaseExceptionpublic LogEntry getLogEntry(long lsn) throws FileNotFoundException, ErasedException
FileNotFoundExceptionErasedExceptionpublic WholeEntry getWholeLogEntry(long lsn) throws FileNotFoundException, ErasedException
FileNotFoundExceptionErasedExceptionpublic WholeEntry getLogEntryAllowInvisibleAtRecovery(long lsn, int size) throws FileNotFoundException, ErasedException
FileNotFoundExceptionErasedExceptionpublic WholeEntry getLogEntryAllowInvisible(long lsn) throws FileNotFoundException, ErasedException
FileNotFoundExceptionErasedExceptionpublic LogEntry getLogEntryHandleNotFound(long lsn) throws DatabaseException
DatabaseExceptionpublic WholeEntry getWholeLogEntryHandleNotFound(long lsn) throws DatabaseException
DatabaseExceptionpublic Object getEntry(long lsn) throws FileNotFoundException, ErasedException, DatabaseException
lsn - location of object in logFileNotFoundExceptionErasedExceptionDatabaseExceptionpublic Object getEntryHandleNotFound(long lsn)
public LogSource getLogSource(long lsn) throws FileNotFoundException, ChecksumException, DatabaseException
public WholeEntry getLogEntryDirectFromFile(long lsn) throws ChecksumException
ChecksumExceptionpublic LogBuffer getReadBufferByLsn(long lsn)
public void flushSync()
throws DatabaseException
DatabaseExceptionpublic void flushNoSync()
throws DatabaseException
DatabaseExceptionpublic StatGroup loadStats(StatsConfig config) throws DatabaseException
DatabaseExceptionpublic long getNCacheMiss()
public TrackedFileSummary getUnflushableTrackedSummary(long file)
public void removeTrackedFile(TrackedFileSummary tfs)
public void countObsoleteNode(long lsn,
LogEntryType type,
int size,
boolean countExact)
public void countObsoleteNodeDupsAllowed(long lsn,
LogEntryType type,
int size)
public void transferToUtilizationTracker(LocalUtilizationTracker localTracker) throws DatabaseException
public void incRepeatIteratorReads()
public void setReadHook(TestHook hook)
Copyright © 2024. All rights reserved.