|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> store >> raw >> [ log overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.iapi.store.raw.log
Interface LogFactory

- All Superinterfaces:
- org.apache.derby.iapi.store.raw.Corruptable
- public interface LogFactory
- extends org.apache.derby.iapi.store.raw.Corruptable
| Field Summary | |
static java.lang.String |
LOG_DIRECTORY_NAME
The name of the default log directory. |
static java.lang.String |
MODULE
|
static java.lang.String |
RT_READONLY
An attribute that indicates the database is readonly |
static java.lang.String |
RUNTIME_ATTRIBUTES
The name of a runtime property in the service set that defines any runtime attributes a log factory should have. |
| Method Summary | |
boolean |
checkpoint(org.apache.derby.iapi.store.raw.RawStoreFactory rawStoreFactory,
org.apache.derby.iapi.store.raw.data.DataFactory dataFactory,
org.apache.derby.iapi.store.raw.xact.TransactionFactory transactionFactory,
boolean wait)
Checkpoint the rawstore. |
void |
checkpointInRFR(LogInstant cinstant,
long redoLWM,
org.apache.derby.iapi.store.raw.data.DataFactory df)
redoing a checkpoint during rollforward recovery |
boolean |
copyActiveLogFiles(java.io.File toDir)
|
void |
deleteOnlineArchivedLogFiles()
|
void |
disableLogArchiveMode()
|
void |
enableLogArchiveMode()
|
void |
flush(LogInstant where)
Flush all unwritten log record up to the log instance indicated to disk. |
void |
freezePersistentStore()
Stop making any change to the persistent store |
java.lang.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. |
org.apache.derby.io.StorageFile |
getLogDirectory()
Return the location of the log directory. |
void |
getLogFactoryProperties(org.apache.derby.iapi.services.property.PersistentSet set)
Get JBMS properties relavent to the log factory |
Logger |
getLogger()
|
boolean |
inRFR()
|
boolean |
logArchived()
checks whether is log archive mode is enabled or not. |
org.apache.derby.iapi.store.raw.ScanHandle |
openFlushedScan(org.apache.derby.iapi.store.access.DatabaseInstant start,
int groupsIWant)
Get a ScanHandle to scan flushed records from the log. |
LogScan |
openForwardsFlushedScan(LogInstant startAt)
Get a LogScan to scan flushed records from the log. |
LogScan |
openForwardsScan(LogInstant startAt,
LogInstant stopAt)
Get a LogScan to scan the log in a forward direction. |
void |
recover(org.apache.derby.iapi.store.raw.RawStoreFactory rawStoreFactory,
org.apache.derby.iapi.store.raw.data.DataFactory dataFactory,
org.apache.derby.iapi.store.raw.xact.TransactionFactory transactionFactory)
Recover the database to a consistent state using the log. |
void |
unfreezePersistentStore()
Can start making change to the persistent store again |
| Methods inherited from interface org.apache.derby.iapi.store.raw.Corruptable |
markCorrupt |
| Field Detail |
RUNTIME_ATTRIBUTES
public static final java.lang.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.
- See Also:
- Constant Field Values
RT_READONLY
public static final java.lang.String RT_READONLY
- An attribute that indicates the database is readonly
- See Also:
- Constant Field Values
LOG_DIRECTORY_NAME
public static final java.lang.String LOG_DIRECTORY_NAME
- The name of the default log directory.
- See Also:
- Constant Field Values
MODULE
public static final java.lang.String MODULE
- See Also:
- Constant Field Values
| Method Detail |
getLogger
public Logger getLogger()
recover
public void recover(org.apache.derby.iapi.store.raw.RawStoreFactory rawStoreFactory, org.apache.derby.iapi.store.raw.data.DataFactory dataFactory, org.apache.derby.iapi.store.raw.xact.TransactionFactory transactionFactory) throws org.apache.derby.iapi.error.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.
checkpoint
public boolean checkpoint(org.apache.derby.iapi.store.raw.RawStoreFactory rawStoreFactory, org.apache.derby.iapi.store.raw.data.DataFactory dataFactory, org.apache.derby.iapi.store.raw.xact.TransactionFactory transactionFactory, boolean wait) throws org.apache.derby.iapi.error.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 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.
flush
public void flush(LogInstant where) throws org.apache.derby.iapi.error.StandardException
- Flush all unwritten log record up to the log instance indicated to disk.
openForwardsFlushedScan
public LogScan openForwardsFlushedScan(LogInstant startAt) throws org.apache.derby.iapi.error.StandardException
- Get a LogScan to scan flushed records from the log.
MT- read only
openFlushedScan
public org.apache.derby.iapi.store.raw.ScanHandle openFlushedScan(org.apache.derby.iapi.store.access.DatabaseInstant start, int groupsIWant) throws org.apache.derby.iapi.error.StandardException
- Get a ScanHandle to scan flushed records from the log.
MT- read only
openForwardsScan
public LogScan openForwardsScan(LogInstant startAt, LogInstant stopAt) throws org.apache.derby.iapi.error.StandardException
- Get a LogScan to scan the log in a forward direction.
MT- read only
getFirstUnflushedInstant
public LogInstant getFirstUnflushedInstant()
- Get the instant for the last record in the log.
freezePersistentStore
public void freezePersistentStore()
throws org.apache.derby.iapi.error.StandardException
- Stop making any change to the persistent store
unfreezePersistentStore
public void unfreezePersistentStore()
throws org.apache.derby.iapi.error.StandardException
- Can start making change to the persistent store again
logArchived
public boolean logArchived()
- checks whether is log archive mode is enabled or not.
getLogFactoryProperties
public void getLogFactoryProperties(org.apache.derby.iapi.services.property.PersistentSet set) throws org.apache.derby.iapi.error.StandardException
- Get JBMS properties relavent to the log factory
getLogDirectory
public org.apache.derby.io.StorageFile getLogDirectory() throws org.apache.derby.iapi.error.StandardException
- Return the location of the log directory.
getCanonicalLogPath
public java.lang.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.
copyActiveLogFiles
public boolean copyActiveLogFiles(java.io.File toDir) throws org.apache.derby.iapi.error.StandardException
enableLogArchiveMode
public void enableLogArchiveMode()
throws org.apache.derby.iapi.error.StandardException
disableLogArchiveMode
public void disableLogArchiveMode()
throws org.apache.derby.iapi.error.StandardException
deleteOnlineArchivedLogFiles
public void deleteOnlineArchivedLogFiles()
inRFR
public boolean inRFR()
checkpointInRFR
public void checkpointInRFR(LogInstant cinstant, long redoLWM, org.apache.derby.iapi.store.raw.data.DataFactory df) throws org.apache.derby.iapi.error.StandardException
- redoing a checkpoint during rollforward recovery
|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> store >> raw >> [ log overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC