com.sleepycat.je.txn
Class AutoTxn

java.lang.Object
  extended by com.sleepycat.je.txn.Locker
      extended by com.sleepycat.je.txn.Txn
          extended by com.sleepycat.je.txn.AutoTxn
All Implemented Interfaces:
LogReadable, LogWritable

public class AutoTxn
extends Txn

An AutoTxn is one that's created by use of the AutoCommit property.


Field Summary
 
Fields inherited from class com.sleepycat.je.txn.Txn
ACCUMULATED_LIMIT, TXN_NOSYNC, TXN_SYNC, TXN_WRITE_NOSYNC
 
Fields inherited from class com.sleepycat.je.txn.Locker
defaultNoWait, deleteInfo, envImpl, handleLockToHandleMap, handleToHandleLockMap, id, lockManager, lockTimeOutMillis, readUncommittedDefault, thread
 
Constructor Summary
AutoTxn(EnvironmentImpl env, TransactionConfig config)
           
 
Method Summary
 void operationEnd()
          AutoTxns abort or commit at the end of the operation
 void operationEnd(boolean operationOK)
          AutoTxns abort or commit at the end of the operation
 void setHandleLockOwner(boolean operationOK, Database dbHandle, boolean dbIsClosing)
          Transfer any handle locks to the db handle on success.
 
Methods inherited from class com.sleepycat.je.txn.Txn
abort, abort, addLock, addLogInfo, checkState, collectStats, commit, commit, commit, createdNode, dumpLog, generateId, getAbortKnownDeleted, getAbortLsn, getAccumulatedDelta, getFirstActiveLsn, getInMemorySize, getLastLsn, getLogSize, getOnlyAbortable, getTransactionId, getTxnLocker, isHandleLockTransferrable, isReadCommittedIsolation, isSerializableIsolation, isSuspended, isTransactional, lock, logEntryIsTransactional, markDeleteAtTxnEnd, moveWriteToReadLock, newNonTxnLocker, prepare, readFromLog, registerCursor, releaseNonTxnLocks, removeLock, setOnlyAbortable, setPrepared, setSuspended, unRegisterCursor, writeToLog
 
Methods inherited from class com.sleepycat.je.txn.Locker
addDeleteInfo, addToHandleMaps, demoteLock, dumpLockTable, getId, getLockTimeout, getTxnStartMillis, getTxnTimeOut, getWaitingFor, isReadUncommittedDefault, isTimedOut, operationEnd, releaseLock, rememberHandleWriteLock, setLockTimeout, setTxnTimeout, setWaitingFor, sharesLocksWith, toString, transferHandleLock, transferHandleLockToHandle, unregisterHandle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutoTxn

public AutoTxn(EnvironmentImpl env,
               TransactionConfig config)
        throws DatabaseException
Throws:
DatabaseException
Method Detail

operationEnd

public void operationEnd(boolean operationOK)
                  throws DatabaseException
AutoTxns abort or commit at the end of the operation

Overrides:
operationEnd in class Txn
Parameters:
operationOK - is whether the operation succeeded, since that may impact ending behavior. (i.e for AutoTxn)
Throws:
DatabaseException

operationEnd

public void operationEnd()
                  throws DatabaseException
AutoTxns abort or commit at the end of the operation

Overrides:
operationEnd in class Txn
Throws:
DatabaseException

setHandleLockOwner

public void setHandleLockOwner(boolean operationOK,
                               Database dbHandle,
                               boolean dbIsClosing)
                        throws DatabaseException
Transfer any handle locks to the db handle on success. On failure, leave it with this txn, the handle lock will be released at abort and the handle marked invalid.

Overrides:
setHandleLockOwner in class Txn
Throws:
DatabaseException


Copyright 2004-2005 Sleepycat, Inc. All Rights Reserved.