stasis/je-7.5.11/docs/java/com/sleepycat/je/EnvironmentFailureException.html
2019-06-25 16:12:40 -04:00

389 lines
18 KiB
HTML

<!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:45 EDT 2017 -->
<title>EnvironmentFailureException (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="EnvironmentFailureException (Oracle - Berkeley DB Java Edition API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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/EnvironmentFailureException.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/EnvironmentConfig.html" title="class in com.sleepycat.je"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/sleepycat/je/EnvironmentLockedException.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/EnvironmentFailureException.html" target="_top">Frames</a></li>
<li><a href="EnvironmentFailureException.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>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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 EnvironmentFailureException" class="title">Class EnvironmentFailureException</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>java.lang.Throwable</li>
<li>
<ul class="inheritance">
<li>java.lang.Exception</li>
<li>
<ul class="inheritance">
<li>java.lang.RuntimeException</li>
<li>
<ul class="inheritance">
<li><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">com.sleepycat.je.DatabaseException</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../com/sleepycat/je/RunRecoveryException.html" title="class in com.sleepycat.je">com.sleepycat.je.RunRecoveryException</a></li>
<li>
<ul class="inheritance">
<li>com.sleepycat.je.EnvironmentFailureException</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable</dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../com/sleepycat/je/EnvironmentLockedException.html" title="class in com.sleepycat.je">EnvironmentLockedException</a>, <a href="../../../com/sleepycat/je/EnvironmentNotFoundException.html" title="class in com.sleepycat.je">EnvironmentNotFoundException</a>, <a href="../../../com/sleepycat/je/EnvironmentWedgedException.html" title="class in com.sleepycat.je">EnvironmentWedgedException</a>, <a href="../../../com/sleepycat/je/rep/GroupShutdownException.html" title="class in com.sleepycat.je.rep">GroupShutdownException</a>, <a href="../../../com/sleepycat/je/LogWriteException.html" title="class in com.sleepycat.je">LogWriteException</a>, <a href="../../../com/sleepycat/je/rep/RestartRequiredException.html" title="class in com.sleepycat.je.rep">RestartRequiredException</a>, <a href="../../../com/sleepycat/je/ThreadInterruptedException.html" title="class in com.sleepycat.je">ThreadInterruptedException</a>, <a href="../../../com/sleepycat/je/VersionMismatchException.html" title="class in com.sleepycat.je">VersionMismatchException</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">EnvironmentFailureException</span>
extends <a href="../../../com/sleepycat/je/RunRecoveryException.html" title="class in com.sleepycat.je">RunRecoveryException</a></pre>
<div class="block">Indicates that a failure has occurred that could impact the <code>Environment</code> as a whole. For failures that impact only the current
operation and/or transaction, see <a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je"><code>OperationFailureException</code></a>). For
an overview of all exceptions thrown by JE, see <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je"><code>DatabaseException</code></a>.
<p>Depending on the nature of the failure, this exception may indicate that
<a href="../../../com/sleepycat/je/Environment.html#close--"><code>Environment.close()</code></a> must be called. The application should catch
<code>EnvironmentFailureException</code> and then call <a href="../../../com/sleepycat/je/Environment.html#isValid--"><code>Environment.isValid()</code></a>. If <code>false</code> is returned, all <code>Environment</code>
handles (instances) must be closed and re-opened in order to run recovery
and continue operating. If <code>true</code> is returned, the <code>Environment</code> can continue operating without being closed and re-opened.
Also note that <a href="../../../com/sleepycat/je/Environment.html#isValid--"><code>Environment.isValid()</code></a> may be called at any time, not
just during exception handling.</p>
<p>The use of the <a href="../../../com/sleepycat/je/Environment.html#isValid--"><code>Environment.isValid()</code></a> method allows JE to determine
dynamically whether the failure requires recovery or not, and allows for
this determination to change in future releases. Over time, internal
improvements to error handling may allow more error conditions to be handled
without invalidating the <code>Environment</code>.</p>
<p>(Although this exception class extends <a href="../../../com/sleepycat/je/RunRecoveryException.html" title="class in com.sleepycat.je"><code>RunRecoveryException</code></a>, it
does not always indicate that recovery is necessary, as described above.
<code>RunRecoveryException</code> has been deprecated and <code>EnvironmentFailureException</code> should be used instead.)</p>
<p>If an <code>EnvironmentFailureException</code> consistently occurs soon after
opening the Environment, this may indicate a persistent problem. It may
indicate a system problem or a persistent storage problem. In this case,
human intervention is normally required and restoring from a backup may be
necessary.</p>
<p>Note that subclasses of <code>EnvironmentFailureException</code> indicate how
to handle the exception in more specific ways.</p>
<ul>
<li>If <code>Thread.interrupt</code> is called for a thread performing JE
operations, a <a href="../../../com/sleepycat/je/ThreadInterruptedException.html" title="class in com.sleepycat.je"><code>ThreadInterruptedException</code></a> is thrown. Since
interrupting a thread is intentional, it does not indicate a persistent
problem and human intervention is not normally required.
</li>
<li>If an <code>IOException</code> occurs while writing to the JE log, a
<a href="../../../com/sleepycat/je/LogWriteException.html" title="class in com.sleepycat.je"><code>LogWriteException</code></a> is thrown. Although an <code>IOException</code> can
occur for different reasons, it is a hint that the disk may be full and
applications may wish to attempt recovery after making more disk space
available.
</li>
<li>For replicated environments, see the subclasses of <code>EnvironmentFailureException</code> in the <a href="../../../com/sleepycat/je/rep/package-summary.html"><code>com.sleepycat.je.rep</code></a> package for
more information. Such exceptions may require special handling.
</li>
</ul>
<p>If <a href="../../../com/sleepycat/je/Environment.html#close--"><code>Environment.close()</code></a> is not called after an <code>EnvironmentFailureException</code> invalidates the <code>Environment</code>, all
subsequent method calls for the <code>Environment</code> will throw the same
exception. This provides more than one opportunity to catch and handle the
specific exception subclass that caused the failure.</p></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../serialized-form.html#com.sleepycat.je.EnvironmentFailureException">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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></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>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/EnvironmentFailureException.html#getMessage--">getMessage</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/je/EnvironmentFailureException.html#isCorrupted--">isCorrupted</a></span>()</code>
<div class="block">Whether the EnvironmentFailureException indicates that the log is
corrupt, meaning that a network restore (or restore from backup) should
be performed.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Throwable">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Throwable</h3>
<code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li>
</ul>
<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>clone, 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">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getMessage--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMessage</h4>
<pre>public&nbsp;java.lang.String&nbsp;getMessage()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html#getMessage--">getMessage</a></code>&nbsp;in class&nbsp;<code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code></dd>
</dl>
</li>
</ul>
<a name="isCorrupted--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isCorrupted</h4>
<pre>public&nbsp;boolean&nbsp;isCorrupted()</pre>
<div class="block">Whether the EnvironmentFailureException indicates that the log is
corrupt, meaning that a network restore (or restore from backup) should
be performed.
<p>
This method currently returns true only when corruption has been
detected and is persistent. This may have been detected by verifying
checksums in the disk data log, and in this case the corruption
indicates a media/disk failure. The checksum error may have
been detected when accessing data normally via the JE API, or by the
background data verifier (see <a href="../../../com/sleepycat/je/EnvironmentConfig.html#VERIFY_LOG"><code>EnvironmentConfig.VERIFY_LOG</code></a>).
Or a persistent Btree corruption may have been detected by the data
verifier (see <a href="../../../com/sleepycat/je/EnvironmentConfig.html#VERIFY_BTREE"><code>EnvironmentConfig.VERIFY_BTREE</code></a>) or by the
<a href="../../../com/sleepycat/je/Environment.html#verify-com.sleepycat.je.VerifyConfig-java.io.PrintStream-"><code>Environment.verify(VerifyConfig, PrintStream)</code></a> or
<a href="../../../com/sleepycat/je/Database.html#verify-com.sleepycat.je.VerifyConfig-"><code>Database.verify(VerifyConfig)</code></a> methods. This method will
returns true in all such cases.
<p>
Additionally, when a persistent corruption is detected and the
Environment is open for read-write access, a marker file named
7fffffff.jdb is created in the Environment directory that will
prevent re-opening the environment. If an attempt is made to
re-open the Environment, the original EnvironmentFailureException
will be thrown. This is meant to safeguard against using a corrupt
environment when the original exception is accidentally overlooked.
While the marker file can be deleted to allow re-opening the
environment, this is normally unsafe and is not recommended.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the environment is corrupt.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>7.3</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/EnvironmentFailureException.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/EnvironmentConfig.html" title="class in com.sleepycat.je"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../com/sleepycat/je/EnvironmentLockedException.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/EnvironmentFailureException.html" target="_top">Frames</a></li>
<li><a href="EnvironmentFailureException.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>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&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>