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


java.lang.Object
   org.apache.derby.impl.store.access.RAMTransaction

RAMTransaction
public class RAMTransaction implements XATransactionController,TransactionManager(Code)


Field Summary
protected  RAMAccessManageraccessmanager
     The access manager this transaction is under.
protected  RAMTransactionContextcontext
     The context this transaction is being managed by.
protected  RAMTransactionparent_tran
     The parent transaction if this is a nested user transaction.
protected  Transactionrawtran
     The corresponding raw store transaction.
protected  HashtabletempCongloms
     Where to look for temporary conglomerates.

Constructor Summary
protected  RAMTransaction(RAMAccessManager myaccessmanager, Transaction theRawTran, RAMTransaction parent_transaction)
    
 RAMTransaction(RAMAccessManager myaccessmanager, RAMTransaction tc, int format_id, byte[] global_id, byte[] branch_id)
    
 RAMTransaction()
    

Method Summary
public  voidabort()
    
public  voidaddColumnToConglomerate(long conglomId, int column_id, Storable template_column)
     Add a column to a conglomerate.
public  voidaddPostCommitWork(Serviceable work)
     Add to the list of post commit work.

Add to the list of post commit work that may be processed after this transaction commits.

public  booleananyoneBlocked()
    
protected  voidcloseControllers(boolean closeHeldControllers)
    
public  voidcloseMe(ConglomerateController conglom_control)
     The ConglomerateController.close() method has been called on "conglom_control".

Take whatever cleanup action is appropriate to a closed conglomerateController.

public  voidcloseMe(SortController sort_control)
     The SortController.close() method has been called on "sort_control".

Take whatever cleanup action is appropriate to a closed sortController.

public  voidcloseMe(ScanManager scan)
     The ScanManager.close() method has been called on "scan".

Take whatever cleanup action is appropriate to a closed scan.

public  voidcommit()
    
public  DatabaseInstantcommitNoSync(int commitflag)
    
public  voidcompressConglomerate(long conglomId)
     Return free space from the conglomerate back to the OS.

Returns free space from the conglomerate back to the OS.

public  booleanconglomerateExists(long conglomId)
    
public  intcountOpens(int which_to_count)
     Report on the number of open conglomerates in the transaction.

There are 4 types of open "conglomerates" that can be tracked, those opened by each of the following: openConglomerate(), openScan(), openSort(), and openSortScan().

public  longcreateAndLoadConglomerate(String implementation, DataValueDescriptor[] template, ColumnOrdering[] columnOrder, Properties properties, int temporaryFlag, RowLocationRetRowSource rowSource, long[] rowCount)
     Create a conglomerate and populate it with rows from rowSource.
public  BackingStoreHashtablecreateBackingStoreHashtableFromScan(long conglomId, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier, DataValueDescriptor[] stopKeyValue, int stopSearchOperator, long max_rowcnt, int[] key_column_numbers, boolean remove_duplicates, long estimated_rowcnt, long max_inmemory_rowcnt, int initialCapacity, float loadFactor, boolean collect_runtimestats, boolean skipNullKeyColumns)
     Create a BackingStoreHashtable which contains all rows that qualify for the described scan.
public  longcreateConglomerate(String implementation, DataValueDescriptor[] template, ColumnOrdering[] columnOrder, Properties properties, int temporaryFlag)
     Create a new conglomerate.
public  longcreateSort(Properties implParameters, DataValueDescriptor[] template, ColumnOrdering columnOrdering, SortObserver sortObserver, boolean alreadyInOrder, long estimatedRows, int estimatedRowSize)
    
public  ObjectcreateXATransactionFromLocalTransaction(int format_id, byte[] global_id, byte[] branch_id)
     Convert a local transaction to a global transaction.

Get a transaction controller with which to manipulate data within the access manager.

public  StringdebugOpened()
     Return a string with debug information about opened congloms/scans/sorts.
public  GroupFetchScanControllerdefragmentConglomerate(long conglomId, boolean online, boolean hold, int open_mode, int lock_level, int isolation_level)
     Compress table in place.

Returns a GroupFetchScanController which can be used to move rows around in a table, creating a block of free pages at the end of the table.

public  voiddestroy()
    
public  voiddropConglomerate(long conglomId)
    
public  voiddropSort(long sortid)
     Drop a sort.
public  booleanfetchMaxOnBtree(long conglomId, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] fetchRow)
     Retrieve the maximum value row in an ordered conglomerate.

