|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.store.raw.log.ReadOnly
A read-only version of the log factory. It doesn't do anything, it doesn't check that the database needs recovery or not.
It doesn't handle undo. No recovery.
Multithreading considerations:
This class must be MT-safe.
Field Summary | |
private java.lang.String |
logArchiveDirectory
|
Fields inherited from interface org.apache.derby.iapi.store.raw.log.LogFactory |
LOG_DIRECTORY_NAME, MODULE, RT_READONLY, RUNTIME_ATTRIBUTES |
Constructor Summary | |
ReadOnly()
|
Method Summary | |
boolean |
canSupport(java.util.Properties startParams)
See if this implementation can support any attributes that are listed in properties. |
boolean |
checkpoint(RawStoreFactory rawStoreFactory,
DataFactory dataFactory,
TransactionFactory transactionFactory,
boolean wait)
MT - not needed, no work is done |
void |
checkpointInRFR(LogInstant cinstant,
long redoLWM,
DataFactory df)
perform 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()
Backup restore - stop sending log record to the log stream |
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. |
StorageFile |
getLogDirectory()
Return the location of the log directory. |
void |
getLogFactoryProperties(PersistentSet set)
Get JBMS properties relavent to the log factory |
Logger |
getLogger()
|
LogInstant |
getTruncationLWM(UUID name)
|
boolean |
inRFR()
|
boolean |
logArchived()
Backup restore - is the log being archived to some directory? |
StandardException |
markCorrupt(StandardException originalError)
Mark the module as corrupt. |
ScanHandle |
openFlushedScan(DatabaseInstant i,
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(RawStoreFactory rawStoreFactory,
DataFactory dataFactory,
TransactionFactory transactionFactory)
MT - not needed, no work is done |
void |
removeTruncationLWM(UUID name)
|
void |
removeTruncationLWM(UUID name,
RawStoreFactory rawStoreFactory,
TransactionFactory transFactory)
|
void |
setTruncationLWM(UUID name,
LogInstant instant)
|
LogInstant |
setTruncationLWM(UUID name,
LogInstant instant,
RawStoreFactory rawStoreFactory,
TransactionFactory transFactory)
|
void |
unfreezePersistentStore()
Backup restore - start sending log record to the log stream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.String logArchiveDirectory
Constructor Detail |
public ReadOnly()
Method Detail |
public Logger getLogger()
getLogger
in interface LogFactory
public void recover(RawStoreFactory rawStoreFactory, DataFactory dataFactory, TransactionFactory transactionFactory) throws StandardException
recover
in interface LogFactory
rawStoreFactory
- - the raw storedataFactory
- - the data factorytransactionFactory
- - the transaction factory
StandardException
- Cloudscape Standard Error Policypublic boolean checkpoint(RawStoreFactory rawStoreFactory, DataFactory dataFactory, TransactionFactory transactionFactory, boolean wait)
checkpoint
in interface LogFactory
rawStoreFactory
- - the raw storedataFactory
- - the data factorytransactionFactory
- - the transaction factorywait
- - if true; waits for the checkpoint to completed even if it is being done my an another thread.
public StandardException markCorrupt(StandardException originalError)
Corruptable
markCorrupt
in interface Corruptable
public void flush(LogInstant where) throws StandardException
LogFactory
flush
in interface LogFactory
where
- flush log up to here
StandardException
- cannot flush log file due to sync errorpublic boolean canSupport(java.util.Properties startParams)
ModuleSupportable
The module can check for attributes in the properties to
see if it can fulfill the required behaviour. E.g. the raw
store may define an attribute called RawStore.Recoverable.
If a temporary raw store is required the property RawStore.recoverable=false
would be added to the properties before calling bootServiceModule. If a
raw store cannot support this attribute its canSupport method would
return null. Also see the Monitor class's prologue to see how the
identifier is used in looking up properties.
Actually a better way maybe to have properties of the form
RawStore.Attributes.mandatory=recoverable,smallfootprint and
RawStore.Attributes.requested=oltp,fast
canSupport
in interface ModuleSupportable
public LogInstant setTruncationLWM(UUID name, LogInstant instant, RawStoreFactory rawStoreFactory, TransactionFactory transFactory) throws StandardException
StandardException
public void setTruncationLWM(UUID name, LogInstant instant) throws StandardException
StandardException
- functionality not implmentedpublic void removeTruncationLWM(UUID name, RawStoreFactory rawStoreFactory, TransactionFactory transFactory) throws StandardException
StandardException
- functionality not implmentedpublic LogInstant getTruncationLWM(UUID name) throws StandardException
StandardException
- functionality not implmentedpublic void removeTruncationLWM(UUID name) throws StandardException
StandardException
- functionality not implmentedpublic ScanHandle openFlushedScan(DatabaseInstant i, int groupsIWant) throws StandardException
LogFactory
MT- read only
openFlushedScan
in interface LogFactory
groupsIWant
- - log record groups the scanner wants.
StandardException
- functionality not implmentedpublic LogScan openForwardsScan(LogInstant startAt, LogInstant stopAt) throws StandardException
LogFactory
MT- read only
openForwardsScan
in interface LogFactory
startAt
- - 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.stopAt
- - 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.
StandardException
- functionality not implmentedpublic LogInstant getFirstUnflushedInstant()
LogFactory
getFirstUnflushedInstant
in interface LogFactory
public LogScan openForwardsFlushedScan(LogInstant startAt) throws StandardException
LogFactory
MT- read only
openForwardsFlushedScan
in interface LogFactory
startAt
- - 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.
StandardException
- functionality not implmentedpublic void freezePersistentStore() throws StandardException
freezePersistentStore
in interface LogFactory
StandardException
- Standard Cloudscape error policypublic void unfreezePersistentStore() throws StandardException
unfreezePersistentStore
in interface LogFactory
StandardException
- Standard Cloudscape error policypublic boolean logArchived()
logArchived
in interface LogFactory
public void getLogFactoryProperties(PersistentSet set)
getLogFactoryProperties
in interface LogFactory
public StorageFile getLogDirectory()
LogFactory
getLogDirectory
in interface LogFactory
public java.lang.String getCanonicalLogPath()
LogFactory
getCanonicalLogPath
in interface LogFactory
public void enableLogArchiveMode()
enableLogArchiveMode
in interface LogFactory
public void disableLogArchiveMode()
disableLogArchiveMode
in interface LogFactory
public void deleteOnlineArchivedLogFiles()
deleteOnlineArchivedLogFiles
in interface LogFactory
public boolean inRFR()
inRFR
in interface LogFactory
public void checkpointInRFR(LogInstant cinstant, long redoLWM, DataFactory df) throws StandardException
checkpointInRFR
in interface LogFactory
cinstant
- The LogInstant of the checkpointredoLWM
- Redo Low Water Mark in the check point record
StandardException
- - encounter exception during checkpointpublic boolean copyActiveLogFiles(java.io.File toDir) throws StandardException
copyActiveLogFiles
in interface LogFactory
StandardException
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |