Java Doc for RawStoreFactory.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » store » raw » 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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.derby.iapi.store.raw.RawStoreFactory

All known Subclasses:   org.apache.derby.impl.store.raw.RawStore,
RawStoreFactory
public interface RawStoreFactory extends Corruptable(Code)
RawStoreFactory implements a single unit of transactional storage. A RawStoreFactory contains Segments and Segments contain Containers.

Segments are identified by integer identifiers that are unique within a RawStoreFactory.

Containers are also identified by unique integer identifiers within a RawStoreFactory, but will overlap with segment identifiers.

LIMITS
This is a list of (hopefully) all limits within the raw store. Where a size has more than one limit all are documented (rather than just the most restrictive) so that the correct limit can be found if the most restictive is every removed.

  • Field -
    • Max length 2^31 - 1 (2147483647) -
  • Record -
    • Max number of fields 2^31 - 1 (2147483647) - from use of Object[] array to represent row, which can "only" have int sized number of array members.
  • Page -
  • Container -
  • Segment -
  • Raw Store -

Access and RawStore work together to provide the ACID properties of transactions. On a high level, RawStore deals with anything that directly impacts persistency. On a more detailed level, RawStore provides logging, rollback and recovery, data management on page, page allocation and deallocation, container allocation and deallocation.

RawStore is organized as 3 branches, transaction, data, and logging. These branches each have its own "factory", the transaction factory hands out transactions, the data factory hands out containers, and the log factory hands out logger (or log buffers) for transactions to write on. For a more detailed description on these factories, please see their corresponding javadocs. MT - Thread Safe
See Also:   ContainerHandle
See Also:   



Field Summary
final public static  StringCONTAINER_INITIAL_PAGES
     Property name for container which attempts to be created with an initial size of this many pages.
 StringCRYPTO_OLD_EXTERNAL_KEY_VERIFY_FILE
     A File used to save the old copy of the verify key (Attribute.CRYPTO_EXTERNAL_KEY_VERIFY_FILE) file during re-encryption of the database.
final public static  StringDATA_ENCRYPT_ALGORITHM_VERSION
    
final public static  intDB_ENCRYPTION_IN_CLEANUP
    
final public static  intDB_ENCRYPTION_IN_PROGRESS
    
final public static  intDB_ENCRYPTION_IN_UNDO
    
final public static  StringDB_ENCRYPTION_STATUS
    
final public static  intDEFAULT_ENCRYPTION_BLOCKSIZE
     default encryption block size In old existing databases (ie 5.1.x), the default encryption block size used is 8.
final public static  intDERBY_STORE_MAJOR_VERSION_10
    
final public static  intDERBY_STORE_MINOR_VERSION_1
    
final public static  intDERBY_STORE_MINOR_VERSION_2
    
final public static  StringENCRYPTED_KEY
     If dataEncryption is true, store the encrypted key in services.properties file.
final public static  intENCRYPTION_ALIGNMENT
     encryption alignment requirement.
final public static  StringENCRYPTION_BLOCKSIZE
    
final public static  StringKEEP_TRANSACTION_LOG
     for debugging, keep all transaction logs intact.
final public static  StringLOG_ENCRYPT_ALGORITHM_VERSION
     Store the encryption scheme used for logging This will allow for any future changes in encryption schemes of logs This variable has been introduced in version 10 and value starts at 1.
final public static  shortMAX_CONTAINER_INITIAL_PAGES
    
final public static  intMINIMUM_RECORD_SIZE_DEFAULT
     Default value for MINIMUM_RECORD_SIZE_PARAMETER for heap tables that allow overflow.
final public static  intMINIMUM_RECORD_SIZE_MINIMUM
     Minimum value for MINIMUM_RECORD_SIZE_PARAMETER (1).
final public static  StringMINIMUM_RECORD_SIZE_PARAMETER
     Property name for the default minimum record size to be used in the storage area.
final public static  StringMODULE
    
final public static  StringOLD_ENCRYPTED_KEY
     When the datbase is getting re-encrypted old encrypted key is stored in the service.properties until re-encyrption successfully completes or rolled back.
final public static  intPAGE_CACHE_SIZE_DEFAULT
     Default value for PAGE_CACHE_SIZE_PARAMETER (1000).
final public static  intPAGE_CACHE_SIZE_MAXIMUM
     Maximum page cache size we will accept (MAXINT).
final public static  intPAGE_CACHE_SIZE_MINIMUM
     Minimum page cache size we will accept (40).
final public static  StringPAGE_CACHE_SIZE_PARAMETER
     Property name for the page cache size to be used in the storage area.
final public static  StringPAGE_RESERVED_SPACE_PARAMETER
     Property name for percentage of space to leave free on page for updates.
final public static  StringPAGE_RESERVED_ZERO_SPACE_STRING
    
final public static  StringPAGE_REUSABLE_RECORD_ID
     Property name for container which reuses recordId when a page is reused.
final public static  intPAGE_SIZE_DEFAULT
     Default value for PAGE_SIZE_PARAMETER (4096).
final public static  intPAGE_SIZE_MINIMUM
     Minimum page size we will accept (1024).
final public static  StringPAGE_SIZE_STRING
    
final public static  StringPATCH_INITPAGE_RECOVER_ERROR
     The following is a to enable patch for databases with recovery errors during redo of InitPage.
final public static  StringPRE_ALLOCATE_PAGE
    
final public static  intSTREAM_FILE_BUFFER_SIZE_DEFAULT
     Default value for STREAM_FILE_BUFFER_SIZE_PARAMETER (16384).
final public static  intSTREAM_FILE_BUFFER_SIZE_MAXIMUM
     Maximum stream file buffer size we will accept (MAXINT).
final public static  intSTREAM_FILE_BUFFER_SIZE_MINIMUM
     Minimum stream file buffer size we will accept (1024).
final public static  StringSTREAM_FILE_BUFFER_SIZE_PARAMETER
     Property name for buffer size to be used in the stream file container.


Method Summary
public  voidbackup(String backupDir, boolean wait)
     Backup the database to backupDir.
public  voidbackupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles, boolean wait)
     Backup the database to a backup directory and enable the log archive mode that will keep the archived log files required for roll-forward from this version backup.
Parameters:
  backupDir - the directory name where the database backup should go.
public  SerializablechangeBootPassword(Properties properties, Serializable changePassword)
     Change the boot password.
public  voidcheckpoint()
     Try to checkpoint the database to minimize recovery time.
public  voidcreateFinished()
    
public  intdecrypt(byte[] ciphertext, int offset, int length, byte[] cleartext, int outputOffset)
     Decrypt cleartext from ciphertext.
public  voiddisableLogArchiveMode(boolean deleteOnlineArchivedLogFiles)
     disables the log archival process, i.e No old log files will be kept around for a roll-forward recovery.
public  intencrypt(byte[] cleartext, int offset, int length, byte[] ciphertext, int outputOffset, boolean newEngine)
     Encrypt cleartext into ciphertext.
public  TransactionfindUserTransaction(ContextManager contextMgr, String transName)
     Find a user transaction in the context manager, which must be the current context manager.
public  voidfreeze()
     Freeze the database temporarily so a backup can be taken.
public  voidfreezePersistentStore()
     Freeze the database from altering any persistent storage.
public  DaemonServicegetDaemon()
     If this raw store has a daemon that services its need, return the daemon.
public  StringgetDataFactoryModule()
    
public  intgetEncryptionBlockSize()
    
public  LockFactorygetLockFactory()
     Get the LockFactory to use with this store.
public  StringgetLogFactoryModule()
    
 longgetMaxContainerId()
     Return an id which can be used to create a container.

Return an id number with is greater than any existing container in the current database.

public  voidgetRawStoreProperties(PersistentSet tc)
    
public  StringgetTransactionFactoryModule()
    
public  TransactionInfo[]getTransactionInfo()
    
public  ObjectgetXAResourceManager()
    
public  TransactionFactorygetXactFactory()
     Get the Transaction Factory to use with this store.
public  voididle()
     Idle the raw store as much as possible.
public  booleanisReadOnly()
     Is the store read-only.
 ScanHandleopenFlushedScan(DatabaseInstant start, int groupsIWant)
     Get a flushed scan.
public  intrandom()
     Returns a secure random number for this raw store - if database is not encrypted, returns 0.
public  TransactionstartGlobalTransaction(ContextManager contextMgr, int format_id, byte[] global_id, byte[] local_id)
     Create a global user transaction, almost all work within the raw store is performed in the context of a transaction.

The (format_id, global_id, branch_id) triplet is meant to come exactly from a javax.transaction.xa.Xid.

public  TransactionstartInternalTransaction(ContextManager contextMgr)
     Create an internal transaction.