Returns true and fetches the rightmost row of an ordered conglomerate into "fetchRow" if there is at least one row in the conglomerate.

public  longfindConglomid(long container_id)
    
public  longfindContainerid(long conglom_id)
    
public  AccessFactorygetAccessManager()
     Get reference to access factory which started this transaction.
public  StringgetActiveStateTxIdString()
     Get string id of the transaction that would be when the Transaction is IN active state.
public  long[]getCacheStats(String cacheName)
    
public  ContextManagergetContextManager()
     Get the context manager that the transaction was created with.
public  DynamicCompiledOpenConglomInfogetDynamicCompiledConglomInfo(long conglomId)
     Return dynamic information about the conglomerate to be dynamically reused in repeated execution of a statement.

The dynamic info is a set of variables to be used in a given ScanController or ConglomerateController.

public  FileResourcegetFileHandler()
    
public  TransactionManagergetInternalTransaction()
     Get an Internal transaction.

Start an internal transaction.

public  ObjectgetLockObject()
     Return an object that when used as the compatability space *and* group for a lock request, guarantees that the lock will be removed on a commit or an abort.
public  PropertiesgetProperties()
    
public  SerializablegetProperty(String key)
    
public  SerializablegetPropertyDefault(String key)
    
public  TransactiongetRawStoreXact()
     Get the Transaction from the Transaction manager.

Access methods often need direct access to the "Transaction" - ie.

public  StaticCompiledOpenConglomInfogetStaticCompiledConglomInfo(long conglomId)
     Return static information about the conglomerate to be included in a a compiled plan.

The static info would be valid until any ddl was executed on the conglomid, and would be up to the caller to throw away when that happened.

public  StringgetTransactionIdString()
     Get string id of the transaction.

This transaction "name" will be the same id which is returned in the TransactionInfo information, used by the lock and transaction vti's to identify transactions.

Although implementation specific, the transaction id is usually a number which is bumped every time a commit or abort is issued.

For now return the toString() method, which does what we want.

public  PropertiesgetUserCreateConglomPropList()
     A superset of properties that "users" can specify.

