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


org.apache.derby.iapi.store.raw.xact.RawTransaction
   org.apache.derby.impl.store.raw.xact.Xact

All known Subclasses:   org.apache.derby.impl.store.raw.xact.InternalXact,
Xact
public class Xact extends RawTransaction implements Limit(Code)
A transaction has five states
  1. CLOSED - cannot be used
  2. IDLE - no reads have been performed by the transaction.
  3. ACTIVE - at least one read has been attempted by the transaction
  4. UPDATE - at least one update has been attempted by the transaction
  5. PREPARED - the transaction is ready to commit (FUTURE).

Transaction identifiers are re-used for transactions that do not enter the UPDATE state during their lifetime.
See Also:   Transaction


Field Summary
final protected static  intACTIVE
    
final protected static  intCLOSED
    
final public static  intEND_ABORTED
    
final public static  intEND_COMMITTED
    
final public static  intEND_PREPARED
    
final protected static  intIDLE
    
final public static  intINTERNAL_TRANSACTION
    
final public static  intNESTED_TOP_TRANSACTION
    
final protected static  intPREPARED
    
final public static  intRECOVERY_ROLLBACK_FIRST
    
final protected static  intUPDATE
    
final protected  ObjectcompatibilitySpace
    
final protected  DataFactorydataFactory
    
 DynamicByteArrayOutputStreamlogBuffer
    
final protected  LogFactorylogFactory
    
protected  Loggerlogger
    
protected  ListpostCommitWorks
    
protected  ListpostTerminationWorks
    
protected volatile  intstate
    
final protected  XactFactoryxactFactory
    
protected  XactContextxc
    

Constructor Summary
protected  Xact(XactFactory xactFactory, LogFactory logFactory, DataFactory dataFactory, boolean readOnly, Object compatibilitySpace)
    

Method Summary
public  voidabort()
    
public  longaddAndLoadStreamContainer(long segmentId, Properties tableProperties, RowSource rowSource)
    
public  longaddContainer(long segmentId, long containerid, int mode, Properties tableProperties, int temporaryFlag)
    
public  voidaddPostCommitWork(Serviceable work)
    
public  voidaddPostTerminationWork(Serviceable work)
    
public  voidaddUpdateTransaction(int transactionStatus)
     Add this to the xactFactory list of update transaction.
public  booleananyoneBlocked()
     Return true if any transaction is currently blocked, even if not by this transaction.
protected  voidassumeGlobalXactIdentity(TransactionTableEntry ent)
     Assume complete identity of the given Transaction Table Entry.

Used by the final phase of the recovery to create new real transactions to take on the identity of in-doubt prepared transactions found during redo.

protected  voidassumeIdentity(TransactionTableEntry ent)
     Transform this identity to the one stored in transaction table entry.
public  booleanblockBackup(boolean wait)
    
public  voidcheckpointInRollForwardRecovery(LogInstant cinstant, long redoLWM)
    
public  voidclose()
    
public  LogInstantcommit()
    
public  LogInstantcommitNoSync(int commitflag)
    
public  voidcreateXATransactionFromLocalTransaction(int format_id, byte[] global_id, byte[] branch_id)
     Convert a local transaction to a global transaction.

Must only be called a previous local transaction was created and exists in the context.

final public  LockingPolicydefaultLockingPolicy()
    
public  voiddestroy()
     If this transaction is not idle, abort it.
protected  voiddoComplete(Integer commitOrAbort)
    
protected  booleandoPostCommitWorkInTran()
     If this is a user transaction (not an internal or nested top transaction), and this is not already taking care of post commit work, and not an XA transaction, then take care of hi prioirty work right now using this thread and this context manager.
public  voiddropContainer(ContainerKey containerId)
    
public  voiddropStreamContainer(long segmentId, long containerId)
    
public  StringgetActiveStateTxIdString()
    
public  long[]getCacheStats(String cacheName)
    
public  ObjectgetCompatibilitySpace()
     Get the compatibility space of the transaction.

Returns an object that can be used with the lock manager to provide the compatibility space of a transaction.

final public  StringgetContextId()
    
final public  ContextManagergetContextManager()
    
final public  DataFactorygetDataFactory()
    
public  LockingPolicygetDefaultLockingPolicy()
     Get the current default locking policy for all operations within this transaction.
public  FileResourcegetFileHandler()
    
public  LogInstantgetFirstLogInstant()
     Get the log instant for the first log record written by this transaction.
final public  GlobalTransactionIdgetGlobalId()
    
final public  TransactionIdgetId()
    
final protected  TransactionIdgetIdNoCheck()
    
public  LogInstantgetLastLogInstant()
     Get the log instant for the last log record written by this transaction.
final public  LockFactorygetLockFactory()
    
public  DynamicByteArrayOutputStreamgetLogBuffer()
    
 StringgetState()
    
public  StringgetTransName()
    
public  booleanhandlesPostTerminationWork()
    
public  booleaninAbort()
    
public  booleaninRollForwardRecovery()
    
final public  booleanisActive()
     see if this transaction has ever done anything. MT - single thread through synchronizing this.
public  booleanisBlockingBackup()
    
public  booleanisIdle()
     See if this transaction is in the idle state, called by other thread to test the state of this transaction.
final public  booleanisPrepared()
     see if this transaction is in PREPARED state. MT - single thread through synchronizing this.
public  booleanisPristine()
     see if this transaction is in a pristine state.
public  voidlogAndDo(Loggable operation)
     Log the operation and do it.
public  voidlogAndUndo(Compensation compensation, LogInstant undoInstant, LimitObjectInput in)
     Log and apply a compensation operation.
final public  LockingPolicynewLockingPolicy(int mode, int isolation, boolean stricterOk)
    
public  ContainerHandleopenContainer(ContainerKey containerId, int mode)
    
public  ContainerHandleopenContainer(ContainerKey containerId, LockingPolicy locking, int mode)
    
public  RawContainerHandleopenDroppedContainer(ContainerKey containerId, LockingPolicy locking)
     Open a container that may already have been dropped.
public  StreamContainerHandleopenStreamContainer(long segmentId, long containerId, boolean hold)
    
protected  booleanpopSavePoints(int position, boolean release)
     Pop all savepoints upto the one with the given name and rollback all changes made since this savepoint was pushed.
protected  voidpostComplete(int commitflag, Integer commitOrAbort)
    
protected  voidpreComplete(Integer commitOrAbort)
    
public  voidprepareTransaction()
     Remove this from the xactFactory list of update transaction.
public  voidreCreateContainerForRedoRecovery(long segmentId, long containerId, ByteArray containerInfo)
     Recreate a container during redo recovery.
public  voidreached(Object compatabilitySpace, Object group, int limit, Enumeration lockList, int lockCount)
    
public  voidrecoveryTransaction()
    
public  intreleaseSavePoint(String name, Object kindOfSavepoint)
    
public  voidremoveUpdateTransaction()
     Remove this from the xactFactory list of update transaction.
public  voidreprepare()
     During recovery re-prepare a transaction.

After redo() and undo(), this routine is called on all outstanding in-doubt (prepared) transactions.

public  voidresetCacheStats(String cacheName)
    
 voidresetDefaultLocking()
    
public  introllbackToSavePoint(String name, Object kindOfSavepoint)
    
final protected  voidsetActiveState()
    
final public  voidsetDefaultLockingPolicy(LockingPolicy policy)
    
public  voidsetFirstLogInstant(LogInstant instant)
     Set the log instant for the first log record written by this transaction.
protected  voidsetIdleState()
    
public  voidsetLastLogInstant(LogInstant instant)
     Set the log instant for the last log record written by this transaction.
 voidsetPostComplete()
     Set the transaction to issue pre complete work at postComplete time, instead of preComplete time.
