mirror of
https://github.com/berkeleydb/je.git
synced 2024-11-15 01:46:24 +00:00
154 lines
7.4 KiB
HTML
154 lines
7.4 KiB
HTML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||
<title>JE Exceptions</title>
|
||
<link rel="stylesheet" href="gettingStarted.css" type="text/css" />
|
||
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
|
||
<link rel="start" href="index.html" title="Getting Started with Berkeley DB Java Edition" />
|
||
<link rel="up" href="introduction.html" title="Chapter 1. Introduction to Berkeley DB Java Edition" />
|
||
<link rel="prev" href="gettingit.html" title="Getting and Using JE" />
|
||
<link rel="next" href="logfilesrevealed.html" title="Six Things Everyone Should Know about JE Log Files" />
|
||
</head>
|
||
<body>
|
||
<div xmlns="" class="navheader">
|
||
<div class="libver">
|
||
<p>Library Version 12.2.7.5</p>
|
||
</div>
|
||
<table width="100%" summary="Navigation header">
|
||
<tr>
|
||
<th colspan="3" align="center">JE Exceptions</th>
|
||
</tr>
|
||
<tr>
|
||
<td width="20%" align="left"><a accesskey="p" href="gettingit.html">Prev</a> </td>
|
||
<th width="60%" align="center">Chapter 1. Introduction to Berkeley DB Java Edition </th>
|
||
<td width="20%" align="right"> <a accesskey="n" href="logfilesrevealed.html">Next</a></td>
|
||
</tr>
|
||
</table>
|
||
<hr />
|
||
</div>
|
||
<div class="sect1" lang="en" xml:lang="en">
|
||
<div class="titlepage">
|
||
<div>
|
||
<div>
|
||
<h2 class="title" style="clear: both"><a id="jeexceptions"></a>JE Exceptions</h2>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<p>
|
||
Before describing the Java API usage, it is first useful to examine the
|
||
exceptions thrown by those APIs. So, briefly, this section describes the
|
||
exceptions that you can generally expect to encounter when writing JE
|
||
applications. This list is not definitive. Exceptions beyond these can be
|
||
expected, depending on the specific database activity you are performing.
|
||
See the Javadoc for more information.
|
||
</p>
|
||
<p>
|
||
All of the JE APIs throw
|
||
<code class="classname">DatabaseException</code>.
|
||
<a class="ulink" href="../java/com/sleepycat/je/DatabaseException.html" target="_top">DatabaseException</a> extends
|
||
<code class="classname">java.lang.Exception</code>. Also, the following
|
||
classes are subclasses of <code class="classname">DatabaseException</code>:
|
||
</p>
|
||
<div class="itemizedlist">
|
||
<ul type="disc">
|
||
<li>
|
||
<p>
|
||
<a class="ulink" href="../java/com/sleepycat/je/DatabaseNotFoundException.html" target="_top">DatabaseNotFoundException</a>
|
||
</p>
|
||
<p>
|
||
Thrown whenever an operation requires a database, and that
|
||
database cannot be found.
|
||
</p>
|
||
</li>
|
||
<li>
|
||
<p>
|
||
<a class="ulink" href="../java/com/sleepycat/je/DiskLimitException.html" target="_top">DiskLimitException</a>
|
||
</p>
|
||
<p>
|
||
Indicates that you have reached your disk usage thresholds. Writes are
|
||
no longer allowed when these thresholds are exceeded. The thresholds
|
||
are set using the <a class="ulink" href="../java/com/sleepycat/je/EnvironmentConfig.html#MAX_DISK" target="_top">EnvironmentConfig.MAX_DISK</a> and <a class="ulink" href="../java/com/sleepycat/je/EnvironmentConfig.html#FREE_DISK" target="_top">EnvironmentConfig.FREE_DISK</a> properties. This exception
|
||
can be thrown as the result of any write operation, including database
|
||
record writes, checkpoints, and database and environment syncs.
|
||
</p>
|
||
<p>
|
||
When closing the environment, this exception can be seen.
|
||
However, the environment will still be properly closed.
|
||
</p>
|
||
<p>
|
||
For information on setting these properties, see
|
||
<a class="xref" href="diskthreshold.html" title="Setting Disk Thresholds">Setting Disk Thresholds</a>.
|
||
</p>
|
||
</li>
|
||
<li>
|
||
<p>
|
||
<a class="ulink" href="../java/com/sleepycat/je/EnvironmentFailureException.html" target="_top">EnvironmentFailureException</a>
|
||
</p>
|
||
<p>
|
||
Indicates that a failure has occurred that could impact the Environment as
|
||
a whole. Depending on the nature of the failure, this exception might
|
||
indicate that <a class="ulink" href="../java/com/sleepycat/je/Environment.html#close--" target="_top">Environment.close()</a> should
|
||
be called. Use <a class="ulink" href="../java/com/sleepycat/je/Environment.html#isValid--" target="_top">Environment.isValid()</a> to
|
||
determine if all <a class="ulink" href="../java/com/sleepycat/je/Environment.html" target="_top">Environment</a> handles must
|
||
be reopened. If <code class="literal">true</code>, the environment can
|
||
continue operating without being reopened.
|
||
</p>
|
||
</li>
|
||
<li>
|
||
<p>
|
||
<a class="ulink" href="../java/com/sleepycat/je/LockConflictException.html" target="_top">LockConflictException</a>
|
||
</p>
|
||
<p>
|
||
The common base class for all exceptions that result from record
|
||
lock conflicts. Upon receiving this exception, any open cursors
|
||
must be closed, the enclosing transaction aborted and,
|
||
optionally, the transaction retried. Transactions are described
|
||
in the <em class="citetitle">Berkeley DB, Java Edition Getting Started with Transaction Processing</em> guide.
|
||
</p>
|
||
</li>
|
||
<li>
|
||
<p>
|
||
<a class="ulink" href="../java/com/sleepycat/je/LogWriteException.html" target="_top">LogWriteException</a>
|
||
</p>
|
||
<p>
|
||
Thrown when an <code class="classname">IOException</code> or other failure occurs
|
||
when writing to the JE log. This exception might be indicative of a
|
||
full disk, although an <code class="classname">IOException</code> does not contain
|
||
enough information to determine this definitively.
|
||
</p>
|
||
<p>
|
||
This exception can be thrown as the result of any write
|
||
operation, including database record writes, checkpoints, and
|
||
database and environment syncs.
|
||
</p>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
<p>
|
||
Note that <code class="classname">DatabaseException</code> and its subclasses belong to the
|
||
<code class="literal">com.sleepycat.je</code> package.
|
||
</p>
|
||
</div>
|
||
<div class="navfooter">
|
||
<hr />
|
||
<table width="100%" summary="Navigation footer">
|
||
<tr>
|
||
<td width="40%" align="left"><a accesskey="p" href="gettingit.html">Prev</a> </td>
|
||
<td width="20%" align="center">
|
||
<a accesskey="u" href="introduction.html">Up</a>
|
||
</td>
|
||
<td width="40%" align="right"> <a accesskey="n" href="logfilesrevealed.html">Next</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="40%" align="left" valign="top">Getting and Using JE </td>
|
||
<td width="20%" align="center">
|
||
<a accesskey="h" href="index.html">Home</a>
|
||
</td>
|
||
<td width="40%" align="right" valign="top"> Six Things Everyone Should Know about JE Log Files</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</body>
|
||
</html>
|