A superset of properties that "users" (ie.

protected  voidinvalidateConglomerateCache()
     Invalidate the conglomerate cache, if necessary.
public  booleanisGlobal()
     Reveals whether the transaction is a global or local transaction.
public  booleanisIdle()
     Reveals whether the transaction has ever read or written data.
public  booleanisPristine()
     Reveals whether the transaction is currently pristine.
public  longloadConglomerate(long conglomId, boolean createConglom, RowLocationRetRowSource rowSource)
     Bulk load into the conglomerate.
public  voidloadConglomerate(long conglomId, RowLocationRetRowSource rowSource)
     Use this for incremental load in the future.
public  voidlogAndDo(Loggable operation)
     Log an operation and then action it in the context of this transaction.
public  ConglomerateControlleropenCompiledConglomerate(boolean hold, int open_mode, int lock_level, int isolation_level, StaticCompiledOpenConglomInfo static_info, DynamicCompiledOpenConglomInfo dynamic_info)
    
public  ScanControlleropenCompiledScan(boolean hold, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier, DataValueDescriptor[] stopKeyValue, int stopSearchOperator, StaticCompiledOpenConglomInfo static_info, DynamicCompiledOpenConglomInfo dynamic_info)
    
public  ConglomerateControlleropenConglomerate(long conglomId, boolean hold, int open_mode, int lock_level, int isolation_level)
    
public  GroupFetchScanControlleropenGroupFetchScan(long conglomId, boolean hold, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier, DataValueDescriptor[] stopKeyValue, int stopSearchOperator)
    
public  ScanControlleropenScan(long conglomId, boolean hold, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier, DataValueDescriptor[] stopKeyValue, int stopSearchOperator)
    
public  SortControlleropenSort(long id)
    
public  SortCostControlleropenSortCostController(Properties implParameters)
     Return an open SortCostController.
public  RowLocationRetRowSourceopenSortRowSource(long id)
    
public  ScanControlleropenSortScan(long id, boolean hold)
    
public  StoreCostControlleropenStoreCost(long conglomId)
     Return an open StoreCostController for the given conglomid.
public  booleanpropertyDefaultIsVisible(String key)
    
public  voidpurgeConglomerate(long conglomId)
     Purge all committed deleted rows from the conglomerate.
public  longrecreateAndLoadConglomerate(String implementation, boolean recreate_ifempty, DataValueDescriptor[] template, ColumnOrdering[] columnOrder, Properties properties, int temporaryFlag, long orig_conglomId, RowLocationRetRowSource rowSource, long[] rowCount)
     recreate a conglomerate and populate it with rows from rowSource.
public  intreleaseSavePoint(String name, Object kindOfSavepoint)
    
public  voidresetCacheStats(String cacheName)
    
public  introllbackToSavePoint(String name, boolean close_controllers, Object kindOfSavepoint)
    
public  voidsaveScanPositions(Conglomerate conglom, Page page)
     Do work necessary to maintain the current position in all the scans.
 voidsetContext(RAMTransactionContext rtc)
    
public  voidsetProperty(String key, Serializable value, boolean dbOnlyProperty)
    
public  voidsetPropertyDefault(String key, Serializable value)
    
public  intsetSavePoint(String name, Object kindOfSavepoint)
    
public  TransactionControllerstartNestedUserTransaction(boolean readOnly)
     Get an nested user transaction.

A nested user can be used exactly as any other TransactionController, except as follows.

public  StringtoString()
    
public  voidxa_commit(boolean onePhase)
     This method is called to commit the current XA global transaction.
public  intxa_prepare()
     This method is called to ask the resource manager to prepare for a transaction commit of the transaction specified in xid.

A value indicating the resource manager's vote on thethe outcome of the transaction.

public  voidxa_rollback()
     rollback the current global transaction.

Field Detail
accessmanager
protected RAMAccessManager accessmanager(Code)
The access manager this transaction is under.



context
protected RAMTransactionContext context(Code)
The context this transaction is being managed by.



parent_tran
protected RAMTransaction parent_tran(Code)
The parent transaction if this is a nested user transaction.



rawtran
protected Transaction rawtran(Code)
The corresponding raw store transaction.



tempCongloms
protected Hashtable tempCongloms(Code)
Where to look for temporary conglomerates.




Constructor Detail
RAMTransaction
protected RAMTransaction(RAMAccessManager myaccessmanager, Transaction theRawTran, RAMTransaction parent_transaction) throws StandardException(Code)



RAMTransaction
RAMTransaction(RAMAccessManager myaccessmanager, RAMTransaction tc, int format_id, byte[] global_id, byte[] branch_id) throws StandardException(Code)



RAMTransaction
RAMTransaction()(Code)




Method Detail
abort
public void abort() throws StandardException(Code)



addColumnToConglomerate
public void addColumnToConglomerate(long conglomId, int column_id, Storable template_column) throws StandardException(Code)
Add a column to a conglomerate. The conglomerate must not be open in the current transaction. This also means that there must not be any active scans on it. The column can only be added at the spot just after the current set of columns. The template_column must be nullable. After this call has been made, all fetches of this column from rows that existed in the table prior to this call will return "null".
Parameters:
  conglomId - The identifier of the conglomerate to drop.
Parameters:
  column_id - The column number to add this column at.
Parameters:
  template_column - An instance of the column to be added to table.
exception:
  StandardException - Only some types of conglomerates can supportadding a column, for instance "heap" conglomerates support adding acolumn while "btree" conglomerates do not. If the column can not beadded an exception will be thrown.



addPostCommitWork
public void addPostCommitWork(Serviceable work)(Code)
Add to the list of post commit work.

Add to the list of post commit work that may be processed after this transaction commits. If this transaction aborts, then the post commit work list will be thrown away. No post commit work will be taken out on a rollback to save point.

This routine simply delegates the work to the Rawstore transaction.
Parameters:
  work - The post commit work to do.




anyoneBlocked
public boolean anyoneBlocked()(Code)



closeControllers
protected void closeControllers(boolean closeHeldControllers) throws StandardException(Code)
Private/Protected methods of This class:



closeMe
public void closeMe(ConglomerateController conglom_control)(Code)
The ConglomerateController.close() method has been called on "conglom_control".

Take whatever cleanup action is appropriate to a closed conglomerateController. It is likely this routine will remove references to the ConglomerateController object that it was maintaining for cleanup purposes.




closeMe
public void closeMe(SortController sort_control)(Code)
The SortController.close() method has been called on "sort_control".

Take whatever cleanup action is appropriate to a closed sortController. It is likely this routine will remove references to the SortController object that it was maintaining for cleanup purposes.




closeMe
public void closeMe(ScanManager scan)(Code)
The ScanManager.close() method has been called on "scan".

Take whatever cleanup action is appropriate to a closed scan. It is likely this routine will remove references to the scan object that it was maintaining for cleanup purposes.




commit
public void commit() throws StandardException(Code)



commitNoSync
public DatabaseInstant commitNoSync(int commitflag) throws StandardException(Code)



compressConglomerate
public void compressConglomerate(long conglomId) throws StandardException(Code)
Return free space from the conglomerate back to the OS.

Returns free space from the conglomerate back to the OS. Currently only the sequential free pages at the "end" of the conglomerate can be returned to the OS.


Parameters:
  conglomId - Id of the conglomerate to purge.
exception:
  StandardException - Standard exception policy.




conglomerateExists
public boolean conglomerateExists(long conglomId) throws StandardException(Code)



countOpens
public int countOpens(int which_to_count) throws StandardException(Code)
Report on the number of open conglomerates in the transaction.

There are 4 types of open "conglomerates" that can be tracked, those opened by each of the following: openConglomerate(), openScan(), openSort(), and openSortScan(). This routine can be used to either report on the number of all opens, or may be used to track one particular type of open. This routine is expected to be used for debugging only. An implementation may only track this info under SanityManager.DEBUG mode. If the implementation does not track the info it will return -1 (so code using this call to verify that no congloms are open should check for return <= 0 rather than == 0). The return value depends on the "which_to_count" parameter as follows: OPEN_CONGLOMERATE - return # of openConglomerate() calls not close()'d. OPEN_SCAN - return # of openScan() calls not close()'d. OPEN_CREATED_SORTS - return # of sorts created (createSort()) in current xact. There is currently no way to get rid of these sorts before end of transaction. OPEN_SORT - return # of openSort() calls not close()'d. OPEN_TOTAL - return total # of all above calls not close()'d. - note an implementation may return -1 if it does not track the above information. The nunber of open's of a type indicated by "which_to_count"parameter.
Parameters:
  which_to_count - Which kind of open to report on.
exception:
  StandardException - Standard exception policy.




createAndLoadConglomerate
public long createAndLoadConglomerate(String implementation, DataValueDescriptor[] template, ColumnOrdering[] columnOrder, Properties properties, int temporaryFlag, RowLocationRetRowSource rowSource, long[] rowCount) throws StandardException(Code)
Create a conglomerate and populate it with rows from rowSource.
See Also:   TransactionController.createAndLoadConglomerate
exception:
  StandardException - Standard Cloudscape Error Policy



createBackingStoreHashtableFromScan
public BackingStoreHashtable createBackingStoreHashtableFromScan(long conglomId, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier, DataValueDescriptor[] stopKeyValue, int stopSearchOperator, long max_rowcnt, int[] key_column_numbers, boolean remove_duplicates, long estimated_rowcnt, long max_inmemory_rowcnt, int initialCapacity, float loadFactor, boolean collect_runtimestats, boolean skipNullKeyColumns) throws StandardException(Code)
Create a BackingStoreHashtable which contains all rows that qualify for the described scan.



createConglomerate
public long createConglomerate(String implementation, DataValueDescriptor[] template, ColumnOrdering[] columnOrder, Properties properties, int temporaryFlag) throws StandardException(Code)
Create a new conglomerate.


See Also:   TransactionController.createConglomerate
exception:
  StandardException - Standard exception policy.




createSort
public long createSort(Properties implParameters, DataValueDescriptor[] template, ColumnOrdering columnOrdering, SortObserver sortObserver, boolean alreadyInOrder, long estimatedRows, int estimatedRowSize) throws StandardException(Code)

See Also:   TransactionController.createSort
exception:
  StandardException - Standard error policy.



createXATransactionFromLocalTransaction
public Object createXATransactionFromLocalTransaction(int format_id, byte[] global_id, byte[] branch_id) throws StandardException(Code)
Convert a local transaction to a global transaction.

Get a transaction controller with which to manipulate data within the access manager. Tbis controller allows one to manipulate a global XA conforming transaction.

Must only be called a previous local transaction was created and exists in the context. Can only be called if the current transaction is in the idle state. Upon return from this call the old tc will be unusable, and all references to it should be dropped (it will have been implicitly destroy()'d by this call.

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.
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:
  branch_id - The branch qualifier of the Xid - ie. Xid.getBranchQaulifier()
exception:
  StandardException - Standard exception policy.
See Also:   TransactionController




debugOpened
public String debugOpened() throws StandardException(Code)
Return a string with debug information about opened congloms/scans/sorts.

Return a string with debugging information about current opened congloms/scans/sorts which have not been close()'d. Calls to this routine are only valid under code which is conditional on SanityManager.DEBUG.

String with debugging information.
exception:
  StandardException - Standard exception policy.




defragmentConglomerate
public GroupFetchScanController defragmentConglomerate(long conglomId, boolean online, boolean hold, int open_mode, int lock_level, int isolation_level) throws StandardException(Code)
Compress table in place.

Returns a GroupFetchScanController which can be used to move rows around in a table, creating a block of free pages at the end of the table. The process will move rows from the end of the table toward the beginning. The GroupFetchScanController will return the old row location, the new row location, and the actual data of any row moved. Note that this scan only returns moved rows, not an entire set of rows, the scan is designed specifically to be used by either explicit user call of the SYSCS_ONLINE_COMPRESS_TABLE() procedure, or internal background calls to compress the table. The old and new row locations are returned so that the caller can update any indexes necessary. This scan always returns all collumns of the row. All inputs work exactly as in openScan(). The return is a GroupFetchScanController, which only allows fetches of groups of rows from the conglomerate.

The GroupFetchScanController to be used to fetch the rows.
Parameters:
  conglomId - see openScan()
Parameters:
  hold - see openScan()
Parameters:
  open_mode - see openScan()
Parameters:
  lock_level - see openScan()
Parameters:
  isolation_level - see openScan()
exception:
  StandardException - Standard exception policy.
See Also:   ScanController
See Also:   GroupFetchScanController




destroy
public void destroy()(Code)



dropConglomerate
public void dropConglomerate(long conglomId) throws StandardException(Code)



dropSort
public void dropSort(long sortid) throws StandardException(Code)
Drop a sort.

Drop a sort created by a call to createSort() within the current transaction (sorts are automatically "dropped" at the end of a transaction. This call should only be made after all openSortScan()'s and openSort()'s have been closed.


Parameters:
  sortid - The identifier of the sort to drop, as returned from createSort.
exception:
  StandardException - From a lower-level exception.




fetchMaxOnBtree
public boolean fetchMaxOnBtree(long conglomId, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] fetchRow) throws StandardException(Code)
Retrieve the maximum value row in an ordered conglomerate.

Returns true and fetches the rightmost row of an ordered conglomerate into "fetchRow" if there is at least one row in the conglomerate. If there are no rows in the conglomerate it returns false.

Non-ordered conglomerates will not implement this interface, calls will generate a StandardException.

RESOLVE - this interface is temporary, long term equivalent (and more) functionality will be provided by the openBackwardScan() interface.
Parameters:
  conglomId - The identifier of the conglomerateto open the scan for.
Parameters:
  open_mode - Specifiy flags to control opening of table. OPENMODE_FORUPDATE - if set open the table forupdate otherwise open table shared.
Parameters:
  lock_level - One of (MODE_TABLE, MODE_RECORD, or MODE_NONE).
Parameters:
  isolation_level - The isolation level to lock the conglomerate at.One of (ISOLATION_READ_COMMITTED or ISOLATION_SERIALIZABLE).
Parameters:
  scanColumnList - A description of which columns to return from every fetch in the scan. template, and scanColumnList work togetherto describe the row to be returned by the scan - see RowUtil for description of how these three parameters work together to describe a "row".
Parameters:
  fetchRow - The row to retrieve the maximum value into. boolean indicating if a row was found and retrieved or not.
exception:
  StandardException - Standard exception policy.




findConglomid
public long findConglomid(long container_id) throws StandardException(Code)



findContainerid
public long findContainerid(long conglom_id) throws StandardException(Code)



getAccessManager
public AccessFactory getAccessManager()(Code)
Get reference to access factory which started this transaction.

The AccessFactory which started this transaction.




getActiveStateTxIdString
public String getActiveStateTxIdString()(Code)
Get string id of the transaction that would be when the Transaction is IN active state.



getCacheStats
public long[] getCacheStats(String cacheName)(Code)
Get cache statistics for the specified cache



getContextManager
public ContextManager getContextManager()(Code)
Get the context manager that the transaction was created with.

The context manager that the transaction was created with.




getDynamicCompiledConglomInfo
public DynamicCompiledOpenConglomInfo getDynamicCompiledConglomInfo(long conglomId) throws StandardException(Code)
Return dynamic information about the conglomerate to be dynamically reused in repeated execution of a statement.

The dynamic info is a set of variables to be used in a given ScanController or ConglomerateController. It can only be used in one controller at a time. It is up to the caller to insure the correct thread access to this info. The type of info in this is a scratch template for btree traversal, other scratch variables for qualifier evaluation, ...

The dynamic information.
Parameters:
  conglomId - The identifier of the conglomerate to open.
exception:
  StandardException - Standard exception policy.




getFileHandler
public FileResource getFileHandler()(Code)



getInternalTransaction
public TransactionManager getInternalTransaction() throws StandardException(Code)
Get an Internal transaction.

Start an internal transaction. An internal transaction is a completely separate transaction from the current user transaction. All work done in the internal transaction must be physical (ie. it can be undone physically by the rawstore at the page level, rather than logically undone like btree insert/delete operations). The rawstore guarantee's that in the case of a system failure all open Internal transactions are first undone in reverse order, and then other transactions are undone in reverse order.

Internal transactions are meant to implement operations which, if interupted before completion will cause logical operations like tree searches to fail. This special undo order insures that the state of the tree is restored to a consistent state before any logical undo operation which may need to search the tree is performed.

The new internal transaction.
exception:
  StandardException - Standard exception policy.




getLockObject
public Object getLockObject()(Code)
Return an object that when used as the compatability space *and* group for a lock request, guarantees that the lock will be removed on a commit or an abort.



getProperties
public Properties getProperties() throws StandardException(Code)

See Also:   TransactionController.getProperties
exception:
  StandardException - Standard exception policy.



getProperty
public Serializable getProperty(String key) throws StandardException(Code)

See Also:   TransactionController.getProperty
exception:
  StandardException - Standard exception policy.



getPropertyDefault
public Serializable getPropertyDefault(String key) throws StandardException(Code)

See Also:   TransactionController.getPropertyDefault
exception:
  StandardException - Standard exception policy.



getRawStoreXact
public Transaction getRawStoreXact()(Code)
Get the Transaction from the Transaction manager.

Access methods often need direct access to the "Transaction" - ie. the raw store transaction, so give access to it. The raw store transaction.




getStaticCompiledConglomInfo
public StaticCompiledOpenConglomInfo getStaticCompiledConglomInfo(long conglomId) throws StandardException(Code)
Return static information about the conglomerate to be included in a a compiled plan.

The static info would be valid until any ddl was executed on the conglomid, and would be up to the caller to throw away when that happened. This ties in with what language already does for other invalidation of static info. The type of info in this would be containerid and array of format id's from which templates can be created. The info in this object is read only and can be shared among as many threads as necessary.

The static compiled information.
Parameters:
  conglomId - The identifier of the conglomerate to open.
exception:
  StandardException - Standard exception policy.




getTransactionIdString
public String getTransactionIdString()(Code)
Get string id of the transaction.

This transaction "name" will be the same id which is returned in the TransactionInfo information, used by the lock and transaction vti's to identify transactions.

Although implementation specific, the transaction id is usually a number which is bumped every time a commit or abort is issued.

For now return the toString() method, which does what we want. Later if that is not good enough we can add public raw tran interfaces to get exactly what we want. The a string which identifies the transaction.




getUserCreateConglomPropList
public Properties getUserCreateConglomPropList()(Code)
A superset of properties that "users" can specify.

A superset of properties that "users" (ie. from sql) can specify. Store may implement other properties which should not be specified by users. Layers above access may implement properties which are not known at all to Access.

This list is a superset, as some properties may not be implemented by certain types of conglomerates. For instant an in-memory store may not implement a pageSize property. Or some conglomerates may not support pre-allocation.

This interface is meant to be used by the SQL parser to do validation of properties passsed to the create table statement, and also by the various user interfaces which present table information back to the user.

Currently this routine returns the following list: derby.storage.initialPages derby.storage.minimumRecordSize derby.storage.pageReservedSpace derby.storage.pageSize The superset of properties that "users" can specify.




invalidateConglomerateCache
protected void invalidateConglomerateCache() throws StandardException(Code)
Invalidate the conglomerate cache, if necessary. If an alter table call has been made then invalidate the cache.
exception:
  StandardException - Standard exception policy.



isGlobal
public boolean isGlobal()(Code)
Reveals whether the transaction is a global or local transaction. true If the transaction was either started by AccessFactory.startXATransaction() or was morphed to a globaltransaction by calling AccessFactory.createXATransactionFromLocalTransaction().
See Also:   AccessFactory.startXATransaction
See Also:   TransactionController.createXATransactionFromLocalTransaction



isIdle
public boolean isIdle()(Code)
Reveals whether the transaction has ever read or written data. true If the transaction has never read or written data.



isPristine
public boolean isPristine()(Code)
Reveals whether the transaction is currently pristine. true If the transaction is Pristine.
See Also:   TransactionController.isPristine



loadConglomerate
public long loadConglomerate(long conglomId, boolean createConglom, RowLocationRetRowSource rowSource) throws StandardException(Code)
Bulk load into the conglomerate. Rows being loaded into the conglomerate are not logged.
Parameters:
  conglomId - The conglomerate Id.
Parameters:
  createConglom - If true, the conglomerate is being created in thesame operation as the loadConglomerate. The enables furtheroptimization as recovery does not require page allocation to belogged.
Parameters:
  rowSource - Where the rows come from. true The number of rows loaded.
exception:
  StandardException - Standard Cloudscape Error Policy



loadConglomerate
public void loadConglomerate(long conglomId, RowLocationRetRowSource rowSource) throws StandardException(Code)
Use this for incremental load in the future.
Parameters:
  conglomId - the conglomerate Id
Parameters:
  rowSource - where the rows to be loaded comes from
exception:
  StandardException - Standard Cloudscape Error Policy



logAndDo
public void logAndDo(Loggable operation) throws StandardException(Code)
Log an operation and then action it in the context of this transaction.

This simply passes the operation to the RawStore which logs and does it.


Parameters:
  operation - the operation that is to be applied
exception:
  StandardException - Standard exception policy.




openCompiledConglomerate
public ConglomerateController openCompiledConglomerate(boolean hold, int open_mode, int lock_level, int isolation_level, StaticCompiledOpenConglomInfo static_info, DynamicCompiledOpenConglomInfo dynamic_info) throws StandardException(Code)



openCompiledScan
public ScanController openCompiledScan(boolean hold, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier, DataValueDescriptor[] stopKeyValue, int stopSearchOperator, StaticCompiledOpenConglomInfo static_info, DynamicCompiledOpenConglomInfo dynamic_info) throws StandardException(Code)



openConglomerate
public ConglomerateController openConglomerate(long conglomId, boolean hold, int open_mode, int lock_level, int isolation_level) throws StandardException(Code)



openGroupFetchScan
public GroupFetchScanController openGroupFetchScan(long conglomId, boolean hold, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier, DataValueDescriptor[] stopKeyValue, int stopSearchOperator) throws StandardException(Code)



openScan
public ScanController openScan(long conglomId, boolean hold, int open_mode, int lock_level, int isolation_level, FormatableBitSet scanColumnList, DataValueDescriptor[] startKeyValue, int startSearchOperator, Qualifier qualifier, DataValueDescriptor[] stopKeyValue, int stopSearchOperator) throws StandardException(Code)



openSort
public SortController openSort(long id) throws StandardException(Code)

See Also:   TransactionController.openSort
exception:
  StandardException - Standard error policy.



openSortCostController
public SortCostController openSortCostController(Properties implParameters) throws StandardException(Code)
Return an open SortCostController.

Return an open SortCostController which can be used to ask about the estimated costs of SortController() operations.

The open StoreCostController.
exception:
  StandardException - Standard exception policy.
See Also:   StoreCostController




openSortRowSource
public RowLocationRetRowSource openSortRowSource(long id) throws StandardException(Code)

See Also:   TransactionController.openSortRowSource
exception:
  StandardException - Standard error policy.



openSortScan
public ScanController openSortScan(long id, boolean hold) throws StandardException(Code)

See Also:   TransactionController.openSortScan
exception:
  StandardException - Standard error policy.



openStoreCost
public StoreCostController openStoreCost(long conglomId) throws StandardException(Code)
Return an open StoreCostController for the given conglomid.

Return an open StoreCostController which can be used to ask about the estimated row counts and costs of ScanController and ConglomerateController operations, on the given conglomerate.

The open StoreCostController.
Parameters:
  conglomId - The identifier of the conglomerate to open.
exception:
  StandardException - Standard exception policy.
See Also:   StoreCostController




propertyDefaultIsVisible
public boolean propertyDefaultIsVisible(String key) throws StandardException(Code)

See Also:   TransactionController.propertyDefaultIsVisible
exception:
  StandardException - Standard exception policy.



purgeConglomerate
public void purgeConglomerate(long conglomId) throws StandardException(Code)
Purge all committed deleted rows from the conglomerate.

This call will purge committed deleted rows from the conglomerate, that space will be available for future inserts into the conglomerate.


Parameters:
  conglomId - Id of the conglomerate to purge.
exception:
  StandardException - Standard exception policy.




recreateAndLoadConglomerate
public long recreateAndLoadConglomerate(String implementation, boolean recreate_ifempty, DataValueDescriptor[] template, ColumnOrdering[] columnOrder, Properties properties, int temporaryFlag, long orig_conglomId, RowLocationRetRowSource rowSource, long[] rowCount) throws StandardException(Code)
recreate a conglomerate and populate it with rows from rowSource.
See Also:   TransactionController.createAndLoadConglomerate
exception:
  StandardException - Standard Cloudscape Error Policy



releaseSavePoint
public int releaseSavePoint(String name, Object kindOfSavepoint) throws StandardException(Code)



resetCacheStats
public void resetCacheStats(String cacheName)(Code)
Reset the cache statistics for the specified cache



rollbackToSavePoint
public int rollbackToSavePoint(String name, boolean close_controllers, Object kindOfSavepoint) throws StandardException(Code)



saveScanPositions
public void saveScanPositions(Conglomerate conglom, Page page) throws StandardException(Code)
Do work necessary to maintain the current position in all the scans.

The latched page in the conglomerate "congomid" is changing, do whatever is necessary to maintain the current position of all the scans open in this transaction.

For some conglomerates this may be a no-op.


Parameters:
  conglom - Conglomerate being changed.
Parameters:
  page - Page in the conglomerate being changed.
exception:
  StandardException - Standard exception policy.




setContext
void setContext(RAMTransactionContext rtc)(Code)



setProperty
public void setProperty(String key, Serializable value, boolean dbOnlyProperty) throws StandardException(Code)

See Also:   TransactionController.setProperty
exception:
  StandardException - Standard exception policy.



setPropertyDefault
public void setPropertyDefault(String key, Serializable value) throws StandardException(Code)

See Also:   TransactionController.setProperty
exception:
  StandardException - Standard exception policy.



setSavePoint
public int setSavePoint(String name, Object kindOfSavepoint) throws StandardException(Code)



startNestedUserTransaction
public TransactionController startNestedUserTransaction(boolean readOnly) throws StandardException(Code)
Get an nested user transaction.

A nested user can be used exactly as any other TransactionController, except as follows. For this discussion let the parent transaction be the transaction used to make the getNestedUserTransaction(), and let the child transaction be the transaction returned by the getNestedUserTransaction() call.

The nesting is limited to one level deep. An exception will be thrown if a subsequent getNestedUserTransaction() is called on the child transaction.

The locks in the child transaction will be compatible with the locks of the parent transaction.

A commit in the child transaction will release locks associated with the child transaction only, work can continue in the parent transaction at this point.

Any abort of the child transaction will result in an abort of both the child transaction and parent transaction.

A TransactionController.destroy() call should be made on the child transaction once all child work is done, and the caller wishes to continue work in the parent transaction.

Nested internal transactions are meant to be used to implement system work necessary to commit as part of implementing a user's request, but where holding the lock for the duration of the user transaction is not acceptable. 2 examples of this are system catalog read locks accumulated while compiling a plan, and auto-increment.

The new nested user transaction.
exception:
  StandardException - Standard exception policy.




toString
public String toString()(Code)



xa_commit
public void xa_commit(boolean onePhase) throws StandardException(Code)
This method is called to commit the current XA global transaction.

RESOLVE - how do we map to the "right" XAExceptions.


Parameters:
  onePhase - If true, the resource manager should use a one-phasecommit protocol to commit the work done on behalf of current xid.
exception:
  StandardException - Standard exception policy.




xa_prepare
public int xa_prepare() throws StandardException(Code)
This method is called to ask the resource manager to prepare for a transaction commit of the transaction specified in xid.

A value indicating the resource manager's vote on thethe outcome of the transaction. The possible valuesare: XA_RDONLY or XA_OK. If the resource manager wantsto roll back the transaction, it should do so by throwing an appropriate XAException in the preparemethod.
exception:
  StandardException - Standard exception policy.




xa_rollback
public void xa_rollback() throws StandardException(Code)
rollback the current global transaction.

The given transaction is roll'ed back and it's history is not maintained in the transaction table or long term log.


exception:
  StandardException - Standard exception policy.




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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