final protected  voidsetPrepareState()
     Move the state of the transaction from UPDATE to PREPARE.

The state transition should only be from UPDATE to PREPARE.

public  intsetSavePoint(String name, Object kindOfSavepoint)
    
public  voidsetTransName(String name)
    
public  voidsetTransactionId(GlobalTransactionId extid, TransactionId localid)
     Set my transaction identifier.
public  voidsetTransactionId(Loggable beginXact, TransactionId localId)
    
public  voidsetup(PersistentSet set)
    
public  RawTransactionstartNestedTopTransaction()
    
protected  intstatusForBeginXactLog()
    
protected  intstatusForEndXactLog()
    
public  StringtoString()
     Return the xid as a string.
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
ACTIVE
final protected static int ACTIVE(Code)



CLOSED
final protected static int CLOSED(Code)



END_ABORTED
final public static int END_ABORTED(Code)



END_COMMITTED
final public static int END_COMMITTED(Code)



END_PREPARED
final public static int END_PREPARED(Code)



IDLE
final protected static int IDLE(Code)



INTERNAL_TRANSACTION
final public static int INTERNAL_TRANSACTION(Code)



NESTED_TOP_TRANSACTION
final public static int NESTED_TOP_TRANSACTION(Code)



PREPARED
final protected static int PREPARED(Code)



RECOVERY_ROLLBACK_FIRST
final public static int RECOVERY_ROLLBACK_FIRST(Code)



UPDATE
final protected static int UPDATE(Code)



compatibilitySpace
final protected Object compatibilitySpace(Code)



dataFactory
final protected DataFactory dataFactory(Code)



logBuffer
DynamicByteArrayOutputStream logBuffer(Code)



logFactory
final protected LogFactory logFactory(Code)



logger
protected Logger logger(Code)



postCommitWorks
protected List postCommitWorks(Code)



postTerminationWorks
protected List postTerminationWorks(Code)



state
protected volatile int state(Code)



xactFactory
final protected XactFactory xactFactory(Code)



xc
protected XactContext xc(Code)




Constructor Detail
Xact
protected Xact(XactFactory xactFactory, LogFactory logFactory, DataFactory dataFactory, boolean readOnly, Object compatibilitySpace)(Code)




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

exception:
  StandardException - Standard cloudscape exception policy
See Also:   Transaction.abort



addAndLoadStreamContainer
public long addAndLoadStreamContainer(long segmentId, Properties tableProperties, RowSource rowSource) throws StandardException(Code)

exception:
  StandardException - Standard cloudscape exception policy
See Also:   Transaction.addAndLoadStreamContainer



addContainer
public long addContainer(long segmentId, long containerid, int mode, Properties tableProperties, int temporaryFlag) throws StandardException(Code)

exception:
  StandardException - Standard cloudscape exception policy
See Also:   Transaction.addContainer
See Also:   



addPostCommitWork
public void addPostCommitWork(Serviceable work)(Code)



addPostTerminationWork
public void addPostTerminationWork(Serviceable work)(Code)



addUpdateTransaction
public void addUpdateTransaction(int transactionStatus)(Code)
Add this to the xactFactory list of update transaction.



anyoneBlocked
public boolean anyoneBlocked()(Code)
Return true if any transaction is currently blocked, even if not by this transaction.



assumeGlobalXactIdentity
protected void assumeGlobalXactIdentity(TransactionTableEntry ent)(Code)
Assume complete identity of the given Transaction Table Entry.

Used by the final phase of the recovery to create new real transactions to take on the identity of in-doubt prepared transactions found during redo. Need to assume the globalId.
Parameters:
  ent - The original entry we are assuming the identity of.




assumeIdentity
protected void assumeIdentity(TransactionTableEntry ent)(Code)
Transform this identity to the one stored in transaction table entry. Used by recovery only!



blockBackup
public boolean blockBackup(boolean wait) throws StandardException(Code)