public  TransactionstartNestedReadOnlyUserTransaction(Object compatibilitySpace, ContextManager contextMgr, String transName)
     Create a nested user transaction, almost all work within the raw store is performed in the context of a transaction.

A nested user transaction is exactly the same as a user transaction, except that one can specify a compatibility space to associate with the transaction. Starting a transaction always performs the following steps.

  1. Create an raw store transaction context
  2. Create a new idle transaction and then link it to the context. Only one user transaction and one nested user transaction can be active in a context at any one time. After a commit the transaction may be re-used.

    Raw Store Transaction Context Behaviour
    The cleanupOnError() method of this context behaves as follows:

    • If error is an instance of StandardException that has a severity less than ExceptionSeverity.TRANSACTION_SEVERITY then no action is taken.
    • If error is an instance of StandardException that has a severity equal to ExceptionSeverity.TRANSACTION_SEVERITY then the context's transaction is aborted, and the transaction returned to the idle state.
public  TransactionstartNestedUpdateUserTransaction(ContextManager contextMgr, String transName)
     Create a nested user transaction, almost all work within the raw store is performed in the context of a transaction.

A nested user transaction is exactly the same as a user transaction, except that one can specify a compatibility space to associate with the transaction. Starting a transaction always performs the following steps.

  1. Create an raw store transaction context
  2. Create a new idle transaction and then link it to the context. Only one user transaction and one nested user transaction can be active in a context at any one time. After a commit the transaction may be re-used.

    Raw Store Transaction Context Behaviour
    The cleanupOnError() method of this context behaves as follows:

    • If error is an instance of StandardException that has a severity less than ExceptionSeverity.TRANSACTION_SEVERITY then no action is taken.
    • If error is an instance of StandardException that has a severity equal to ExceptionSeverity.TRANSACTION_SEVERITY then the context's transaction is aborted, and the transaction returned to the idle state.
public  TransactionstartTransaction(ContextManager contextMgr, String transName)
     Create a user transaction, almost all work within the raw store is performed in the context of a transaction.

Starting a transaction always performs the following steps.

  1. Create an raw store transaction context
  2. Create a new idle transaction and then link it to the context. Only one user transaction and one nested user transaction can be active in a context at any one time. After a commit the transaction may be re-used.

    Raw Store Transaction Context Behaviour
    The cleanupOnError() method of this context behaves as follows:

    • If error is an instance of StandardException that has a severity less than ExceptionSeverity.TRANSACTION_SEVERITY then no action is taken.
    • If error is an instance of StandardException that has a severity equal to ExceptionSeverity.TRANSACTION_SEVERITY then the context's transaction is aborted, and the transaction returned to the idle state.
    • If error is an instance of StandardException that has a severity greater than ExceptionSeverity.TRANSACTION_SEVERITY then the context's transaction is aborted, the transaction closed, and the context is popped off the stack.
    • If error is not an instance of StandardException then the context's transaction is aborted, the transaction closed, and the context is popped off the stack.

    Parameters:
      contextMgr - is the context manager to use.
public  voidunfreeze()
     Unfreeze the database after a backup has been taken.
public  voidunfreezePersistentStore()
     Unfreeze the database, persistent storage can now be altered.

Field Detail
CONTAINER_INITIAL_PAGES
final public static String CONTAINER_INITIAL_PAGES(Code)
Property name for container which attempts to be created with an initial size of this many pages. Defaults to 1 page.
All containers are guarenteed to be created with at least 1 page, if this property is set, it will attempt to allocate CONTAINER_INITIAL_PAGES, but with no guarentee. CONTAIENR_INITIAL_PAGES legally ranges from 1 to MAX_CONTAINER_INITIAL_PAGES. Values < 1 will be set to 1 and values > MAX_CONTAINER_INITIAL_PAGES will be set to MAX_CONTAINER_INITIAL_PAGES This property should only be set in the PROPERTIES list in a CREATE TABLE or CREATE INDEX statement. The global setting of this property has no effect.



CRYPTO_OLD_EXTERNAL_KEY_VERIFY_FILE
String CRYPTO_OLD_EXTERNAL_KEY_VERIFY_FILE(Code)
A File used to save the old copy of the verify key (Attribute.CRYPTO_EXTERNAL_KEY_VERIFY_FILE) file during re-encryption of the database.



DATA_ENCRYPT_ALGORITHM_VERSION
final public static String DATA_ENCRYPT_ALGORITHM_VERSION(Code)
This variable is used to store the encryption scheme to allow for any future changes in encryption schemes of data This property has been introduced in version 10 Value starts at 1



