com.sun.sgs.impl.service.data.store.db.je
Class JeTransaction

java.lang.Object
  extended by com.sun.sgs.impl.service.data.store.db.je.JeTransaction
All Implemented Interfaces:
DbTransaction

 class JeTransaction
extends Object
implements DbTransaction

Provides a transaction implementation using Berkeley DB Java Edition.


Constructor Summary
JeTransaction(com.sleepycat.je.XAEnvironment env, long timeout, com.sleepycat.je.TransactionConfig txnConfig)
          Creates an instance of this class.
 
Method Summary
 void abort()
          Aborts the transaction.
 void commit()
          Commits the transaction.
(package private) static com.sleepycat.je.Transaction getJeTxn(DbTransaction dbTxn)
          Converts the argument to a Berkeley DB transaction.
 void prepare(byte[] gid)
          Initiates the first phase of a two-phase commit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JeTransaction

JeTransaction(com.sleepycat.je.XAEnvironment env,
              long timeout,
              com.sleepycat.je.TransactionConfig txnConfig)
Creates an instance of this class.

Parameters:
env - the Berkeley DB environment
timeout - the number of milliseconds the transaction should be allowed to run
txnConfig - the Berkeley DB transaction configuration, or null for the default
Throws:
IllegalArgumentException - if timeout is less than 1
DbDatabaseException - if an unexpected database problem occurs
Method Detail

getJeTxn

static com.sleepycat.je.Transaction getJeTxn(DbTransaction dbTxn)
Converts the argument to a Berkeley DB transaction.


prepare

public void prepare(byte[] gid)
Initiates the first phase of a two-phase commit. This method should not be called if any cursors associated with this transaction are still open. No methods should be called on this transaction after this method is called.

Specified by:
prepare in interface DbTransaction
Parameters:
gid - the global transaction ID, which must be at least 128 bytes

commit

public void commit()
Commits the transaction. This method should not be called if any cursors associated with this transaction are still open. No methods should be called on this transaction after this method is called.

Specified by:
commit in interface DbTransaction

abort

public void abort()
Aborts the transaction. This method should not be called if any cursors associated with this transaction are still open. No methods should be called on this transaction after this method is called.

Specified by:
abort in interface DbTransaction

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved