|
||||||||||
| 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 LogFactoryrawStoreFactory - - the raw storedataFactory - - the data factorytransactionFactory - - the transaction factory
StandardException - Cloudscape Standard Error Policy
public boolean checkpoint(RawStoreFactory rawStoreFactory,
DataFactory dataFactory,
TransactionFactory transactionFactory,
boolean wait)
checkpoint in interface LogFactoryrawStoreFactory - - 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 LogFactorywhere - 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 implmented
public void removeTruncationLWM(UUID name,
RawStoreFactory rawStoreFactory,
TransactionFactory transFactory)
throws StandardException
StandardException - functionality not implmented
public LogInstant getTruncationLWM(UUID name)
throws StandardException
StandardException - functionality not implmented
public void removeTruncationLWM(UUID name)
throws StandardException
StandardException - functionality not implmented
public ScanHandle openFlushedScan(DatabaseInstant i,
int groupsIWant)
throws StandardException
LogFactoryMT- read only
openFlushedScan in interface LogFactorygroupsIWant - - log record groups the scanner wants.
StandardException - functionality not implmented
public LogScan openForwardsScan(LogInstant startAt,
LogInstant stopAt)
throws StandardException
LogFactoryMT- read only
openForwardsScan in interface LogFactorystartAt - - 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
LogFactoryMT- read only
openForwardsFlushedScan in interface LogFactorystartAt - - 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 implmented
public void freezePersistentStore()
throws StandardException
freezePersistentStore in interface LogFactoryStandardException - Standard Cloudscape error policy
public void unfreezePersistentStore()
throws StandardException
unfreezePersistentStore in interface LogFactoryStandardException - Standard Cloudscape error policypublic boolean logArchived()
logArchived in interface LogFactorypublic void getLogFactoryProperties(PersistentSet set)
getLogFactoryProperties in interface LogFactorypublic StorageFile getLogDirectory()
LogFactory
getLogDirectory in interface LogFactorypublic java.lang.String getCanonicalLogPath()
LogFactory
getCanonicalLogPath in interface LogFactorypublic void enableLogArchiveMode()
enableLogArchiveMode in interface LogFactorypublic void disableLogArchiveMode()
disableLogArchiveMode in interface LogFactorypublic void deleteOnlineArchivedLogFiles()
deleteOnlineArchivedLogFiles in interface LogFactorypublic boolean inRFR()
inRFR in interface LogFactory
public void checkpointInRFR(LogInstant cinstant,
long redoLWM,
DataFactory df)
throws StandardException
checkpointInRFR in interface LogFactorycinstant - The LogInstant of the checkpointredoLWM - Redo Low Water Mark in the check point record
StandardException - - encounter exception during checkpoint
public boolean copyActiveLogFiles(java.io.File toDir)
throws StandardException
copyActiveLogFiles in interface LogFactoryStandardException
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||