DB_ENCRYPTION_IN_CLEANUP
final public static int DB_ENCRYPTION_IN_CLEANUP(Code)



DB_ENCRYPTION_IN_PROGRESS
final public static int DB_ENCRYPTION_IN_PROGRESS(Code)



DB_ENCRYPTION_IN_UNDO
final public static int DB_ENCRYPTION_IN_UNDO(Code)



DB_ENCRYPTION_STATUS
final public static String DB_ENCRYPTION_STATUS(Code)



DEFAULT_ENCRYPTION_BLOCKSIZE
final public static int DEFAULT_ENCRYPTION_BLOCKSIZE(Code)
default encryption block size In old existing databases (ie 5.1.x), the default encryption block size used is 8. Do not change this value unless you account for downgrade issues



DERBY_STORE_MAJOR_VERSION_10
final public static int DERBY_STORE_MAJOR_VERSION_10(Code)
Derby 10 Store Major version



DERBY_STORE_MINOR_VERSION_1
final public static int DERBY_STORE_MINOR_VERSION_1(Code)
Derby Store Minor Version (1) *



DERBY_STORE_MINOR_VERSION_2
final public static int DERBY_STORE_MINOR_VERSION_2(Code)
Derby Store Minor Version (2) *



ENCRYPTED_KEY
final public static String ENCRYPTED_KEY(Code)
If dataEncryption is true, store the encrypted key in services.properties file. It is really the encrypted key, but the property key is called the encryptedBootPassword.



ENCRYPTION_ALIGNMENT
final public static int ENCRYPTION_ALIGNMENT(Code)
encryption alignment requirement.



ENCRYPTION_BLOCKSIZE
final public static String ENCRYPTION_BLOCKSIZE(Code)
encryption block size used during creation of encrypted database This property is not set by the user; it is set by the engine when RawStore boots up during creation of an encrypted database



KEEP_TRANSACTION_LOG
final public static String KEEP_TRANSACTION_LOG(Code)
for debugging, keep all transaction logs intact.



LOG_ENCRYPT_ALGORITHM_VERSION
final public static String LOG_ENCRYPT_ALGORITHM_VERSION(Code)
Store the encryption scheme used for logging This will allow for any future changes in encryption schemes of logs This variable has been introduced in version 10 and value starts at 1.



MAX_CONTAINER_INITIAL_PAGES
final public static short MAX_CONTAINER_INITIAL_PAGES(Code)
Maximum number of initial pages when a container is created



MINIMUM_RECORD_SIZE_DEFAULT
final public static int MINIMUM_RECORD_SIZE_DEFAULT(Code)
Default value for MINIMUM_RECORD_SIZE_PARAMETER for heap tables that allow overflow. By setting minimumRecordSize to 12 bytes, we guarantee there is enough space to update the row even there is not enough space on the page. The 12 bytes will guarantee there is room for an overflow pointer (page + id).



MINIMUM_RECORD_SIZE_MINIMUM
final public static int MINIMUM_RECORD_SIZE_MINIMUM(Code)
Minimum value for MINIMUM_RECORD_SIZE_PARAMETER (1).



MINIMUM_RECORD_SIZE_PARAMETER
final public static String MINIMUM_RECORD_SIZE_PARAMETER(Code)
Property name for the default minimum record size to be used in the storage area. Minimum record size is the minimum number of bytes that a record will reserve on disk.



MODULE
final public static String MODULE(Code)
module name



OLD_ENCRYPTED_KEY
final public static String OLD_ENCRYPTED_KEY(Code)
When the datbase is getting re-encrypted old encrypted key is stored in the service.properties until re-encyrption successfully completes or rolled back. It is really the old encryptedkey, but the property key is called the OldEncryptedBootPassword.



PAGE_CACHE_SIZE_DEFAULT
final public static int PAGE_CACHE_SIZE_DEFAULT(Code)
Default value for PAGE_CACHE_SIZE_PARAMETER (1000).



PAGE_CACHE_SIZE_MAXIMUM
final public static int PAGE_CACHE_SIZE_MAXIMUM(Code)
Maximum page cache size we will accept (MAXINT).



PAGE_CACHE_SIZE_MINIMUM
final public static int PAGE_CACHE_SIZE_MINIMUM(Code)
Minimum page cache size we will accept (40).