checkpointInRollForwardRecovery
public void checkpointInRollForwardRecovery(LogInstant cinstant, long redoLWM) throws StandardException(Code)
perform a checkpoint during rollforward recovery



close
public void close() throws StandardException(Code)

exception:
  StandardException - Standard cloudscape exception policy
exception:
  StandardException - Thrown if the transaction is not idle, thetransaction remains open.
See Also:   Transaction.close
exception:
  StandardException - Standard cloudscape policy



commit
public LogInstant commit() throws StandardException(Code)

exception:
  StandardException - Standard cloudscape exception policy



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

exception:
  StandardException - Standard cloudscape exception policy



createXATransactionFromLocalTransaction
public void createXATransactionFromLocalTransaction(int format_id, byte[] global_id, byte[] branch_id) throws StandardException(Code)
Convert a local transaction to a global 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, and no current global id.

Simply call setTransactionId() which takes care of error checking.
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.




defaultLockingPolicy
final public LockingPolicy defaultLockingPolicy()(Code)



destroy
public void destroy() throws StandardException(Code)
If this transaction is not idle, abort it. After this call close().
exception:
  StandardException - Standard Cloudscape error policyThrown if the transaction is not idle.



doComplete
protected void doComplete(Integer commitOrAbort) throws StandardException(Code)



doPostCommitWorkInTran
protected boolean doPostCommitWorkInTran()(Code)
If this is a user transaction (not an internal or nested top transaction), and this is not already taking care of post commit work, and not an XA transaction, then take care of hi prioirty work right now using this thread and this context manager. Otherwise, leave it to the post commit daemon.



dropContainer
public void dropContainer(ContainerKey containerId) throws StandardException(Code)

See Also:   Transaction.dropContainer
exception:
  StandardException - Standard Cloudscape error policy



dropStreamContainer
public void dropStreamContainer(long segmentId, long containerId) throws StandardException(Code)

See Also:   Transaction.dropStreamContainer
exception:
  StandardException - Standard Cloudscape error policy



getActiveStateTxIdString
public String getActiveStateTxIdString()(Code)



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



getCompatibilitySpace
public Object getCompatibilitySpace()(Code)
Get the compatibility space of the transaction.

Returns an object that can be used with the lock manager to provide the compatibility space of a transaction. 2 transactions with the same compatibility space will not conflict in locks. The usual case is that each transaction has it's own unique compatibility space.

The compatibility space of the transaction.




getContextId
final public String getContextId()(Code)
Get my transaction context Id



getContextManager
final public ContextManager getContextManager()(Code)



getDataFactory
final public DataFactory getDataFactory()(Code)



getDefaultLockingPolicy
public LockingPolicy getDefaultLockingPolicy()(Code)
Get the current default locking policy for all operations within this transaction. The transaction is initially started with a default locking policy equivalent to
 newLockingPolicy(
 LockingPolicy.MODE_RECORD, TransactionController.ISOLATION_SERIALIZABLE, true);
 
This default can be changed by subsequent calls to setDefaultLockingPolicy(LockingPolicy policy).
See Also:   Transaction.getDefaultLockingPolicy The current default locking policy in this transaction.



getFileHandler
public FileResource getFileHandler()(Code)



getFirstLogInstant
public LogInstant getFirstLogInstant()(Code)
Get the log instant for the first log record written by this transaction.



getGlobalId
final public GlobalTransactionId getGlobalId()(Code)
get the Global (external to raw store) transaction id that is unique across all raw stores



getId
final public TransactionId getId()(Code)
get the short (internal to raw store) transaction id that is unique only for this raw store



getIdNoCheck
final protected TransactionId getIdNoCheck()(Code)
Get the transaction id without sanity check, this should only be called by a cloned TransactionTableEntry



getLastLogInstant
public LogInstant getLastLogInstant()(Code)
Get the log instant for the last log record written by this transaction.



