Java Doc for CurrentTransaction.java in  » JMX » je » com » sleepycat » collections » 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 » JMX » je » com.sleepycat.collections 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sleepycat.collections.CurrentTransaction

CurrentTransaction
public class CurrentTransaction (Code)
Provides access to the current transaction for the current thread within the context of a Berkeley DB environment. This class provides explicit transaction control beyond that provided by the TransactionRunner class. However, both methods of transaction control manage per-thread transactions.
author:
   Mark Hayes

Inner Class :final static class CdbCursors



Method Summary
final public  TransactionabortTransaction()
     Aborts the transaction that is active for the current thread for this environment and makes the parent transaction (if any) the current transaction.
final public  TransactionbeginTransaction(TransactionConfig config)
     Begins a new transaction for this environment and associates it with the current thread.
 voidcloseCursor(Cursor cursor)
     Closes a cursor.
final public  TransactioncommitTransaction()
     Commits the transaction that is active for the current thread for this environment and makes the parent transaction (if any) the current transaction.
 CursordupCursor(Cursor cursor, boolean writeCursor, boolean samePosition)
     Duplicates a cursor for a given database.
Parameters:
  writeCursor - true to open a write cursor in a CDB environment, andignored for other environments.
Parameters:
  samePosition - is passed through to Cursor.dup().
final public  EnvironmentgetEnvironment()
     Returns the underlying Berkeley DB environment.
public static  CurrentTransactiongetInstance(Environment env)
     Gets the CurrentTransaction accessor for a specified Berkeley DB environment.
static  CurrentTransactiongetInstanceInternal(Environment env)
     Gets the CurrentTransaction accessor for a specified Berkeley DB environment.
final public  TransactiongetTransaction()
     Returns the transaction associated with the current thread for this environment, or null if no transaction is active.
final  LockModegetWriteLockMode()
     Return the LockMode.RMW or null, depending on whether locking is enabled.
 booleanisAutoCommitAllowed()
     Returns whether auto-commit may be performed by the collections API.
 booleanisCDBCursorOpen(Database db)
     Returns true if a CDB cursor is open and therefore a Database write operation should not be attempted since a self-deadlock may result.
final  booleanisCdbMode()
     Returns whether this is a Concurrent Data Store environment.
final  booleanisLockingMode()
     Returns whether environment is configured for locking.
final  booleanisReadUncommitted()
     Returns whether the current transaction is a readUncommitted transaction.
final  booleanisTxnMode()
     Returns whether this is a transactional environment.
 CursoropenCursor(Database db, CursorConfig cursorConfig, boolean writeCursor, Transaction txn)
     Opens a cursor for a given database, dup'ing an existing CDB cursor if one is open for the current thread.



Method Detail
abortTransaction
final public Transaction abortTransaction() throws DatabaseException, IllegalStateException(Code)
Aborts the transaction that is active for the current thread for this environment and makes the parent transaction (if any) the current transaction. the parent transaction or null if the aborted transaction wasnot nested.
throws:
  DatabaseException - if an error occurs aborting the transaction.The transaction will still be closed and the parent transaction willbecome the current transaction.
throws:
  IllegalStateException - if no transaction is active for thecurrent thread for this environment.



beginTransaction
final public Transaction beginTransaction(TransactionConfig config) throws DatabaseException(Code)
Begins a new transaction for this environment and associates it with the current thread. If a transaction is already active for this environment and thread, a nested transaction will be created.
Parameters:
  config - the transaction configuration used for callingEnvironment.beginTransaction, or null to use the defaultconfiguration. the new transaction.
throws:
  DatabaseException - if the transaction cannot be started, in whichcase any existing transaction is not affected.
throws:
  IllegalStateException - if a transaction is already active andnested transactions are not supported by the environment.



closeCursor
void closeCursor(Cursor cursor) throws DatabaseException(Code)
Closes a cursor.
Parameters:
  cursor - the cursor to close.
throws:
  DatabaseException - if a database problem occurs.



commitTransaction
final public Transaction commitTransaction() throws DatabaseException, IllegalStateException(Code)
Commits the transaction that is active for the current thread for this environment and makes the parent transaction (if any) the current transaction. the parent transaction or null if the committed transaction wasnot nested.
throws:
  DatabaseException - if an error occurs committing the transaction.The transaction will still be closed and the parent transaction willbecome the current transaction.
throws:
  IllegalStateException - if no transaction is active for thecurrent thread for this environment.



dupCursor
Cursor dupCursor(Cursor cursor, boolean writeCursor, boolean samePosition) throws DatabaseException(Code)
Duplicates a cursor for a given database.
Parameters:
  writeCursor - true to open a write cursor in a CDB environment, andignored for other environments.
Parameters:
  samePosition - is passed through to Cursor.dup(). the open cursor.
throws:
  DatabaseException - if a database problem occurs.



getEnvironment
final public Environment getEnvironment()(Code)
Returns the underlying Berkeley DB environment.



getInstance
public static CurrentTransaction getInstance(Environment env)(Code)
Gets the CurrentTransaction accessor for a specified Berkeley DB environment. This method always returns the same reference when called more than once with the same environment parameter.
Parameters:
  env - is an open Berkeley DB environment. the CurrentTransaction accessor for the given environment, ornull if the environment is not transactional.



getInstanceInternal
static CurrentTransaction getInstanceInternal(Environment env)(Code)
Gets the CurrentTransaction accessor for a specified Berkeley DB environment. Unlike getInstance(), this method never returns null.
Parameters:
  env - is an open Berkeley DB environment.



getTransaction
final public Transaction getTransaction()(Code)
Returns the transaction associated with the current thread for this environment, or null if no transaction is active.



getWriteLockMode
final LockMode getWriteLockMode()(Code)
Return the LockMode.RMW or null, depending on whether locking is enabled. LockMode.RMW will cause an error if passed when locking is not enabled. Locking is enabled if locking or transactions were specified for this environment.



isAutoCommitAllowed
boolean isAutoCommitAllowed() throws DatabaseException(Code)
Returns whether auto-commit may be performed by the collections API. True is returned if no collections API transaction is currently active, and no XA transaction is currently active.



isCDBCursorOpen
boolean isCDBCursorOpen(Database db) throws DatabaseException(Code)
Returns true if a CDB cursor is open and therefore a Database write operation should not be attempted since a self-deadlock may result.



isCdbMode
final boolean isCdbMode()(Code)
Returns whether this is a Concurrent Data Store environment.



isLockingMode
final boolean isLockingMode()(Code)
Returns whether environment is configured for locking.



isReadUncommitted
final boolean isReadUncommitted()(Code)
Returns whether the current transaction is a readUncommitted transaction.



isTxnMode
final boolean isTxnMode()(Code)
Returns whether this is a transactional environment.



openCursor
Cursor openCursor(Database db, CursorConfig cursorConfig, boolean writeCursor, Transaction txn) throws DatabaseException(Code)
Opens a cursor for a given database, dup'ing an existing CDB cursor if one is open for the current thread.



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.