PAGE_CACHE_SIZE_PARAMETER
final public static String PAGE_CACHE_SIZE_PARAMETER(Code)
Property name for the page cache size to be used in the storage area. Equal to 'derby.storage.pageCacheSize'



PAGE_RESERVED_SPACE_PARAMETER
final public static String PAGE_RESERVED_SPACE_PARAMETER(Code)
Property name for percentage of space to leave free on page for updates.



PAGE_RESERVED_ZERO_SPACE_STRING
final public static String PAGE_RESERVED_ZERO_SPACE_STRING(Code)



PAGE_REUSABLE_RECORD_ID
final public static String PAGE_REUSABLE_RECORD_ID(Code)
Property name for container which reuses recordId when a page is reused. Defaults to false, which means recordId is never reused. This property should NOT be set by the end user, only Access should set it for special conglomerates which does not count on permanant unique recordIds for all records.



PAGE_SIZE_DEFAULT
final public static int PAGE_SIZE_DEFAULT(Code)
Default value for PAGE_SIZE_PARAMETER (4096).



PAGE_SIZE_MINIMUM
final public static int PAGE_SIZE_MINIMUM(Code)
Minimum page size we will accept (1024).



PAGE_SIZE_STRING
final public static String PAGE_SIZE_STRING(Code)



PATCH_INITPAGE_RECOVER_ERROR
final public static String PATCH_INITPAGE_RECOVER_ERROR(Code)
The following is a to enable patch for databases with recovery errors during redo of InitPage. If this property is set and the page on the disk is corrupted and is getting exceptions like invalid page format ids, we cook up the page during the recovery time. We have seen this kind of problem with 1.5.1 databases from customer Tridium ( Bug no: 3813). This patch needs to be kept unless we find the problem is during recovery process. If we discover this problem is actaully happening at the recovery then this patch should be backed out.



