Java Doc for LogFactory.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » store » raw » log » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.iapi.store.raw.log 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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,
LogFactory
public interface LogFactory extends Corruptable(Code)


Field Summary
final public static  StringLOG_DIRECTORY_NAME
     The name of the default log directory.
final public static  StringMODULE
    
final public static  StringRT_READONLY
    
final public static  StringRUNTIME_ATTRIBUTES
     The name of a runtime property in the service set that defines any runtime attributes a log factory should have.


Method Summary
public  voidabortLogBackup()
    
public  booleancheckVersion(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  booleancheckpoint(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  voidcheckpointInRFR(LogInstant cinstant, long redoLWM, DataFactory df)
    
public  voiddeleteLogFileAfterCheckpointLogFile()
    
public  voiddeleteOnlineArchivedLogFiles()
    
public  voiddisableLogArchiveMode()
    
public  voidenableLogArchiveMode()
    
public  voidendLogBackup(File toDir)
    
public  voidflush(LogInstant where)
     Flush all unwritten log record up to the log instance indicated to disk.
public  voidfreezePersistentStore()
    
public  StringgetCanonicalLogPath()
     Return the canonical directory of the PARENT of the log directory.
 LogInstantgetFirstUnflushedInstant()
     Get the instant for the last record in the log.
public  StorageFilegetLogDirectory()
     Return the location of the log directory.
public  voidgetLogFactoryProperties(PersistentSet set)
    
public  LoggergetLogger()
    
public  booleaninRFR()
    
public  booleanisCheckpointInLastLogFile()
    
public  booleanlogArchived()
     checks whether is log archive mode is enabled or not.
 ScanHandleopenFlushedScan(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.

 LogScanopenForwardsFlushedScan(LogInstant startAt)
     Get a LogScan to scan flushed records from the log.

MT- read only
Parameters:
  startAt - - the LogInstant where we start our scan.

 LogScanopenForwardsScan(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  voidrecover(RawStoreFactory rawStoreFactory, DataFactory dataFactory, TransactionFactory transactionFactory)
     Recover the database to a consistent state using the log.
public  voidsetDatabaseEncrypted(boolean flushLog)
    
public  voidstartLogBackup(File toDir)
    
public  voidstartNewLogFile()
    
public  voidunfreezePersistentStore()
    

Field Detail
LOG_DIRECTORY_NAME
final public static String LOG_DIRECTORY_NAME(Code)
The name of the default log directory.



MODULE
final public static String MODULE(Code)



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.





Method Detail
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)



disableLogArchiveMode
public void disableLogArchiveMode() throws StandardException(Code)



enableLogArchiveMode
public void enableLogArchiveMode() throws StandardException(Code)



endLogBackup
public void endLogBackup(File toDir) throws StandardException(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.



getLogDirectory
public StorageFile getLogDirectory() throws StandardException(Code)
Return the location of the log directory.
exception:
  StandardException - Standard Cloudscape Error Policy



getLogFactoryProperties
public void getLogFactoryProperties(PersistentSet set) throws StandardException(Code)
Get JBMS properties relavent to the log factory
exception:
  StandardException - Standard Cloudscape Error Policy



getLogger
public Logger getLogger()(Code)



inRFR
public boolean inRFR()(Code)



isCheckpointInLastLogFile
public boolean isCheckpointInLastLogFile() throws StandardException(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.



setDatabaseEncrypted
public void setDatabaseEncrypted(boolean flushLog) throws StandardException(Code)



startLogBackup
public void startLogBackup(File toDir) throws StandardException(Code)



startNewLogFile
public void startNewLogFile() throws StandardException(Code)



unfreezePersistentStore
public void unfreezePersistentStore() throws StandardException(Code)
Can start making change to the persistent store again
exception:
  StandardException - Standard cloudscape exception policy.



w_w___w.__ja__v_a2___s___._c_o___m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.