| org.apache.derby.iapi.store.raw.log.LogFactory
All known Subclasses: org.apache.derby.impl.store.raw.log.LogToFile, org.apache.derby.impl.store.raw.log.ReadOnly,
Method Summary | |
public void | abortLogBackup() | public boolean | checkVersion(int requiredMajorVersion, int requiredMinorVersion, String feature) Check to see if a database has been upgraded to the required
level in order to use a store feature.
Parameters: requiredMajorVersion - required database Engine major version Parameters: requiredMinorVersion - required database Engine minor version Parameters: feature - Non-null to throw an exception, null to return the state of the version match. | public boolean | checkpoint(RawStoreFactory rawStoreFactory, DataFactory dataFactory, TransactionFactory transactionFactory, boolean wait) Checkpoint the rawstore.
The frequency of checkpoint is determined by 2 persistent service
properties,
RawStore.LOG_SWITCH_INTERVAL and RawStore.CHECKPOINT_INTERVAL. | public void | checkpointInRFR(LogInstant cinstant, long redoLWM, DataFactory df) | public void | deleteLogFileAfterCheckpointLogFile() | public void | deleteOnlineArchivedLogFiles() | public void | disableLogArchiveMode() | public void | enableLogArchiveMode() | public void | endLogBackup(File toDir) | public void | flush(LogInstant where) Flush all unwritten log record up to the log instance indicated to disk. | public void | freezePersistentStore() | public String | getCanonicalLogPath() Return the canonical directory of the PARENT of the log directory. | LogInstant | getFirstUnflushedInstant() Get the instant for the last record in the log. | public StorageFile | getLogDirectory() Return the location of the log directory. | public void | getLogFactoryProperties(PersistentSet set) | public Logger | getLogger() | public boolean | inRFR() | public boolean | isCheckpointInLastLogFile() | public boolean | logArchived() checks whether is log archive mode is enabled or not. | ScanHandle | openFlushedScan(DatabaseInstant startAt, int groupsIWant) Get a ScanHandle to scan flushed records from the log.
MT- read only
Parameters: startAt - - the LogInstant where we start our scan. | LogScan | openForwardsFlushedScan(LogInstant startAt) Get a LogScan to scan flushed records from the log.
MT- read only
Parameters: startAt - - the LogInstant where we start our scan. | LogScan | openForwardsScan(LogInstant startAt, LogInstant stopAt) Get a LogScan to scan the log in a forward direction.
MT- read only
Parameters: startAt - - the LogInstant where we start our scan. | public void | recover(RawStoreFactory rawStoreFactory, DataFactory dataFactory, TransactionFactory transactionFactory) Recover the database to a consistent state using the log. | public void | setDatabaseEncrypted(boolean flushLog) | public void | startLogBackup(File toDir) | public void | startNewLogFile() | public void | unfreezePersistentStore() |
LOG_DIRECTORY_NAME | final public static String LOG_DIRECTORY_NAME(Code) | | The name of the default log directory.
|
RT_READONLY | final public static String RT_READONLY(Code) | | An attribute that indicates the database is readonly
|
RUNTIME_ATTRIBUTES | final public static String RUNTIME_ATTRIBUTES(Code) | | The name of a runtime property in the service set that defines any runtime
attributes a log factory should have. It is (or will be) a comma separated list
of attributes.
At the moment only one attribute is known and checked for.
|
abortLogBackup | public void abortLogBackup()(Code) | | |
checkVersion | public boolean checkVersion(int requiredMajorVersion, int requiredMinorVersion, String feature) throws StandardException(Code) | | Check to see if a database has been upgraded to the required
level in order to use a store feature.
Parameters: requiredMajorVersion - required database Engine major version Parameters: requiredMinorVersion - required database Engine minor version Parameters: feature - Non-null to throw an exception, null to return the state of the version match. true if the database has been upgraded to the required level, false otherwise. exception: StandardException - if the database is not at the require version when feature feature is not null . |
checkpoint | public boolean checkpoint(RawStoreFactory rawStoreFactory, DataFactory dataFactory, TransactionFactory transactionFactory, boolean wait) throws StandardException(Code) | | Checkpoint the rawstore.
The frequency of checkpoint is determined by 2 persistent service
properties,
RawStore.LOG_SWITCH_INTERVAL and RawStore.CHECKPOINT_INTERVAL.
By default, LOG_SWITCH_INTERVAL is every 100K bytes of log record
written. User can change this value by setting the property to some
other values during boot time. The legal range of LOG_SWITCH_INTERVAL
is from 100K to 128M.
By default, CHECKPOINT_INTERVAL equals LOG_SWITCH_INTERVAL, but user
can set it to less if more frequent checkpoint is desired. The legal
range of CHECKPOINT_INTERVAL is from 100K to LOG_SWITCH_INTERVAL.
Parameters: rawStoreFactory - - the raw store Parameters: dataFactory - - the data factory Parameters: transactionFactory - - the transaction factory Parameters: wait - - if true; waits for the checkpoint to completed even if it is being done my an another thread. true if checkpoint is successful exception: StandardException - - encounter exception while doing checkpoint. |
checkpointInRFR | public void checkpointInRFR(LogInstant cinstant, long redoLWM, DataFactory df) throws StandardException(Code) | | redoing a checkpoint during rollforward recovery
Parameters: cinstant - The LogInstant of the checkpoint Parameters: redoLWM - Redo Low Water Mark in the check point record Parameters: df - - the data factory exception: StandardException - - encounter exception during checkpoint |
deleteLogFileAfterCheckpointLogFile | public void deleteLogFileAfterCheckpointLogFile() throws StandardException(Code) | | |
deleteOnlineArchivedLogFiles | public void deleteOnlineArchivedLogFiles()(Code) | | |
flush | public void flush(LogInstant where) throws StandardException(Code) | | Flush all unwritten log record up to the log instance indicated to disk.
Parameters: where - flush log up to here exception: StandardException - cannot flush log file due to sync error |
freezePersistentStore | public void freezePersistentStore() throws StandardException(Code) | | Stop making any change to the persistent store
exception: StandardException - Standard cloudscape exception policy. |
getCanonicalLogPath | public String getCanonicalLogPath()(Code) | | Return the canonical directory of the PARENT of the log directory. The
log directory live in the "log" subdirectory of this path. If the log
is at the default location (underneath the database directory), this
returns null. Should only be called after the log factory is booted.
|
getFirstUnflushedInstant | LogInstant getFirstUnflushedInstant()(Code) | | Get the instant for the last record in the log.
|
inRFR | public boolean inRFR()(Code) | | |
logArchived | public boolean logArchived()(Code) | | checks whether is log archive mode is enabled or not.
true if the log is being archived. |
openFlushedScan | ScanHandle openFlushedScan(DatabaseInstant startAt, int groupsIWant) throws StandardException(Code) | | Get a ScanHandle to scan flushed records from the log.
MT- read only
Parameters: startAt - - the LogInstant where we start our scan. null meansstart at the beginning of the log. This function raises an errorif startAt is a LogInstant which is not in the log. Parameters: groupsIWant - - log record groups the scanner wants. the LogScan. exception: StandardException - StandardCloudscape error policy |
openForwardsFlushedScan | LogScan openForwardsFlushedScan(LogInstant startAt) throws StandardException(Code) | | Get a LogScan to scan flushed records from the log.
MT- read only
Parameters: startAt - - the LogInstant where we start our scan. null meansstart at the beginning of the log. This function raises an errorif startAt is a LogInstant which is not in the log. the LogScan. exception: StandardException - StandardCloudscape error policyNOTE: This will be removed after the LogSniffer Rewrite. |
openForwardsScan | LogScan openForwardsScan(LogInstant startAt, LogInstant stopAt) throws StandardException(Code) | | Get a LogScan to scan the log in a forward direction.
MT- read only
Parameters: startAt - - the LogInstant where we start our scan. null meansstart at the beginning of the log. This function raises an errorif startAt is a LogInstant which is not in the log. Parameters: stopAt - - the LogInstant where we stop our scan. null meansstop at the end of the log. This function raises an errorif stopAt is a LogInstant which is not in the log. the LogScan. exception: StandardException - StandardCloudscape error policy |
recover | public void recover(RawStoreFactory rawStoreFactory, DataFactory dataFactory, TransactionFactory transactionFactory) throws StandardException(Code) | | Recover the database to a consistent state using the log.
Each implementation of the log factory has its own recovery algorithm,
please see the implementation for a description of the specific
recovery algorithm it uses.
Parameters: rawStoreFactory - - the raw store Parameters: dataFactory - - the data factory Parameters: transactionFactory - - the transaction factory exception: StandardException - - encounter exception while recovering. |
unfreezePersistentStore | public void unfreezePersistentStore() throws StandardException(Code) | | Can start making change to the persistent store again
exception: StandardException - Standard cloudscape exception policy. |
|
|