getLockFactory
final public LockFactory getLockFactory()(Code)



getLogBuffer
public DynamicByteArrayOutputStream getLogBuffer()(Code)



getState
String getState()(Code)



getTransName
public String getTransName()(Code)



handlesPostTerminationWork
public boolean handlesPostTerminationWork()(Code)



inAbort
public boolean inAbort()(Code)



inRollForwardRecovery
public boolean inRollForwardRecovery()(Code)
Is the transaction in rollforward recovery



isActive
final public boolean isActive()(Code)
see if this transaction has ever done anything. MT - single thread through synchronizing this. This method may be called by other thread to test the state of this transaction. That's why we need to synchronize with all methods which enters or exits the Idle state. Local method which read the state need not be synchronized because the other thread may look at the state but it may not change it. true if this transaction is not in idle or closed state



isBlockingBackup
public boolean isBlockingBackup()(Code)
Check if the transaction is blocking the backup ? true if this transaction is blocking the backup, otherwise false



isIdle
public boolean isIdle()(Code)
See if this transaction is in the idle state, called by other thread to test the state of this transaction. That's why we need to synchronzied with all methods whcih enters or exits the idle state true if it is idle, otherwise false



isPrepared
final public boolean isPrepared()(Code)
see if this transaction is in PREPARED state. MT - single thread through synchronizing this. This method may be called by other thread to test the state of this transaction. true if this transaction is in PREPARED state.



isPristine
public boolean isPristine()(Code)
see if this transaction is in a pristine state.
MT - called only by the same thread that owns the xact, no need to synchronize. true if it hasn't done any updates, otherwise false



logAndDo
public void logAndDo(Loggable operation) throws StandardException(Code)
Log the operation and do it. If this transaction has not generated any log records prior to this, then log a beginXact log record. If the passed in operation is null, then do nothing (after logging the beginXact if needed).
exception:
  StandardException - Standard cloudscape exception policy
See Also:   Transaction.logAndDo
See Also:   



logAndUndo
public void logAndUndo(Compensation compensation, LogInstant undoInstant, LimitObjectInput in) throws StandardException(Code)
Log and apply a compensation operation. Only need to write out the compensation op itself, the optional data has already been written by the rollforward operation this is attempting to undo.
See Also:   RawTransaction.logAndDo
See Also:   
exception:
  StandardException - Standard cloudscape exception policy



newLockingPolicy
final public LockingPolicy newLockingPolicy(int mode, int isolation, boolean stricterOk)(Code)

See Also:   Transaction.newLockingPolicy
See Also:   



openContainer
public ContainerHandle openContainer(ContainerKey containerId, int mode) throws StandardException(Code)

exception:
  StandardException - Standard cloudscape exception policy
See Also:   Transaction.openContainer
See Also:   



openContainer
public ContainerHandle openContainer(ContainerKey containerId, LockingPolicy locking, int mode) throws StandardException(Code)

exception:
  StandardException - Standard cloudscape exception policy
See Also:   Transaction.openContainer
See Also:   



openDroppedContainer
public RawContainerHandle openDroppedContainer(ContainerKey containerId, LockingPolicy locking) throws StandardException(Code)
Open a container that may already have been dropped.
exception:
  StandardException - Standard cloudscape exception policy
See Also:   RawTransaction.openDroppedContainer



openStreamContainer
public StreamContainerHandle openStreamContainer(long segmentId, long containerId, boolean hold) throws StandardException(Code)

exception:
  StandardException - Standard cloudscape exception policy
See Also:   Transaction.openStreamContainer



popSavePoints
protected boolean popSavePoints(int position, boolean release) throws StandardException(Code)
Pop all savepoints upto the one with the given name and rollback all changes made since this savepoint was pushed. If release is true then this savepoint is popped as well, otherwise it is left in the stack (at the top). true if any work is rolled back, false if no work is rolled back
exception:
  StandardException - Standard cloudscape policy
