Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > by-pkgid > f63dbb759665f97bb1c1cc6371806ce5 > files > 619

libdb4.3-devel-4.3.21-1mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2_05) on Mon Nov 08 21:00:51 EST 2004 -->
<TITLE>
TransactionRunner (Sleepycat Software, Inc. - Berkeley DB Java API)
</TITLE>

<META NAME="keywords" CONTENT="com.sleepycat.collections.TransactionRunner class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="TransactionRunner (Sleepycat Software, Inc. - Berkeley DB Java API)";
}
</SCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TransactionRunner.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Berkeley DB</b><br><font size="-1"> version 4.3.21</font></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/sleepycat/collections/StoredValueSet.html" title="class in com.sleepycat.collections"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/sleepycat/collections/TupleSerialFactory.html" title="class in com.sleepycat.collections"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="TransactionRunner.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>

</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.sleepycat.collections</FONT>
<BR>
Class TransactionRunner</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><B>com.sleepycat.collections.TransactionRunner</B>
</PRE>
<HR>
<DL>
<DT>public class <B>TransactionRunner</B><DT>extends <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL>

<P>
Starts a transaction, calls <A HREF="../../../com/sleepycat/collections/TransactionWorker.html#doWork()"><CODE>TransactionWorker.doWork()</CODE></A>, and handles
 transaction retry and exceptions.
<P>

<P>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/TransactionRunner.html#DEFAULT_MAX_RETRIES">DEFAULT_MAX_RETRIES</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default maximum number of retries.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/TransactionRunner.html#TransactionRunner(com.sleepycat.db.Environment)">TransactionRunner</A></B>(<A HREF="../../../com/sleepycat/db/Environment.html" title="class in com.sleepycat.db">Environment</A>&nbsp;env)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a transaction runner for a given Berkeley DB environment.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/TransactionRunner.html#TransactionRunner(com.sleepycat.db.Environment, int, com.sleepycat.db.TransactionConfig)">TransactionRunner</A></B>(<A HREF="../../../com/sleepycat/db/Environment.html" title="class in com.sleepycat.db">Environment</A>&nbsp;env,
                  int&nbsp;maxRetries,
                  <A HREF="../../../com/sleepycat/db/TransactionConfig.html" title="class in com.sleepycat.db">TransactionConfig</A>&nbsp;config)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a transaction runner for a given Berkeley DB environment and
 with a given number of maximum retries.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/TransactionRunner.html#getAllowNestedTransactions()">getAllowNestedTransactions</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether nested transactions will be created if
 <code>run()</code> is called when a transaction is already active for
 the current thread.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/TransactionRunner.html#getMaxRetries()">getMaxRetries</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum number of retries that will be performed when
 deadlocks are detected.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/sleepycat/db/TransactionConfig.html" title="class in com.sleepycat.db">TransactionConfig</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/TransactionRunner.html#getTransactionConfig()">getTransactionConfig</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the transaction configuration used for calling
 <A HREF="../../../com/sleepycat/db/Environment.html#beginTransaction(com.sleepycat.db.Transaction, com.sleepycat.db.TransactionConfig)"><CODE>Environment.beginTransaction(com.sleepycat.db.Transaction, com.sleepycat.db.TransactionConfig)</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/TransactionRunner.html#run(com.sleepycat.collections.TransactionWorker)">run</A></B>(<A HREF="../../../com/sleepycat/collections/TransactionWorker.html" title="interface in com.sleepycat.collections">TransactionWorker</A>&nbsp;worker)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calls the <A HREF="../../../com/sleepycat/collections/TransactionWorker.html#doWork()"><CODE>TransactionWorker.doWork()</CODE></A> method and, for transactional
 environments, begins and ends a transaction.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/TransactionRunner.html#setAllowNestedTransactions(boolean)">setAllowNestedTransactions</A></B>(boolean&nbsp;allowNestedTxn)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Changes whether nested transactions will be created if
 <code>run()</code> is called when a transaction is already active for
 the current thread.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/TransactionRunner.html#setMaxRetries(int)">setMaxRetries</A></B>(int&nbsp;maxRetries)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Changes the maximum number of retries that will be performed when
 deadlocks are detected.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sleepycat/collections/TransactionRunner.html#setTransactionConfig(com.sleepycat.db.TransactionConfig)">setTransactionConfig</A></B>(<A HREF="../../../com/sleepycat/db/TransactionConfig.html" title="class in com.sleepycat.db">TransactionConfig</A>&nbsp;config)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Changes the transaction configuration used for calling
 <A HREF="../../../com/sleepycat/db/Environment.html#beginTransaction(com.sleepycat.db.Transaction, com.sleepycat.db.TransactionConfig)"><CODE>Environment.beginTransaction(com.sleepycat.db.Transaction, com.sleepycat.db.TransactionConfig)</CODE></A>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="DEFAULT_MAX_RETRIES"><!-- --></A><H3>
