| Modifier and Type | Field and Description |
|---|---|
| public static final String | LOG_DIRECTORY_NAME
The name of the default log directory. |
| public static final String | |
| public static final String | RT_READONLY
An attribute that indicates the database is readonly |
| public static final String | RUNTIME_ATTRIBUTES
The name of a runtime property in the service set that defines any runtime attributes a log factory should have. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | Returns: true if checkpoint is successful, Will return false if wait is false and the routine finds another thread executing a checkpoint.- the raw store rawStoreFactory, DataFactory - the data factory dataFactory, TransactionFactory - the transaction factory transactionFactory, boolean - if true waits for any existing checkpoint to complete
and then executes and waits for another checkpoint.
if false if another thead is executing a checkpoint
routine will return immediately. wait)Checkpoint the rawstore. |
| public void | checkpointInRFR(LogInstant
The LogInstant of the checkpoint cinstant, long Redo Low Water Mark in the check point record redoLWM, long Undo Low Water Mark in the checkpoint undoLWM, DataFactory - the data factory df)redoing a checkpoint during rollforward recovery |
| public boolean | Returns: true if the database has been upgraded to
the required level, false otherwise.required database Engine major version requiredMajorVersion, int required database Engine minor version requiredMinorVersion, String Non-null to throw an exception, null to return the
state of the version match. feature)Check to see if a database has been upgraded to the required level in order to use a store feature. |
| public void | createDataWarningFile()
Create readme file in log directory warning users against touching any files in the directory |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | flush(LogInstant
flush log up to here where)Flush all unwritten log record up to the log instance indicated to disk. |
| public void | |
| public String | |
| public LogInstant | |
| public long | Returns: the log instant long value of the first log record that has not been flushedGet the log instant long value of the first log record that has not been flushed. |
| public StorageFile | |
| public void | |
| public Logger | |
| public boolean | Returns: true If the master replication mode is turned on and the unlogged operations need to be logged. false If the master replication mode is turned off and the unlogged operations need not be logged.Used to determine if the replication master mode has been started, and the logging for unlogged operations needs to be enabled. |
| public boolean | |
| public boolean | |
| public boolean | Returns: true if the log is being archived.checks whether is log archive mode is enabled or not. |
| public ScanHandle | Returns: the LogScan.- the LogInstant where we start our scan. null means
start at the beginning of the log. This function raises an error
if startAt is a LogInstant which is not in the log. startAt, int - log record groups the scanner wants. groupsIWant)Get a ScanHandle to scan flushed records from the log. |
| public LogScan | Returns: the LogScan.- the LogInstant where we start our scan. null means
start at the beginning of the log. This function raises an error
if startAt is a LogInstant which is not in the log. startAt)Get a LogScan to scan flushed records from the log. |
| public LogScan | Returns: the LogScan.- the LogInstant where we start our scan. null means
start at the beginning of the log. This function raises an error
if startAt is a LogInstant which is not in the log. startAt, LogInstant - the LogInstant where we stop our scan. null means
stop at the end of the log. This function raises an error
if stopAt is a LogInstant which is not in the log. stopAt)Get a LogScan to scan the log in a forward direction. |
| public void | recover(DataFactory
- the data factory dataFactory, TransactionFactory - the transaction factory transactionFactory)Recover the database to a consistent state using the log. |
| public void | setDatabaseEncrypted(boolean
true if the database is encrypted,
false if nottrue if log needs to be flushed,
false otherwiseSets whether the database is encrypted, all the transaction log has to be encrypted, and flush the log if requested. |
| public void | setRawStoreFactory(RawStoreFactory rsf)
Make log factory aware of which raw store factory it belongs to |
| public void | |
| public void | |
| public void | startReplicationMasterRole(MasterFactory
The MasterFactory service responsible for
controlling the master side replication behaviour. masterFactory)Make this LogFactory pass log records to the MasterFactory every time a log record is appended to the log on disk, and notify the MasterFactory when a log disk flush has taken place. |
| public void | stopReplicationMasterRole()
Stop this LogFactory from passing log records to the MasterFactory and from notifying the MasterFactory when a log disk flush has taken place. |
| public void |
| LOG_DIRECTORY_NAME | back to summary |
|---|---|
| public static final String LOG_DIRECTORY_NAME The name of the default log directory. | |
| MODULE | back to summary |
|---|---|
| public static final String MODULE | |
| RT_READONLY | back to summary |
|---|---|
| public static final String RT_READONLY An attribute that indicates the database is readonly | |
| RUNTIME_ATTRIBUTES | back to summary |
|---|---|
| public static final String RUNTIME_ATTRIBUTES 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 | back to summary |
|---|---|
| public void abortLogBackup() | |
| checkpoint | back to summary |
|---|---|
| public boolean checkpoint(RawStoreFactory rawStoreFactory, DataFactory dataFactory, TransactionFactory transactionFactory, boolean wait) throws StandardException 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 1M 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 10M, but user can set it to less if more frequent checkpoint is desired. The legal range of CHECKPOINT_INTERVAL is from 100K to 128M.
| |
| checkpointInRFR | back to summary |
|---|---|
| public void checkpointInRFR(LogInstant cinstant, long redoLWM, long undoLWM, DataFactory df) throws StandardException redoing a checkpoint during rollforward recovery
| |
| checkVersion | back to summary |
|---|---|
| public boolean checkVersion(int requiredMajorVersion, int requiredMinorVersion, String feature) throws StandardException Check to see if a database has been upgraded to the required level in order to use a store feature.
| |
| createDataWarningFile | back to summary |
|---|---|
| public void createDataWarningFile() throws StandardException Create readme file in log directory warning users against touching any files in the directory | |
| deleteLogFileAfterCheckpointLogFile | back to summary |
|---|---|
| public void deleteLogFileAfterCheckpointLogFile() throws StandardException | |
| deleteOnlineArchivedLogFiles | back to summary |
|---|---|
| public void deleteOnlineArchivedLogFiles() | |
| disableLogArchiveMode | back to summary |
|---|---|
| public void disableLogArchiveMode() throws StandardException | |
| enableLogArchiveMode | back to summary |
|---|---|
| public void enableLogArchiveMode() throws StandardException | |
| endLogBackup | back to summary |
|---|---|
| public void endLogBackup(File toDir) throws StandardException | |
| flush | back to summary |
|---|---|
| public void flush(LogInstant where) throws StandardException Flush all unwritten log record up to the log instance indicated to disk.
| |
| freezePersistentStore | back to summary |
|---|---|
| public void freezePersistentStore() throws StandardException Stop making any change to the persistent store
| |
| getCanonicalLogPath | back to summary |
|---|---|
| public String getCanonicalLogPath() 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 | back to summary |
|---|---|
| public LogInstant getFirstUnflushedInstant() Get the instant for the last record in the log. | |
| getFirstUnflushedInstantAsLong | back to summary |
|---|---|
| public long getFirstUnflushedInstantAsLong() Get the log instant long value of the first log record that has not been flushed. Only works after recover() has finished, or (if in slave replication mode) after calling initializeReplicationSlaveRole.
| |
| getLogDirectory | back to summary |
|---|---|
| public StorageFile getLogDirectory() throws StandardException Return the location of the log directory.
| |
| getLogFactoryProperties | back to summary |
|---|---|
| public void getLogFactoryProperties(PersistentSet set) throws StandardException Get JBMS properties relevant to the log factory
| |
| getLogger | back to summary |
|---|---|
| public Logger getLogger() | |
| inReplicationMasterMode | back to summary |
|---|---|
| public boolean inReplicationMasterMode() Used to determine if the replication master mode has been started, and the logging for unlogged operations needs to be enabled.
| |
| inRFR | back to summary |
|---|---|
| public boolean inRFR() | |
| isCheckpointInLastLogFile | back to summary |
|---|---|
| public boolean isCheckpointInLastLogFile() throws StandardException | |
| logArchived | back to summary |
|---|---|
| public boolean logArchived() checks whether is log archive mode is enabled or not.
| |
| openFlushedScan | back to summary |
|---|---|
| public ScanHandle openFlushedScan(DatabaseInstant startAt, int groupsIWant) throws StandardException Get a ScanHandle to scan flushed records from the log. MT- read only
| |
| openForwardsFlushedScan | back to summary |
|---|---|
| public LogScan openForwardsFlushedScan(LogInstant startAt) throws StandardException Get a LogScan to scan flushed records from the log. MT- read only
| |
| openForwardsScan | back to summary |
|---|---|
| public LogScan openForwardsScan(LogInstant startAt, LogInstant stopAt) throws StandardException Get a LogScan to scan the log in a forward direction. MT- read only
| |
| recover | back to summary |
|---|---|
| public void recover(DataFactory dataFactory, TransactionFactory transactionFactory) throws StandardException 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.
| |
| setDatabaseEncrypted | back to summary |
|---|---|
| public void setDatabaseEncrypted(boolean isEncrypted, boolean flushLog) throws StandardException Sets whether the database is encrypted, all the transaction log has to be encrypted, and flush the log if requested. Log needs to be flushed first if the cryptographic state of the database changes (for instance re-encryption with a new key).
| |
| setRawStoreFactory | back to summary |
|---|---|
| public void setRawStoreFactory(RawStoreFactory rsf) Make log factory aware of which raw store factory it belongs to | |
| startLogBackup | back to summary |
|---|---|
| public void startLogBackup(File toDir) throws StandardException | |
| startNewLogFile | back to summary |
|---|---|
| public void startNewLogFile() throws StandardException | |
| startReplicationMasterRole | back to summary |
|---|---|
| public void startReplicationMasterRole(MasterFactory masterFactory) throws StandardException Make this LogFactory pass log records to the MasterFactory every time a log record is appended to the log on disk, and notify the MasterFactory when a log disk flush has taken place. Not implemented by ReadOnly.
| |
| stopReplicationMasterRole | back to summary |
|---|---|
| public void stopReplicationMasterRole() Stop this LogFactory from passing log records to the MasterFactory and from notifying the MasterFactory when a log disk flush has taken place. Not implemented by ReadOnly. | |
| unfreezePersistentStore | back to summary |
|---|---|
| public void unfreezePersistentStore() throws StandardException Can start making change to the persistent store again
| |