exception:
  StandardException - Thrown if a error of severity less than TransactionException#SEVERITYis encountered during the rollback of this savepoint.



postComplete
protected void postComplete(int commitflag, Integer commitOrAbort) throws StandardException(Code)



preComplete
protected void preComplete(Integer commitOrAbort) throws StandardException(Code)



prepareTransaction
public void prepareTransaction()(Code)
Remove this from the xactFactory list of update transaction.



reCreateContainerForRedoRecovery
public void reCreateContainerForRedoRecovery(long segmentId, long containerId, ByteArray containerInfo) throws StandardException(Code)
Recreate a container during redo recovery. Used only during redo recovery while processing log records which are trying to create a container, and no valid container is found in the database.
exception:
  StandardException - Standard cloudscape exception policy
See Also:   RawTransaction.reCreateContainerForRedoRecovery



reached
public void reached(Object compatabilitySpace, Object group, int limit, Enumeration lockList, int lockCount) throws StandardException(Code)



recoveryTransaction
public void recoveryTransaction()(Code)



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

exception:
  StandardException - Standard cloudscape exception policy
See Also:   Transaction.releaseSavePoint



removeUpdateTransaction
public void removeUpdateTransaction()(Code)
Remove this from the xactFactory list of update transaction.



reprepare
public void reprepare() throws StandardException(Code)
During recovery re-prepare a transaction.

After redo() and undo(), this routine is called on all outstanding in-doubt (prepared) transactions. This routine re-acquires all logical write locks for operations in the xact, and then modifies the transaction table entry to make the transaction look as if it had just been prepared following startup after recovery.

This routine is only called during Recovery.
exception:
  StandardException - Standard exception policy.




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



resetDefaultLocking
void resetDefaultLocking()(Code)



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

exception:
  StandardException - Standard cloudscape exception policy
See Also:   Transaction.rollbackToSavePoint



setActiveState
final protected void setActiveState() throws StandardException(Code)



setDefaultLockingPolicy
final public void setDefaultLockingPolicy(LockingPolicy policy)(Code)

See Also:   Transaction.setDefaultLockingPolicy
See Also:   



setFirstLogInstant
public void setFirstLogInstant(LogInstant instant)(Code)
Set the log instant for the first log record written by this transaction.



setIdleState
protected void setIdleState()(Code)



setLastLogInstant
public void setLastLogInstant(LogInstant instant)(Code)
Set the log instant for the last log record written by this transaction.



setPostComplete
void setPostComplete()(Code)
Set the transaction to issue pre complete work at postComplete time, instead of preComplete time. This means that latches and containers will be held open until after a commit or an abort.



setPrepareState
final protected void setPrepareState() throws StandardException(Code)
Move the state of the transaction from UPDATE to PREPARE.

The state transition should only be from UPDATE to PREPARE. Read-only transactions (IDLE and ACTIVE) will never be prepared, they will be commited when the prepare is requested. Only Update transactions will be allowed to go to prepared state.


exception:
  StandardException - Standard exception policy.




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

exception:
  StandardException - Standard cloudscape exception policy
See Also:   Transaction.setSavePoint



setTransName
public void setTransName(String name)(Code)



setTransactionId
public void setTransactionId(GlobalTransactionId extid, TransactionId localid)(Code)
Set my transaction identifier.



setTransactionId
public void setTransactionId(Loggable beginXact, TransactionId localId)(Code)



setup
public void setup(PersistentSet set) throws StandardException(Code)
The default value for LOCKS_ESCALATION_THRESHOLD
exception:
  StandardException - Standard cloudscape exception policy



startNestedTopTransaction
public RawTransaction startNestedTopTransaction() throws StandardException(Code)

exception:
  StandardException - Cloudscape Standard error policy



statusForBeginXactLog
protected int statusForBeginXactLog()(Code)
put this into the beginXact log record to help recovery if we needs to rolled back first, put that in