DEFAULT_MAX_RETRIES</H3>
<PRE>
public static final int <B>DEFAULT_MAX_RETRIES</B></PRE>
<DL>
<DD>The default maximum number of retries.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sleepycat.collections.TransactionRunner.DEFAULT_MAX_RETRIES">Constant Field Values</A></DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="TransactionRunner(com.sleepycat.db.Environment)"><!-- --></A><H3>
TransactionRunner</H3>
<PRE>
public <B>TransactionRunner</B>(<A HREF="../../../com/sleepycat/db/Environment.html" title="class in com.sleepycat.db">Environment</A>&nbsp;env)</PRE>
<DL>
<DD>Creates a transaction runner for a given Berkeley DB environment.
 The default maximum number of retries (<A HREF="../../../com/sleepycat/collections/TransactionRunner.html#DEFAULT_MAX_RETRIES"><CODE>DEFAULT_MAX_RETRIES</CODE></A>) and
 a null (default) <A HREF="../../../com/sleepycat/db/TransactionConfig.html" title="class in com.sleepycat.db"><CODE>TransactionConfig</CODE></A> will be used.
<P>
<DT><B>Parameters:</B><DD><CODE>env</CODE> - is the environment for running transactions.</DL>
<HR>

<A NAME="TransactionRunner(com.sleepycat.db.Environment, int, com.sleepycat.db.TransactionConfig)"><!-- --></A><H3>
TransactionRunner</H3>
<PRE>
public <B>TransactionRunner</B>(<A HREF="../../../com/sleepycat/db/Environment.html" title="class in com.sleepycat.db">Environment</A>&nbsp;env,
                         int&nbsp;maxRetries,
                         <A HREF="../../../com/sleepycat/db/TransactionConfig.html" title="class in com.sleepycat.db">TransactionConfig</A>&nbsp;config)</PRE>
<DL>
<DD>Creates a transaction runner for a given Berkeley DB environment and
 with a given number of maximum retries.
<P>
<DT><B>Parameters:</B><DD><CODE>env</CODE> - is the environment for running transactions.<DD><CODE>maxRetries</CODE> - is the maximum number of retries that will be
 performed when deadlocks are detected.<DD><CODE>config</CODE> - the transaction configuration used for calling
 <A HREF="../../../com/sleepycat/db/Environment.html#beginTransaction(com.sleepycat.db.Transaction, com.sleepycat.db.TransactionConfig)"><CODE>Environment.beginTransaction(com.sleepycat.db.Transaction, com.sleepycat.db.TransactionConfig)</CODE></A>, or null to use the default
 configuration.  The configuration object is not cloned, and
 any modifications to it will impact subsequent transactions.</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getMaxRetries()"><!-- --></A><H3>
getMaxRetries</H3>
<PRE>
public int <B>getMaxRetries</B>()</PRE>
<DL>
<DD>Returns the maximum number of retries that will be performed when
 deadlocks are detected.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setMaxRetries(int)"><!-- --></A><H3>
setMaxRetries</H3>
<PRE>
public void <B>setMaxRetries</B>(int&nbsp;maxRetries)</PRE>
<DL>
<DD>Changes the maximum number of retries that will be performed when
 deadlocks are detected.
 Calling this method does not impact transactions already running.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getAllowNestedTransactions()"><!-- --></A><H3>
getAllowNestedTransactions</H3>
<PRE>
public boolean <B>getAllowNestedTransactions</B>()</PRE>
<DL>
<DD>Returns whether nested transactions will be created if
 <code>run()</code> is called when a transaction is already active for
 the current thread.
 By default this property is false.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setAllowNestedTransactions(boolean)"><!-- --></A><H3>
setAllowNestedTransactions</H3>
<PRE>
public void <B>setAllowNestedTransactions</B>(boolean&nbsp;allowNestedTxn)</PRE>
<DL>
<DD>Changes whether nested transactions will be created if
 <code>run()</code> is called when a transaction is already active for
 the current thread.
 Calling this method does not impact transactions already running.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getTransactionConfig()"><!-- --></A><H3>
getTransactionConfig</H3>
<PRE>
public <A HREF="../../../com/sleepycat/db/TransactionConfig.html" title="class in com.sleepycat.db">TransactionConfig</A> <B>getTransactionConfig</B>()</PRE>
<DL>
<DD>Returns the transaction configuration used for calling
 <A HREF="../../../com/sleepycat/db/Environment.html#beginTransaction(com.sleepycat.db.Transaction, com.sleepycat.db.TransactionConfig)"><CODE>Environment.beginTransaction(com.sleepycat.db.Transaction, com.sleepycat.db.TransactionConfig)</CODE></A>.

 <p>If this property is null, the default configuration is used.  The
 configuration object is not cloned, and any modifications to it will
 impact subsequent transactions.</p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the transaction configuration.</DL>
</DD>
</DL>
<HR>

<A NAME="setTransactionConfig(com.sleepycat.db.TransactionConfig)"><!-- --></A><H3>
setTransactionConfig</H3>
<PRE>
public void <B>setTransactionConfig</B>(<A HREF="../../../com/sleepycat/db/TransactionConfig.html" title="class in com.sleepycat.db">TransactionConfig</A>&nbsp;config)</PRE>
<DL>
<DD>Changes the transaction configuration used for calling
 <A HREF="../../../com/sleepycat/db/Environment.html#beginTransaction(com.sleepycat.db.Transaction, com.sleepycat.db.TransactionConfig)"><CODE>Environment.beginTransaction(com.sleepycat.db.Transaction, com.sleepycat.db.TransactionConfig)</CODE></A>.

 <p>If this property is null, the default configuration is used.  The
 configuration object is not cloned, and any modifications to it will
 impact subsequent transactions.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>config</CODE> - the transaction configuration.</DL>
</DD>
</DL>
<HR>

<A NAME="run(com.sleepycat.collections.TransactionWorker)"><!-- --></A><H3>
run</H3>
<PRE>
public void <B>run</B>(<A HREF="../../../com/sleepycat/collections/TransactionWorker.html" title="interface in com.sleepycat.collections">TransactionWorker</A>&nbsp;worker)
         throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A>,
                <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Calls the <A HREF="../../../com/sleepycat/collections/TransactionWorker.html#doWork()"><CODE>TransactionWorker.doWork()</CODE></A> method and, for transactional
 environments, begins and ends a transaction.  If the environment given
 is non-transactional, a transaction will not be used but the doWork()
 method will still be called.

 <p> In a transactional environment, a new transaction is started before
 calling doWork().  This will start a nested transaction if one is
 already active.  If DeadlockException is thrown by doWork(), the
 transaction will be aborted and the process will be repeated up to the
 maximum number of retries specified.  If another exception is thrown by
 doWork() or the maximum number of retries has occurred, the transaction
 will be aborted and the exception will be rethrown by this method.  If
 no exception is thrown by doWork(), the transaction will be committed.
 This method will not attempt to commit or abort a transaction if it has
 already been committed or aborted by doWork(). </p>
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - when it is thrown by doWork() and the
 maximum number of retries has occurred.  The transaction will have been
 aborted by this method.
<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE> - when any other exception is thrown by doWork().  The
 exception will first be unwrapped by calling <A HREF="../../../com/sleepycat/util/ExceptionUnwrapper.html#unwrap(java.lang.Exception)"><CODE>ExceptionUnwrapper.unwrap(java.lang.Exception)</CODE></A>.  The transaction will have been aborted by
 this method.
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TransactionRunner.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Berkeley DB</b><br><font size="-1"> version 4.3.21</font></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/sleepycat/collections/StoredValueSet.html" title="class in com.sleepycat.collections"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/sleepycat/collections/TupleSerialFactory.html" title="class in com.sleepycat.collections"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="TransactionRunner.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>

</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
<font size=1><a href="../../../../sleepycat/legal.html">Copyright (c) 1996-2004</a> <a href="http://www.sleepycat.com">Sleepycat Software, Inc.</a> - All rights reserved.</font>
</BODY>
</HTML>