stasis/je-7.5.11/docs/java/com/sleepycat/je/TransactionConfig.html

977 lines
45 KiB
HTML
Raw Normal View History

2019-06-25 20:12:40 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_151) on Tue Oct 31 17:36:46 EDT 2017 -->
<title>TransactionConfig (Oracle - Berkeley DB Java Edition API)</title>
<meta name="date" content="2017-10-31">
<link rel="stylesheet" type="text/css" href="../../../style.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="TransactionConfig (Oracle - Berkeley DB Java Edition API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":42,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":42,"i12":10,"i13":10,"i14":10,"i15":42,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":42,"i23":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/TransactionConfig.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Berkeley DB Java Edition</b><br><font size=\"-1\"> version 7.5.11</font>
</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/sleepycat/je/Transaction.State.html" title="enum in com.sleepycat.je"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/sleepycat/je/TransactionStats.html" title="class in com.sleepycat.je"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/sleepycat/je/TransactionConfig.html" target="_top">Frames</a></li>
<li><a href="TransactionConfig.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.sleepycat.je</div>
<h2 title="Class TransactionConfig" class="title">Class TransactionConfig</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.sleepycat.je.TransactionConfig</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.lang.Cloneable</dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">TransactionConfig</span>
extends java.lang.Object
implements java.lang.Cloneable</pre>
<div class="block">Specifies the attributes of a database environment transaction.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#DEFAULT">DEFAULT</a></span></code>
<div class="block">Default configuration used if null is passed to methods that create a
transaction.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#TransactionConfig--">TransactionConfig</a></span>()</code>
<div class="block">An instance created using the default constructor is initialized with
the system's default settings.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#clone--">clone</a></span>()</code>
<div class="block">Returns a copy of this configuration object.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/ReplicaConsistencyPolicy.html" title="interface in com.sleepycat.je">ReplicaConsistencyPolicy</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#getConsistencyPolicy--">getConsistencyPolicy</a></span>()</code>
<div class="block">Returns the consistency policy associated with the configuration.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/Durability.html" title="class in com.sleepycat.je">Durability</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#getDurability--">getDurability</a></span>()</code>
<div class="block">Returns the durability associated with the configuration.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#getLocalWrite--">getLocalWrite</a></span>()</code>
<div class="block">Returns whether local-write is configured for this transaction.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#getNoSync--">getNoSync</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">replaced by <a href="../../../com/sleepycat/je/TransactionConfig.html#getDurability--"><code>getDurability()</code></a></span></div>
</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#getNoWait--">getNoWait</a></span>()</code>
<div class="block">Returns true if the transaction is configured to not wait if a lock
request cannot be immediately granted.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#getReadCommitted--">getReadCommitted</a></span>()</code>
<div class="block">Returns true if the transaction is configured for read committed
isolation.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#getReadOnly--">getReadOnly</a></span>()</code>
<div class="block">Returns whether read-only is configured for this transaction.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#getReadUncommitted--">getReadUncommitted</a></span>()</code>
<div class="block">Returns true if read operations performed by the transaction are
configured to return modified but not yet committed data.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#getSerializableIsolation--">getSerializableIsolation</a></span>()</code>
<div class="block">Returns true if the transaction has been explicitly configured to have
serializable (degree 3) isolation.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#getSync--">getSync</a></span>()</code>
<div class="block">Returns true if the transaction is configured to write and synchronously
flush the log it when commits.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#getWriteNoSync--">getWriteNoSync</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">replaced by <a href="../../../com/sleepycat/je/TransactionConfig.html#getDurability--"><code>getDurability()</code></a></span></div>
</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#setConsistencyPolicy-com.sleepycat.je.ReplicaConsistencyPolicy-">setConsistencyPolicy</a></span>(<a href="../../../com/sleepycat/je/ReplicaConsistencyPolicy.html" title="interface in com.sleepycat.je">ReplicaConsistencyPolicy</a>&nbsp;consistencyPolicy)</code>
<div class="block">Associates a consistency policy with this configuration.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#setDurability-com.sleepycat.je.Durability-">setDurability</a></span>(<a href="../../../com/sleepycat/je/Durability.html" title="class in com.sleepycat.je">Durability</a>&nbsp;durability)</code>
<div class="block">Configures the durability associated with a transaction when it commits.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#setLocalWrite-boolean-">setLocalWrite</a></span>(boolean&nbsp;localWrite)</code>
<div class="block">Configures this transaction to allow writing to non-replicated
<a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je"><code>Database</code></a>s in a
<a href="../../../com/sleepycat/je/rep/ReplicatedEnvironment.html" title="class in com.sleepycat.je.rep"><code>ReplicatedEnvironment</code></a>.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#setNoSync-boolean-">setNoSync</a></span>(boolean&nbsp;noSync)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">replaced by <a href="../../../com/sleepycat/je/TransactionConfig.html#setDurability-com.sleepycat.je.Durability-"><code>setDurability(com.sleepycat.je.Durability)</code></a></span></div>
</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#setNoWait-boolean-">setNoWait</a></span>(boolean&nbsp;noWait)</code>
<div class="block">Configures the transaction to not wait if a lock request cannot be
immediately granted.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#setReadCommitted-boolean-">setReadCommitted</a></span>(boolean&nbsp;readCommitted)</code>
<div class="block">Configures the transaction for read committed isolation.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#setReadOnly-boolean-">setReadOnly</a></span>(boolean&nbsp;readOnly)</code>
<div class="block">Configures this transaction to disallow write operations, regardless of
whether writes are allowed for the <a href="../../../com/sleepycat/je/Environment.html" title="class in com.sleepycat.je"><code>Environment</code></a> or the
<a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je"><code>Database</code></a>s that are accessed.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#setReadUncommitted-boolean-">setReadUncommitted</a></span>(boolean&nbsp;readUncommitted)</code>
<div class="block">Configures read operations performed by the transaction to return
modified but not yet committed data.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#setSerializableIsolation-boolean-">setSerializableIsolation</a></span>(boolean&nbsp;serializableIsolation)</code>
<div class="block">Configures this transaction to have serializable (degree 3) isolation.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#setSync-boolean-">setSync</a></span>(boolean&nbsp;sync)</code>
<div class="block">Configures the transaction to write and synchronously flush the log it
when commits.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#setWriteNoSync-boolean-">setWriteNoSync</a></span>(boolean&nbsp;writeNoSync)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">replaced by <a href="../../../com/sleepycat/je/TransactionConfig.html#setDurability-com.sleepycat.je.Durability-"><code>setDurability(com.sleepycat.je.Durability)</code></a></span></div>
</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/TransactionConfig.html#toString--">toString</a></span>()</code>
<div class="block">Returns the values for each configuration attribute.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT</h4>
<pre>public static final&nbsp;<a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a> DEFAULT</pre>
<div class="block">Default configuration used if null is passed to methods that create a
transaction.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="TransactionConfig--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TransactionConfig</h4>
<pre>public&nbsp;TransactionConfig()</pre>
<div class="block">An instance created using the default constructor is initialized with
the system's default settings.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setSync-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSync</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a>&nbsp;setSync(boolean&nbsp;sync)</pre>
<div class="block">Configures the transaction to write and synchronously flush the log it
when commits.
<p>This behavior may be set for a database environment using the
Environment.setMutableConfig method. Any value specified to this method
overrides that setting.</p>
<p>The default is false for this class and true for the database
environment.</p>
<p>If true is passed to both setSync and setNoSync, setSync will take
precedence.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>sync</code> - If true, transactions exhibit all the ACID (atomicity,
consistency, isolation, and durability) properties.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
</dl>
</li>
</ul>
<a name="getSync--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSync</h4>
<pre>public&nbsp;boolean&nbsp;getSync()</pre>
<div class="block">Returns true if the transaction is configured to write and synchronously
flush the log it when commits.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the transaction is configured to write and synchronously
flush the log it when commits.</dd>
</dl>
</li>
</ul>
<a name="setNoSync-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNoSync</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a>&nbsp;setNoSync(boolean&nbsp;noSync)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">replaced by <a href="../../../com/sleepycat/je/TransactionConfig.html#setDurability-com.sleepycat.je.Durability-"><code>setDurability(com.sleepycat.je.Durability)</code></a></span></div>
<div class="block">Configures the transaction to not write or synchronously flush the log
it when commits.
<p>This behavior may be set for a database environment using the
Environment.setMutableConfig method. Any value specified to this method
overrides that setting.</p>
<p>The default is false for this class and the database environment.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>noSync</code> - If true, transactions exhibit the ACI (atomicity,
consistency, and isolation) properties, but not D (durability); that is,
database integrity will be maintained, but if the application or system
fails, it is possible some number of the most recently committed
transactions may be undone during recovery. The number of transactions
at risk is governed by how many log updates can fit into the log buffer,
how often the operating system flushes dirty buffers to disk, and how
often the log is checkpointed.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
</dl>
</li>
</ul>
<a name="getNoSync--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNoSync</h4>
<pre>public&nbsp;boolean&nbsp;getNoSync()</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">replaced by <a href="../../../com/sleepycat/je/TransactionConfig.html#getDurability--"><code>getDurability()</code></a></span></div>
<div class="block">Returns true if the transaction is configured to not write or
synchronously flush the log it when commits.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the transaction is configured to not write or
synchronously flush the log it when commits.</dd>
</dl>
</li>
</ul>
<a name="setWriteNoSync-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setWriteNoSync</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a>&nbsp;setWriteNoSync(boolean&nbsp;writeNoSync)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">replaced by <a href="../../../com/sleepycat/je/TransactionConfig.html#setDurability-com.sleepycat.je.Durability-"><code>setDurability(com.sleepycat.je.Durability)</code></a></span></div>
<div class="block">Configures the transaction to write but not synchronously flush the log
it when commits.
<p>This behavior may be set for a database environment using the
Environment.setMutableConfig method. Any value specified to this method
overrides that setting.</p>
<p>The default is false for this class and the database environment.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>writeNoSync</code> - If true, transactions exhibit the ACI (atomicity,
consistency, and isolation) properties, but not D (durability); that is,
database integrity will be maintained, but if the operating system
fails, it is possible some number of the most recently committed
transactions may be undone during recovery. The number of transactions
at risk is governed by how often the operating system flushes dirty
buffers to disk, and how often the log is checkpointed.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
</dl>
</li>
</ul>
<a name="getWriteNoSync--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWriteNoSync</h4>
<pre>public&nbsp;boolean&nbsp;getWriteNoSync()</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">replaced by <a href="../../../com/sleepycat/je/TransactionConfig.html#getDurability--"><code>getDurability()</code></a></span></div>
<div class="block">Returns true if the transaction is configured to write but not
synchronously flush the log it when commits.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the transaction is configured to not write or
synchronously flush the log it when commits.</dd>
</dl>
</li>
</ul>
<a name="setDurability-com.sleepycat.je.Durability-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDurability</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a>&nbsp;setDurability(<a href="../../../com/sleepycat/je/Durability.html" title="class in com.sleepycat.je">Durability</a>&nbsp;durability)</pre>
<div class="block">Configures the durability associated with a transaction when it commits.
Changes to durability are not reflected back to the "sync" booleans --
there isn't a one to one mapping.
Note that you should not use both the durability and the XXXSync() apis
on the same config object.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>durability</code> - the durability definition</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
</dl>
</li>
</ul>
<a name="getDurability--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDurability</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/Durability.html" title="class in com.sleepycat.je">Durability</a>&nbsp;getDurability()</pre>
<div class="block">Returns the durability associated with the configuration.
If <a href="../../../com/sleepycat/je/TransactionConfig.html#setDurability-com.sleepycat.je.Durability-"><code>setDurability(com.sleepycat.je.Durability)</code></a> has not been called, this method returns null.
When no durability settings have been specified using the
<code>TransactionConfig</code>, the default durability is applied to the
<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je"><code>Transaction</code></a> by <a href="../../../com/sleepycat/je/Environment.html#beginTransaction-com.sleepycat.je.Transaction-com.sleepycat.je.TransactionConfig-"><code>Environment.beginTransaction(com.sleepycat.je.Transaction, com.sleepycat.je.TransactionConfig)</code></a> using
<a href="../../../com/sleepycat/je/EnvironmentConfig.html" title="class in com.sleepycat.je"><code>EnvironmentConfig</code></a> settings.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the durability setting currently associated with this config.</dd>
</dl>
</li>
</ul>
<a name="setConsistencyPolicy-com.sleepycat.je.ReplicaConsistencyPolicy-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setConsistencyPolicy</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a>&nbsp;setConsistencyPolicy(<a href="../../../com/sleepycat/je/ReplicaConsistencyPolicy.html" title="interface in com.sleepycat.je">ReplicaConsistencyPolicy</a>&nbsp;consistencyPolicy)</pre>
<div class="block">Associates a consistency policy with this configuration.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>consistencyPolicy</code> - the consistency definition</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
</dl>
</li>
</ul>
<a name="getConsistencyPolicy--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConsistencyPolicy</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/ReplicaConsistencyPolicy.html" title="interface in com.sleepycat.je">ReplicaConsistencyPolicy</a>&nbsp;getConsistencyPolicy()</pre>
<div class="block">Returns the consistency policy associated with the configuration.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the consistency policy currently associated with this config.</dd>
</dl>
</li>
</ul>
<a name="setNoWait-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNoWait</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a>&nbsp;setNoWait(boolean&nbsp;noWait)</pre>
<div class="block">Configures the transaction to not wait if a lock request cannot be
immediately granted.
<p>The default is false for this class and the database environment.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>noWait</code> - If true, transactions will not wait if a lock request
cannot be immediately granted, instead <a href="../../../com/sleepycat/je/LockNotAvailableException.html" title="class in com.sleepycat.je"><code>LockNotAvailableException</code></a>
will be thrown.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
</dl>
</li>
</ul>
<a name="getNoWait--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNoWait</h4>
<pre>public&nbsp;boolean&nbsp;getNoWait()</pre>
<div class="block">Returns true if the transaction is configured to not wait if a lock
request cannot be immediately granted.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the transaction is configured to not wait if a lock
request cannot be immediately granted.</dd>
</dl>
</li>
</ul>
<a name="setReadUncommitted-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setReadUncommitted</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a>&nbsp;setReadUncommitted(boolean&nbsp;readUncommitted)</pre>
<div class="block">Configures read operations performed by the transaction to return
modified but not yet committed data.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>readUncommitted</code> - If true, configure read operations performed by
the transaction to return modified but not yet committed data.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../com/sleepycat/je/LockMode.html#READ_UNCOMMITTED"><code>LockMode.READ_UNCOMMITTED</code></a></dd>
</dl>
</li>
</ul>
<a name="getReadUncommitted--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReadUncommitted</h4>
<pre>public&nbsp;boolean&nbsp;getReadUncommitted()</pre>
<div class="block">Returns true if read operations performed by the transaction are
configured to return modified but not yet committed data.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if read operations performed by the transaction are
configured to return modified but not yet committed data.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../com/sleepycat/je/LockMode.html#READ_UNCOMMITTED"><code>LockMode.READ_UNCOMMITTED</code></a></dd>
</dl>
</li>
</ul>
<a name="setReadCommitted-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setReadCommitted</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a>&nbsp;setReadCommitted(boolean&nbsp;readCommitted)</pre>
<div class="block">Configures the transaction for read committed isolation.
<p>This ensures the stability of the current data item read by the
cursor but permits data read by this transaction to be modified or
deleted prior to the commit of the transaction.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>readCommitted</code> - If true, configure the transaction for read
committed isolation.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a></dd>
</dl>
</li>
</ul>
<a name="getReadCommitted--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReadCommitted</h4>
<pre>public&nbsp;boolean&nbsp;getReadCommitted()</pre>
<div class="block">Returns true if the transaction is configured for read committed
isolation.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the transaction is configured for read committed
isolation.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../com/sleepycat/je/LockMode.html#READ_COMMITTED"><code>LockMode.READ_COMMITTED</code></a></dd>
</dl>
</li>
</ul>
<a name="setSerializableIsolation-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSerializableIsolation</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a>&nbsp;setSerializableIsolation(boolean&nbsp;serializableIsolation)</pre>
<div class="block">Configures this transaction to have serializable (degree 3) isolation.
By setting serializable isolation, phantoms will be prevented.
<p>By default a transaction provides Repeatable Read isolation; <a href="../../../com/sleepycat/je/EnvironmentConfig.html#setTxnSerializableIsolation-boolean-"><code>EnvironmentConfig.setTxnSerializableIsolation(boolean)</code></a> may be called to override
the default. If the environment is configured for serializable
isolation, all transactions will be serializable regardless of whether
this method is called; calling <a href="../../../com/sleepycat/je/TransactionConfig.html#setSerializableIsolation-boolean-"><code>setSerializableIsolation(boolean)</code></a> with a
false parameter will not disable serializable isolation.</p>
The default is false for this class and the database environment.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je"><code>LockMode</code></a></dd>
</dl>
</li>
</ul>
<a name="getSerializableIsolation--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSerializableIsolation</h4>
<pre>public&nbsp;boolean&nbsp;getSerializableIsolation()</pre>
<div class="block">Returns true if the transaction has been explicitly configured to have
serializable (degree 3) isolation.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the transaction has been configured to have serializable
isolation.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je"><code>LockMode</code></a></dd>
</dl>
</li>
</ul>
<a name="setReadOnly-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setReadOnly</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a>&nbsp;setReadOnly(boolean&nbsp;readOnly)</pre>
<div class="block">Configures this transaction to disallow write operations, regardless of
whether writes are allowed for the <a href="../../../com/sleepycat/je/Environment.html" title="class in com.sleepycat.je"><code>Environment</code></a> or the
<a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je"><code>Database</code></a>s that are accessed.
<p>If a write operation is attempted using a read-only transaction,
an <code>UnsupportedOperationException</code> will be thrown.</p>
<p>For a read-only transaction, the transaction's <code>Durability</code> is
ignored, even when it is explicitly specified using <a href="../../../com/sleepycat/je/TransactionConfig.html#setDurability-com.sleepycat.je.Durability-"><code>setDurability(Durability)</code></a>.</p>
<p>In a <a href="../../../com/sleepycat/je/rep/ReplicatedEnvironment.html" title="class in com.sleepycat.je.rep"><code>ReplicatedEnvironment</code></a>, a read-only
transaction implicitly uses
<a href="../../../com/sleepycat/je/Durability.ReplicaAckPolicy.html#NONE"><code>Durability.ReplicaAckPolicy.NONE</code></a>.
A read-only transaction on a Master will thus not be held up, or
throw <a href="../../../com/sleepycat/je/rep/InsufficientReplicasException.html" title="class in com.sleepycat.je.rep"><code>InsufficientReplicasException</code></a>, if the
Master is not in contact with a sufficient number of Replicas at the
time the transaction is initiated.</p>
<p>The default setting is false (writes are allowed).</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
</dl>
</li>
</ul>
<a name="getReadOnly--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReadOnly</h4>
<pre>public&nbsp;boolean&nbsp;getReadOnly()</pre>
<div class="block">Returns whether read-only is configured for this transaction.</div>
</li>
</ul>
<a name="setLocalWrite-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLocalWrite</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a>&nbsp;setLocalWrite(boolean&nbsp;localWrite)</pre>
<div class="block">Configures this transaction to allow writing to non-replicated
<a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je"><code>Database</code></a>s in a
<a href="../../../com/sleepycat/je/rep/ReplicatedEnvironment.html" title="class in com.sleepycat.je.rep"><code>ReplicatedEnvironment</code></a>.
<p>In a replicated environment, a given transaction may be used to
write to either replicated databases or non-replicated databases, but
not both. If a write operation to a replicated database is attempted
when local-write is true, or to a non-replicated database when
local-write is false, an <code>UnsupportedOperationException</code> will be
thrown.</p>
<p>Note that for auto-commit transactions (when the <code>Transaction</code>
parameter is null), the local-write setting is automatically set to
correspond to whether the database is replicated. With auto-commit,
local-write is always true for a non-replicated database, and
always false for a replicated database.</p>
<p>In a replicated environment, a local-write transaction implicitly
uses <a href="../../../com/sleepycat/je/Durability.ReplicaAckPolicy.html#NONE"><code>Durability.ReplicaAckPolicy.NONE</code></a>.
A local-write transaction on a Master will thus not be held up, or
throw <a href="../../../com/sleepycat/je/rep/InsufficientReplicasException.html" title="class in com.sleepycat.je.rep"><code>InsufficientReplicasException</code></a>, if the
Master is not in contact with a sufficient number of Replicas at the
time the transaction is initiated.</p>
<p>By default the local-write setting is false, meaning that the
transaction may only write to replicated Databases in a replicated
environment.</p>
<p>This configuration setting is ignored in a non-replicated Environment
since no databases are replicated.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="rep/ReplicatedEnvironment.html#nonRepDbs>Non-replicated
Databases in a Replicated Environment</a></dd>
</dl>
</li>
</ul>
<a name="getLocalWrite--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalWrite</h4>
<pre>public&nbsp;boolean&nbsp;getLocalWrite()</pre>
<div class="block">Returns whether local-write is configured for this transaction.</div>
</li>
</ul>
<a name="clone--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clone</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je">TransactionConfig</a>&nbsp;clone()</pre>
<div class="block">Returns a copy of this configuration object.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>clone</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;java.lang.String&nbsp;toString()</pre>
<div class="block">Returns the values for each configuration attribute.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the values for each configuration attribute.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/TransactionConfig.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Berkeley DB Java Edition</b><br><font size=\"-1\"> version 7.5.11</font>
</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/sleepycat/je/Transaction.State.html" title="enum in com.sleepycat.je"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/sleepycat/je/TransactionStats.html" title="class in com.sleepycat.je"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/sleepycat/je/TransactionConfig.html" target="_top">Frames</a></li>
<li><a href="TransactionConfig.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><font size=1>Copyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.</font> </small></p>
</body>
</html>