PRE_ALLOCATE_PAGE
final public static String PRE_ALLOCATE_PAGE(Code)
Property name for the number of pages we try to pre-allocate in one /** synchronous I/O



STREAM_FILE_BUFFER_SIZE_DEFAULT
final public static int STREAM_FILE_BUFFER_SIZE_DEFAULT(Code)
Default value for STREAM_FILE_BUFFER_SIZE_PARAMETER (16384).



STREAM_FILE_BUFFER_SIZE_MAXIMUM
final public static int STREAM_FILE_BUFFER_SIZE_MAXIMUM(Code)
Maximum stream file buffer size we will accept (MAXINT).



STREAM_FILE_BUFFER_SIZE_MINIMUM
final public static int STREAM_FILE_BUFFER_SIZE_MINIMUM(Code)
Minimum stream file buffer size we will accept (1024).



STREAM_FILE_BUFFER_SIZE_PARAMETER
final public static String STREAM_FILE_BUFFER_SIZE_PARAMETER(Code)
Property name for buffer size to be used in the stream file container. Equal to 'derby.storage.streamFileBufferSize'





Method Detail
backup
public void backup(String backupDir, boolean wait) throws StandardException(Code)
Backup the database to backupDir.

Please see cloudscape on line documentation on backup and restore.
Parameters:
  backupDir - the name of the directory where the backup should bestored.
Parameters:
  wait - if true, waits for all the backup blocking operations in progress to finish.
exception:
  StandardException - Thrown on error




backupAndEnableLogArchiveMode
public void backupAndEnableLogArchiveMode(String backupDir, boolean deleteOnlineArchivedLogFiles, boolean wait) throws StandardException(Code)
Backup the database to a backup directory and enable the log archive mode that will keep the archived log files required for roll-forward from this version backup.
Parameters:
  backupDir - the directory name where the database backup should go. This directory will be created if not itdoes not exist.
Parameters:
  deleteOnlineArchivedLogFiles - If true deletes online archived logfiles that exist before this backup,delete will occur only after backupis complete.
Parameters:
  wait - if true, waits for all the backup blocking operations in progress to finish.
exception:
  StandardException - Thrown on error



changeBootPassword
public Serializable changeBootPassword(Properties properties, Serializable changePassword) throws StandardException(Code)
Change the boot password. Return the encrypted form of the secret key. The new value must be a String of the form: oldBootPassword, newBootPassword
exception:
  StandardException - Standard Cloudscape Error Policy



checkpoint
public void checkpoint() throws StandardException(Code)
Try to checkpoint the database to minimize recovery time. The raw store does not guarentee that a checkpoint will indeed have happened by the time this routine returns.
exception:
  StandardException - Standard Cloudscape error policy



createFinished
public void createFinished() throws StandardException(Code)



decrypt
public int decrypt(byte[] ciphertext, int offset, int length, byte[] cleartext, int outputOffset) throws StandardException(Code)
Decrypt cleartext from ciphertext.
See Also:   org.apache.derby.iapi.services.crypto.CipherProvider.decrypt
exception:
  StandardException - Standard Cloudscape Error Policy



disableLogArchiveMode
public void disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles) throws StandardException(Code)
disables the log archival process, i.e No old log files will be kept around for a roll-forward recovery.
Parameters:
  deleteOnlineArchivedLogFiles - If true deletes all online archivedlog files that exist before this call immediately; Only restore thatcan be performed after disabling log archive mode is version recovery.
exception:
  StandardException - Thrown on error



encrypt
public int encrypt(byte[] cleartext, int offset, int length, byte[] ciphertext, int outputOffset, boolean newEngine) throws StandardException(Code)
Encrypt cleartext into ciphertext.
See Also:   org.apache.derby.iapi.services.crypto.CipherProvider.encrypt
exception:
  StandardException - Standard Cloudscape Error Policy



findUserTransaction
public Transaction findUserTransaction(ContextManager contextMgr, String transName) throws StandardException(Code)
Find a user transaction in the context manager, which must be the current context manager. If a user transaction does not already exist, then create one @see #startTransaction
Parameters:
  contextMgr - the context manager to use. An exception will be thrown if context is not the current context.
Parameters:
  transName - If a new transaction is started, it will be given this name.The name is displayed in the transactiontable VTI.
exception:
  StandardException - Standard Cloudscape error policy
See Also:   RawStoreFactory.startTransaction



freeze
public void freeze() throws StandardException(Code)
Freeze the database temporarily so a backup can be taken.

Please see cloudscape on line documentation on backup and restore.
exception:
  StandardException - Thrown on error




freezePersistentStore
public void freezePersistentStore() throws StandardException(Code)
Freeze the database from altering any persistent storage.
exception:
  StandardException - Standard cloudscape exception policy.



getDaemon
public DaemonService getDaemon()(Code)
If this raw store has a daemon that services its need, return the daemon. If not, return null



getDataFactoryModule
public String getDataFactoryModule()(Code)



getEncryptionBlockSize
public int getEncryptionBlockSize()(Code)
Returns the encryption block size used during creation of the encrypted database



getLockFactory
public LockFactory getLockFactory()(Code)
Get the LockFactory to use with this store.



getLogFactoryModule
public String getLogFactoryModule()(Code)



getMaxContainerId
long getMaxContainerId() throws StandardException(Code)
Return an id which can be used to create a container.

Return an id number with is greater than any existing container in the current database. Caller will use this to allocate future container numbers - most likely caching the value and then incrementing it as it is used.

The an id which can be used to create a container.
exception:
  StandardException - Standard exception policy.




getRawStoreProperties
public void getRawStoreProperties(PersistentSet tc) throws StandardException(Code)
Get JBMS properties relavent to raw store
exception:
  StandardException - Standard cloudscape exception policy.



getTransactionFactoryModule
public String getTransactionFactoryModule()(Code)



getTransactionInfo
public TransactionInfo[] getTransactionInfo()(Code)

See Also:   org.apache.derby.iapi.store.access.AccessFactory.getTransactionInfo



getXAResourceManager
public Object getXAResourceManager() throws StandardException(Code)



getXactFactory
public TransactionFactory getXactFactory()(Code)
Get the Transaction Factory to use with this store.



idle
public void idle() throws StandardException(Code)
Idle the raw store as much as possible.
exception:
  StandardException - Standard Cloudscape error policy



isReadOnly
public boolean isReadOnly()(Code)
Is the store read-only.



openFlushedScan
ScanHandle openFlushedScan(DatabaseInstant start, int groupsIWant) throws StandardException(Code)
Get a flushed scan.
Parameters:
  start - The instant for the beginning of the scan.
Parameters:
  groupsIWant - log record groups the caller wants to scan.
exception:
  StandardException - StandardCloudscape error policy



random
public int random()(Code)
Returns a secure random number for this raw store - if database is not encrypted, returns 0.



startGlobalTransaction
public Transaction startGlobalTransaction(ContextManager contextMgr, int format_id, byte[] global_id, byte[] local_id) throws StandardException(Code)
Create a global user transaction, almost all work within the raw store is performed in the context of a transaction.

The (format_id, global_id, branch_id) triplet is meant to come exactly from a javax.transaction.xa.Xid. We don't use Xid so that the system can be delivered on a non-1.2 vm system and not require the javax classes in the path.

Starting a transaction always performs the following steps.

  1. Create an raw store transaction context
  2. Create a new idle transaction and then link it to the context. Only one user transaction can be active in a context at any one time. After a commit the transaction may be re-used.

    Raw Store Transaction Context Behaviour
    The cleanupOnError() method of this context behaves as follows:

    • If error is an instance of StandardException that has a severity less than ExceptionSeverity.TRANSACTION_SEVERITY then no action is taken.
    • If error is an instance of StandardException that has a severity equal to ExceptionSeverity.TRANSACTION_SEVERITY then the context's transaction is aborted, and the transaction returned to the idle state.
    • If error is an instance of StandardException that has a severity greater than ExceptionSeverity.TRANSACTION_SEVERITY then the context's transaction is aborted, the transaction closed, and the context is popped off the stack.
    • If error is not an instance of StandardException then the context's transaction is aborted, the transaction closed, and the context is popped off the stack.

    Parameters:
      contextMgr - is the context manager to use. An exception will bethrown if context is not the current context.
    Parameters:
      format_id - the format id part of the Xid - ie. Xid.getFormatId().
    Parameters:
      global_id - the global transaction identifier part of XID - ie.Xid.getGlobalTransactionId().
    Parameters:
      local_id - The branch qualifier of the Xid - ie. Xid.getBranchQaulifier()
    exception:
      StandardException - Standard Cloudscape error policy
    See Also:   Transaction
    See Also:   org.apache.derby.iapi.services.context.Context
    See Also:   StandardException



startInternalTransaction
public Transaction startInternalTransaction(ContextManager contextMgr) throws StandardException(Code)
Create an internal transaction.

Starting an internal transaction always performs the following steps.

  1. Create an raw store internal transaction context
  2. Create a new idle internal transaction and then link it to the context.

    AN internal transaction is identical to a user transaction with the exception that

    • Logical operations are not supported
    • Savepoints are not supported
    • Containers are not closed when commit() is called.
    • Pages are not unlatched (since containers are not closed) when commit() is called.
    • During recovery time internal transactions are rolled back before user transactions.
    Only one internal transaction can be active in a context at any one time. After a commit the transaction may be re-used.

    Raw Store Internal Transaction Context Behaviour
    The cleanupOnError() method of this context behaves as follows:

    • If error is an instance of StandardException that has a severity less than ExceptionSeverity.TRANSACTION_SEVERITY then the internal transaction is aborted, the internal transaction is closed, the context is popped off the stack, and an exception of severity Transaction exception is re-thrown.
    • If error is an instance of StandardException that has a severity greater than or equal to ExceptionSeverity.TRANSACTION_SEVERITY then the context's internal transaction is aborted, the internal transaction is closed and the context is popped off the stack.
    • If error is not an instance of StandardException then the context's internal transaction is aborted, the internal transaction is closed and the context is popped off the stack.

    exception:
      StandardException - Standard Cloudscape error policy
    See Also:   Transaction
    See Also:   org.apache.derby.iapi.services.context.Context
    See Also:   StandardException



startNestedReadOnlyUserTransaction
public Transaction startNestedReadOnlyUserTransaction(Object compatibilitySpace, ContextManager contextMgr, String transName) throws StandardException(Code)
Create a nested user transaction, almost all work within the raw store is performed in the context of a transaction.

A nested user transaction is exactly the same as a user transaction, except that one can specify a compatibility space to associate with the transaction. Starting a transaction always performs the following steps.

  1. Create an raw store transaction context
  2. Create a new idle transaction and then link it to the context. Only one user transaction and one nested user transaction can be active in a context at any one time. After a commit the transaction may be re-used.

    Raw Store Transaction Context Behaviour
    The cleanupOnError() method of this context behaves as follows:

    • If error is an instance of StandardException that has a severity less than ExceptionSeverity.TRANSACTION_SEVERITY then no action is taken.
    • If error is an instance of StandardException that has a severity equal to ExceptionSeverity.TRANSACTION_SEVERITY then the context's transaction is aborted, and the transaction returned to the idle state. If a user transaction exists on the context stack then that transaction is aborted also.
    • If error is an instance of StandardException that has a severity greater than ExceptionSeverity.TRANSACTION_SEVERITY then the context's transaction is aborted, the transaction closed, and the context is popped off the stack.
    • If error is not an instance of StandardException then the context's transaction is aborted, the transaction closed, and the context is popped off the stack.

    Parameters:
      compatibilitySpace - compatibility space to use for locks.
    Parameters:
      contextMgr - is the context manager to use. An exception will bethrown if context is not the current context.
    Parameters:
      transName - is the name of the transaction. This name will be displayed by the transactiontable VTI.
    exception:
      StandardException - Standard Cloudscape error policy
    See Also:   Transaction
    See Also:   org.apache.derby.iapi.services.context.Context
    See Also:   StandardException



startNestedUpdateUserTransaction
public Transaction startNestedUpdateUserTransaction(ContextManager contextMgr, String transName) throws StandardException(Code)
Create a nested user transaction, almost all work within the raw store is performed in the context of a transaction.

A nested user transaction is exactly the same as a user transaction, except that one can specify a compatibility space to associate with the transaction. Starting a transaction always performs the following steps.

  1. Create an raw store transaction context
  2. Create a new idle transaction and then link it to the context. Only one user transaction and one nested user transaction can be active in a context at any one time. After a commit the transaction may be re-used.

    Raw Store Transaction Context Behaviour
    The cleanupOnError() method of this context behaves as follows:

    • If error is an instance of StandardException that has a severity less than ExceptionSeverity.TRANSACTION_SEVERITY then no action is taken.
    • If error is an instance of StandardException that has a severity equal to ExceptionSeverity.TRANSACTION_SEVERITY then the context's transaction is aborted, and the transaction returned to the idle state. If a user transaction exists on the context stack then that transaction is aborted also.
    • If error is an instance of StandardException that has a severity greater than ExceptionSeverity.TRANSACTION_SEVERITY then the context's transaction is aborted, the transaction closed, and the context is popped off the stack.
    • If error is not an instance of StandardException then the context's transaction is aborted, the transaction closed, and the context is popped off the stack.

    Parameters:
      contextMgr - is the context manager to use. An exception will bethrown if context is not the current context.
    Parameters:
      transName - is the name of the transaction. This name will be displayed by the transactiontable VTI.
    exception:
      StandardException - Standard Cloudscape error policy
    See Also:   Transaction
    See Also:   org.apache.derby.iapi.services.context.Context
    See Also:   StandardException



startTransaction
public Transaction startTransaction(ContextManager contextMgr, String transName) throws StandardException(Code)
Create a user transaction, almost all work within the raw store is performed in the context of a transaction.

Starting a transaction always performs the following steps.

  1. Create an raw store transaction context
  2. Create a new idle transaction and then link it to the context. Only one user transaction and one nested user transaction can be active in a context at any one time. After a commit the transaction may be re-used.

    Raw Store Transaction Context Behaviour
    The cleanupOnError() method of this context behaves as follows:

    • If error is an instance of StandardException that has a severity less than ExceptionSeverity.TRANSACTION_SEVERITY then no action is taken.
    • If error is an instance of StandardException that has a severity equal to ExceptionSeverity.TRANSACTION_SEVERITY then the context's transaction is aborted, and the transaction returned to the idle state.
    • If error is an instance of StandardException that has a severity greater than ExceptionSeverity.TRANSACTION_SEVERITY then the context's transaction is aborted, the transaction closed, and the context is popped off the stack.
    • If error is not an instance of StandardException then the context's transaction is aborted, the transaction closed, and the context is popped off the stack.

    Parameters:
      contextMgr - is the context manager to use. An exception will bethrown if context is not the current context.
    Parameters:
      transName - is the name of the transaction. Thsi name will be displayedby the transactiontable VTI.
    exception:
      StandardException - Standard Cloudscape error policy
    See Also:   Transaction
    See Also:   org.apache.derby.iapi.services.context.Context
    See Also:   StandardException



unfreeze
public void unfreeze() throws StandardException(Code)
Unfreeze the database after a backup has been taken.

Please see cloudscape on line documentation on backup and restore.
exception:
  StandardException - Thrown on error




unfreezePersistentStore
public void unfreezePersistentStore() throws StandardException(Code)
Unfreeze the database, persistent storage can now be altered.
exception:
  StandardException - Standard cloudscape exception policy.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.