statusForEndXactLog
protected int statusForEndXactLog()(Code)
put this into the endXact log record to help recovery, nothing to add



toString
public String toString()(Code)
Return the xid as a string.

The virtual lock table depends on this routine returning just the local transaction id as a string, even if it is a global transaction. Joins between the lock table and the transaction table will not work if this routine returns anything other than myId.toString().

The xid as a string.




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.




Fields inherited from org.apache.derby.iapi.store.raw.xact.RawTransaction
final public static Integer ABORT(Code)(Java Doc)
final public static Integer COMMIT(Code)(Java Doc)
final public static Integer LOCK_ESCALATE(Code)(Java Doc)
final public static Integer SAVEPOINT_ROLLBACK(Code)(Java Doc)
protected StandardException observerException(Code)(Java Doc)

Methods inherited from org.apache.derby.iapi.store.raw.xact.RawTransaction
abstract public void addUpdateTransaction(int transactionStatus)(Code)(Java Doc)
abstract public boolean blockBackup(boolean wait) throws StandardException(Code)(Java Doc)
public void checkLogicalOperationOk() throws StandardException(Code)(Java Doc)
abstract public void checkpointInRollForwardRecovery(LogInstant cinstant, long redoLWM) throws StandardException(Code)(Java Doc)
abstract public long[] getCacheStats(String cacheName)(Code)(Java Doc)
abstract public DataFactory getDataFactory()(Code)(Java Doc)
abstract public LogInstant getFirstLogInstant()(Code)(Java Doc)
abstract public GlobalTransactionId getGlobalId()(Code)(Java Doc)
abstract public TransactionId getId()(Code)(Java Doc)
abstract public LogInstant getLastLogInstant()(Code)(Java Doc)
abstract public LockFactory getLockFactory()(Code)(Java Doc)
abstract public DynamicByteArrayOutputStream getLogBuffer()(Code)(Java Doc)
abstract public boolean handlesPostTerminationWork()(Code)(Java Doc)
abstract public boolean inAbort()(Code)(Java Doc)
abstract public boolean inRollForwardRecovery()(Code)(Java Doc)
abstract public boolean isBlockingBackup()(Code)(Java Doc)
abstract public void logAndUndo(Compensation compensation, LogInstant undoInstant, LimitObjectInput in) throws StandardException(Code)(Java Doc)
public void notifyObservers(Object arg)(Code)(Java Doc)
abstract public RawContainerHandle openDroppedContainer(ContainerKey containerId, LockingPolicy locking) throws StandardException(Code)(Java Doc)
abstract public void prepareTransaction()(Code)(Java Doc)
abstract public void reCreateContainerForRedoRecovery(long segmentId, long containerId, ByteArray containerInfo) throws StandardException(Code)(Java Doc)
public boolean recoveryRollbackFirst()(Code)(Java Doc)
abstract public void recoveryTransaction()(Code)(Java Doc)
abstract public void removeUpdateTransaction()(Code)(Java Doc)
abstract public void reprepare() throws StandardException(Code)(Java Doc)
abstract public void resetCacheStats(String cacheName)(Code)(Java Doc)
abstract public void setFirstLogInstant(LogInstant instant)(Code)(Java Doc)
abstract public void setLastLogInstant(LogInstant instant)(Code)(Java Doc)
public void setObserverException(StandardException se)(Code)(Java Doc)
abstract public void setTransactionId(GlobalTransactionId id, TransactionId shortId)(Code)(Java Doc)
abstract public void setTransactionId(Loggable beginXact, TransactionId shortId)(Code)(Java Doc)
abstract public RawTransaction startNestedTopTransaction() throws StandardException(Code)(Java Doc)
abstract protected int statusForBeginXactLog()(Code)(Java Doc)
abstract protected int statusForEndXactLog()(Code)(Java Doc)

w___w__w___.___j__a_v__a_2__s_.__c_o__m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.