diff options
author | Jesse Morgan <morganjm@amazon.com> | 2013-12-03 14:03:28 -0800 |
---|---|---|
committer | Jesse Morgan <morganjm@amazon.com> | 2013-12-03 14:03:28 -0800 |
commit | d479253768d296a40b4f699e1de9b03c7146a97a (patch) | |
tree | 208e70d81fc3e477a37d3f9ca6475c39bb6410d3 /apidocs/com/amazon/carbonado/Trigger.html |
Adding javadocs and Carbonado User Guidegh-pages
Diffstat (limited to 'apidocs/com/amazon/carbonado/Trigger.html')
-rw-r--r-- | apidocs/com/amazon/carbonado/Trigger.html | 971 |
1 files changed, 971 insertions, 0 deletions
diff --git a/apidocs/com/amazon/carbonado/Trigger.html b/apidocs/com/amazon/carbonado/Trigger.html new file mode 100644 index 0000000..b2946f2 --- /dev/null +++ b/apidocs/com/amazon/carbonado/Trigger.html @@ -0,0 +1,971 @@ +<!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 (version 1.7.0_25) on Tue Dec 03 13:53:40 PST 2013 --> +<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> +<title>Trigger (Carbonado 1.2.3 API)</title> +<meta name="date" content="2013-12-03"> +<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> +</head> +<body> +<script type="text/javascript"><!-- + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Trigger (Carbonado 1.2.3 API)"; + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar_top"> +<!-- --> +</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/Trigger.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-files/index-1.html">Index</a></li> +<li><a href="../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../com/amazon/carbonado/Trigger.Abort.html" title="class in com.amazon.carbonado"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../index.html?com/amazon/carbonado/Trigger.html" target="_top">Frames</a></li> +<li><a href="Trigger.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_top"> +<li><a href="../../../allclasses-noframe.html">All 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: </li> +<li><a href="#nested_class_summary">Nested</a> | </li> +<li>Field | </li> +<li><a href="#constructor_summary">Constr</a> | </li> +<li><a href="#method_summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor_detail">Constr</a> | </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.amazon.carbonado</div> +<h2 title="Class Trigger" class="title">Class Trigger<S></h2> +</div> +<div class="contentContainer"> +<ul class="inheritance"> +<li>java.lang.Object</li> +<li> +<ul class="inheritance"> +<li>com.amazon.carbonado.Trigger<S></li> +</ul> +</li> +</ul> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>Direct Known Subclasses:</dt> +<dd><a href="../../../com/amazon/carbonado/capability/ResyncCapability.Listener.html" title="class in com.amazon.carbonado.capability">ResyncCapability.Listener</a>, <a href="../../../com/amazon/carbonado/spi/TriggerManager.html" title="class in com.amazon.carbonado.spi">TriggerManager</a></dd> +</dl> +<hr> +<br> +<pre>public abstract class <span class="strong">Trigger<S></span> +extends java.lang.Object</pre> +<div class="block">Callback mechanism to allow custom code to run when a storable is + persisted. By default, the methods defined in this class do + nothing. Subclass and override trigger conditions of interest, and then + <a href="../../../com/amazon/carbonado/Storage.html#addTrigger(com.amazon.carbonado.Trigger)"><code>register</code></a> it. Each overridden trigger method is + called in the same transaction scope as the persist operation. Trigger + implementations are encouraged to override the equals method, to prevent + accidental double registration. + + <p>To ensure proper nesting, all "before" events are run in the + <em>opposite</em> order that the trigger was registered. All "after" and + "failed" events are run in the same order that the trigger was registered. + In other words, the last added trigger is at the outermost nesting level. + + <p>Triggers always run within the same transaction as the triggering + operation. The exact isolation level and update mode is outside the + trigger's control. If an explicit isolation level or update mode is + required, create a nested transaction within a trigger method. A trigger's + nested transaction can also be defined to span the entire triggering operation. + To do this, enter the transaction in the "before" method, but return the + transaction object without exiting it. The "after" method is responsible for + exiting the transaction. It extracts (or simply casts) the transaction from + the state object passed into it. When creating spanning transactions like + this, it is critical that the "failed" method be defined to properly exit + the transaction upon failure.</div> +<dl><dt><span class="strong">Author:</span></dt> + <dd>Brian S O'Neill</dd></dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ======== NESTED CLASS SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="nested_class_summary"> +<!-- --> +</a> +<h3>Nested Class Summary</h3> +<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> +<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Class and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>static class </code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.Abort.html" title="class in com.amazon.carbonado">Trigger.Abort</a></strong></code> </td> +</tr> +</table> +</li> +</ul> +<!-- ======== CONSTRUCTOR SUMMARY ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor_summary"> +<!-- --> +</a> +<h3>Constructor Summary</h3> +<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> +<caption><span>Constructors</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colOne" scope="col">Constructor and Description</th> +</tr> +<tr class="altColor"> +<td class="colOne"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#Trigger()">Trigger</a></strong>()</code> </td> +</tr> +</table> +</li> +</ul> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method_summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span>Methods</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>protected <a href="../../../com/amazon/carbonado/Trigger.Abort.html" title="class in com.amazon.carbonado">Trigger.Abort</a></code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#abortTry()">abortTry</a></strong>()</code> +<div class="block">Call to quickly abort a "try" operation, returning false to the + caller.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#afterDelete(S, java.lang.Object)">afterDelete</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state)</code> +<div class="block">Called right after a storable has been successfully deleted.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#afterInsert(S, java.lang.Object)">afterInsert</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state)</code> +<div class="block">Called right after a storable has been successfully inserted.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#afterLoad(S)">afterLoad</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable)</code> +<div class="block">Called right after a storable has been successfully loaded or + fetched.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#afterTryDelete(S, java.lang.Object)">afterTryDelete</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state)</code> +<div class="block">Called right after a storable has been successfully deleted via + tryDelete.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#afterTryInsert(S, java.lang.Object)">afterTryInsert</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state)</code> +<div class="block">Called right after a storable has been successfully inserted via + tryInsert.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#afterTryUpdate(S, java.lang.Object)">afterTryUpdate</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state)</code> +<div class="block">Called right after a storable has been successfully updated via + tryUpdate.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#afterUpdate(S, java.lang.Object)">afterUpdate</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state)</code> +<div class="block">Called right after a storable has been successfully updated.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>java.lang.Object</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#beforeDelete(S)">beforeDelete</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable)</code> +<div class="block">Called before a storable is to be deleted.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>java.lang.Object</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#beforeDelete(com.amazon.carbonado.Transaction, S)">beforeDelete</a></strong>(<a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado">Transaction</a> txn, + <a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable)</code> +<div class="block">Called before a storable is to be deleted.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>java.lang.Object</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#beforeInsert(S)">beforeInsert</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable)</code> +<div class="block">Called before a storable is to be inserted.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>java.lang.Object</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#beforeInsert(com.amazon.carbonado.Transaction, S)">beforeInsert</a></strong>(<a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado">Transaction</a> txn, + <a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable)</code> +<div class="block">Called before a storable is to be inserted.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>java.lang.Object</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#beforeTryDelete(S)">beforeTryDelete</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable)</code> +<div class="block">Called before a storable is to be deleted via tryDelete.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>java.lang.Object</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#beforeTryDelete(com.amazon.carbonado.Transaction, S)">beforeTryDelete</a></strong>(<a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado">Transaction</a> txn, + <a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable)</code> +<div class="block">Called before a storable is to be deleted via tryDelete.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>java.lang.Object</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#beforeTryInsert(S)">beforeTryInsert</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable)</code> +<div class="block">Called before a storable is to be inserted via tryInsert.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>java.lang.Object</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#beforeTryInsert(com.amazon.carbonado.Transaction, S)">beforeTryInsert</a></strong>(<a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado">Transaction</a> txn, + <a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable)</code> +<div class="block">Called before a storable is to be inserted via tryInsert.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>java.lang.Object</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#beforeTryUpdate(S)">beforeTryUpdate</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable)</code> +<div class="block">Called before a storable is to be updated via tryUpdate.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>java.lang.Object</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#beforeTryUpdate(com.amazon.carbonado.Transaction, S)">beforeTryUpdate</a></strong>(<a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado">Transaction</a> txn, + <a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable)</code> +<div class="block">Called before a storable is to be updated via tryUpdate.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>java.lang.Object</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#beforeUpdate(S)">beforeUpdate</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable)</code> +<div class="block">Called before a storable is to be updated.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>java.lang.Object</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#beforeUpdate(com.amazon.carbonado.Transaction, S)">beforeUpdate</a></strong>(<a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado">Transaction</a> txn, + <a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable)</code> +<div class="block">Called before a storable is to be updated.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#failedDelete(S, java.lang.Object)">failedDelete</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state)</code> +<div class="block">Called when an delete operation failed because the record was missing or + an exception was thrown.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#failedInsert(S, java.lang.Object)">failedInsert</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state)</code> +<div class="block">Called when an insert operation failed due to a unique constraint + violation or an exception was thrown.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Trigger.html#failedUpdate(S, java.lang.Object)">failedUpdate</a></strong>(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state)</code> +<div class="block">Called when an update operation failed because the record was missing or + an exception was thrown.</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 java.lang.Object</h3> +<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========= CONSTRUCTOR DETAIL ======== --> +<ul class="blockList"> +<li class="blockList"><a name="constructor_detail"> +<!-- --> +</a> +<h3>Constructor Detail</h3> +<a name="Trigger()"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>Trigger</h4> +<pre>public Trigger()</pre> +</li> +</ul> +</li> +</ul> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method_detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="beforeInsert(java.lang.Object)"> +<!-- --> +</a><a name="beforeInsert(S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>beforeInsert</h4> +<pre>public java.lang.Object beforeInsert(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called before a storable is to be inserted. The default implementation + does nothing. + + <p>Any exception thrown by this method will cause the insert operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the insert method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable before being inserted</dd> +<dt><span class="strong">Returns:</span></dt><dd>arbitrary state object, passed to afterInsert or failedInsert method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd></dl> +</li> +</ul> +<a name="beforeInsert(com.amazon.carbonado.Transaction,java.lang.Object)"> +<!-- --> +</a><a name="beforeInsert(com.amazon.carbonado.Transaction, S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>beforeInsert</h4> +<pre>public java.lang.Object beforeInsert(<a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado">Transaction</a> txn, + <a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called before a storable is to be inserted. The default implementation + simply calls <a href="../../../com/amazon/carbonado/Trigger.html#beforeInsert(S)"><code>beforeInsert(Object)</code></a>. Only override if access to + the transaction is required. + + <p>Any exception thrown by this method will cause the insert operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the insert method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>txn</code> - nested transaction which trigger runs in</dd><dd><code>storable</code> - storable before being inserted</dd> +<dt><span class="strong">Returns:</span></dt><dd>arbitrary state object, passed to afterInsert or failedInsert method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd></dl> +</li> +</ul> +<a name="beforeTryInsert(java.lang.Object)"> +<!-- --> +</a><a name="beforeTryInsert(S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>beforeTryInsert</h4> +<pre>public java.lang.Object beforeTryInsert(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called before a storable is to be inserted via tryInsert. The default + implementation simply calls <a href="../../../com/amazon/carbonado/Trigger.html#beforeInsert(S)"><code>beforeInsert(Object)</code></a>. Only override + if trigger needs to distinguish between different insert variants. + + <p>Any exception thrown by this method will cause the tryInsert operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the tryInsert method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable before being inserted</dd> +<dt><span class="strong">Returns:</span></dt><dd>arbitrary state object, passed to afterTryInsert or failedInsert method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/amazon/carbonado/Trigger.html#abortTry()"><code>abortTry()</code></a></dd></dl> +</li> +</ul> +<a name="beforeTryInsert(com.amazon.carbonado.Transaction,java.lang.Object)"> +<!-- --> +</a><a name="beforeTryInsert(com.amazon.carbonado.Transaction, S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>beforeTryInsert</h4> +<pre>public java.lang.Object beforeTryInsert(<a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado">Transaction</a> txn, + <a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called before a storable is to be inserted via tryInsert. The default + implementation simply calls <a href="../../../com/amazon/carbonado/Trigger.html#beforeTryInsert(S)"><code>beforeTryInsert(Object)</code></a>. Only + override if trigger needs access to the transaction and to distinguish + between different insert variants. + + <p>Any exception thrown by this method will cause the tryInsert operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the tryInsert method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>txn</code> - nested transaction which trigger runs in</dd><dd><code>storable</code> - storable before being inserted</dd> +<dt><span class="strong">Returns:</span></dt><dd>arbitrary state object, passed to afterTryInsert or failedInsert method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/amazon/carbonado/Trigger.html#abortTry()"><code>abortTry()</code></a></dd></dl> +</li> +</ul> +<a name="afterInsert(java.lang.Object,java.lang.Object)"> +<!-- --> +</a><a name="afterInsert(S, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>afterInsert</h4> +<pre>public void afterInsert(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called right after a storable has been successfully inserted. The + default implementation does nothing. + + <p>Any exception thrown by this method will cause the insert operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the insert method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable after being inserted</dd><dd><code>state</code> - object returned by beforeInsert method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd></dl> +</li> +</ul> +<a name="afterTryInsert(java.lang.Object,java.lang.Object)"> +<!-- --> +</a><a name="afterTryInsert(S, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>afterTryInsert</h4> +<pre>public void afterTryInsert(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called right after a storable has been successfully inserted via + tryInsert. The default implementation simply calls <a href="../../../com/amazon/carbonado/Trigger.html#afterInsert(S, java.lang.Object)"><code>afterInsert(S, java.lang.Object)</code></a>. + Only override if trigger needs to distinguish between different insert + variants. + + <p>Any exception thrown by this method will cause the tryInsert + operation to rollback and all remaining triggers to not run. The + exception is ultimately passed to the caller of the tryInsert method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable after being inserted</dd><dd><code>state</code> - object returned by beforeTryInsert method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/amazon/carbonado/Trigger.html#abortTry()"><code>abortTry()</code></a></dd></dl> +</li> +</ul> +<a name="failedInsert(java.lang.Object,java.lang.Object)"> +<!-- --> +</a><a name="failedInsert(S, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>failedInsert</h4> +<pre>public void failedInsert(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state)</pre> +<div class="block">Called when an insert operation failed due to a unique constraint + violation or an exception was thrown. The main purpose of this method is + to allow any necessary clean-up to occur on the optional state object. + + <p>Any exception thrown by this method will be passed to the current + thread's uncaught exception handler.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable which failed to be inserted</dd><dd><code>state</code> - object returned by beforeInsert method, but it may be null</dd></dl> +</li> +</ul> +<a name="beforeUpdate(java.lang.Object)"> +<!-- --> +</a><a name="beforeUpdate(S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>beforeUpdate</h4> +<pre>public java.lang.Object beforeUpdate(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called before a storable is to be updated. The default implementation + does nothing. + + <p>Any exception thrown by this method will cause the update operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the update method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable before being updated</dd> +<dt><span class="strong">Returns:</span></dt><dd>arbitrary state object, passed to afterUpdate or failedUpdate method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd></dl> +</li> +</ul> +<a name="beforeUpdate(com.amazon.carbonado.Transaction,java.lang.Object)"> +<!-- --> +</a><a name="beforeUpdate(com.amazon.carbonado.Transaction, S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>beforeUpdate</h4> +<pre>public java.lang.Object beforeUpdate(<a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado">Transaction</a> txn, + <a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called before a storable is to be updated. The default implementation + simply calls <a href="../../../com/amazon/carbonado/Trigger.html#beforeUpdate(S)"><code>beforeUpdate(Object)</code></a>. Only override if access to + the transaction is required. + + <p>Any exception thrown by this method will cause the update operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the update method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>txn</code> - nested transaction which trigger runs in</dd><dd><code>storable</code> - storable before being updated</dd> +<dt><span class="strong">Returns:</span></dt><dd>arbitrary state object, passed to afterUpdate or failedUpdate method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd></dl> +</li> +</ul> +<a name="beforeTryUpdate(java.lang.Object)"> +<!-- --> +</a><a name="beforeTryUpdate(S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>beforeTryUpdate</h4> +<pre>public java.lang.Object beforeTryUpdate(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called before a storable is to be updated via tryUpdate. The default + implementation simply calls <a href="../../../com/amazon/carbonado/Trigger.html#beforeUpdate(S)"><code>beforeUpdate(Object)</code></a>. Only override + if trigger needs to distinguish between different update variants. + + <p>Any exception thrown by this method will cause the tryUpdate operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the tryUpdate method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable before being updated</dd> +<dt><span class="strong">Returns:</span></dt><dd>arbitrary state object, passed to afterTryUpdate or failedUpdate method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/amazon/carbonado/Trigger.html#abortTry()"><code>abortTry()</code></a></dd></dl> +</li> +</ul> +<a name="beforeTryUpdate(com.amazon.carbonado.Transaction,java.lang.Object)"> +<!-- --> +</a><a name="beforeTryUpdate(com.amazon.carbonado.Transaction, S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>beforeTryUpdate</h4> +<pre>public java.lang.Object beforeTryUpdate(<a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado">Transaction</a> txn, + <a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called before a storable is to be updated via tryUpdate. The default + implementation simply calls <a href="../../../com/amazon/carbonado/Trigger.html#beforeTryUpdate(S)"><code>beforeTryUpdate(Object)</code></a>. Only + override if trigger needs access to the transaction and to distinguish + between different update variants. + + <p>Any exception thrown by this method will cause the tryUpdate operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the tryUpdate method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>txn</code> - nested transaction which trigger runs in</dd><dd><code>storable</code> - storable before being updated</dd> +<dt><span class="strong">Returns:</span></dt><dd>arbitrary state object, passed to afterTryUpdate or failedUpdate method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/amazon/carbonado/Trigger.html#abortTry()"><code>abortTry()</code></a></dd></dl> +</li> +</ul> +<a name="afterUpdate(java.lang.Object,java.lang.Object)"> +<!-- --> +</a><a name="afterUpdate(S, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>afterUpdate</h4> +<pre>public void afterUpdate(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called right after a storable has been successfully updated. The default + implementation does nothing. + + <p>Any exception thrown by this method will cause the update operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the update method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable after being updated</dd><dd><code>state</code> - optional object returned by beforeUpdate method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd></dl> +</li> +</ul> +<a name="afterTryUpdate(java.lang.Object,java.lang.Object)"> +<!-- --> +</a><a name="afterTryUpdate(S, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>afterTryUpdate</h4> +<pre>public void afterTryUpdate(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called right after a storable has been successfully updated via + tryUpdate. The default implementation simply calls <a href="../../../com/amazon/carbonado/Trigger.html#afterUpdate(S, java.lang.Object)"><code>afterUpdate(S, java.lang.Object)</code></a>. + Only override if trigger needs to distinguish between different update + variants. + + <p>Any exception thrown by this method will cause the tryUpdate + operation to rollback and all remaining triggers to not run. The + exception is ultimately passed to the caller of the tryUpdate method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable after being updated</dd><dd><code>state</code> - object returned by beforeTryUpdate method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/amazon/carbonado/Trigger.html#abortTry()"><code>abortTry()</code></a></dd></dl> +</li> +</ul> +<a name="failedUpdate(java.lang.Object,java.lang.Object)"> +<!-- --> +</a><a name="failedUpdate(S, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>failedUpdate</h4> +<pre>public void failedUpdate(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state)</pre> +<div class="block">Called when an update operation failed because the record was missing or + an exception was thrown. The main purpose of this method is to allow any + necessary clean-up to occur on the optional state object. + + <p>Any exception thrown by this method will be passed to the current + thread's uncaught exception handler.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable which failed to be updated</dd><dd><code>state</code> - optional object returned by beforeUpdate + method, but it may be null</dd></dl> +</li> +</ul> +<a name="beforeDelete(java.lang.Object)"> +<!-- --> +</a><a name="beforeDelete(S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>beforeDelete</h4> +<pre>public java.lang.Object beforeDelete(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called before a storable is to be deleted. The default implementation + does nothing. + + <p>Any exception thrown by this method will cause the delete operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the delete method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable before being deleted</dd> +<dt><span class="strong">Returns:</span></dt><dd>arbitrary state object, passed to afterDelete or failedDelete method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd></dl> +</li> +</ul> +<a name="beforeDelete(com.amazon.carbonado.Transaction,java.lang.Object)"> +<!-- --> +</a><a name="beforeDelete(com.amazon.carbonado.Transaction, S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>beforeDelete</h4> +<pre>public java.lang.Object beforeDelete(<a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado">Transaction</a> txn, + <a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called before a storable is to be deleted. The default implementation + simply calls <a href="../../../com/amazon/carbonado/Trigger.html#beforeDelete(S)"><code>beforeDelete(Object)</code></a>. Only override if access to + the transaction is required. + + <p>Any exception thrown by this method will cause the delete operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the delete method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>txn</code> - nested transaction which trigger runs in</dd><dd><code>storable</code> - storable before being deleted</dd> +<dt><span class="strong">Returns:</span></dt><dd>arbitrary state object, passed to afterDelete or failedDelete method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd></dl> +</li> +</ul> +<a name="beforeTryDelete(java.lang.Object)"> +<!-- --> +</a><a name="beforeTryDelete(S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>beforeTryDelete</h4> +<pre>public java.lang.Object beforeTryDelete(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called before a storable is to be deleted via tryDelete. The default + implementation simply calls <a href="../../../com/amazon/carbonado/Trigger.html#beforeDelete(S)"><code>beforeDelete(Object)</code></a>. Only override + if trigger needs to distinguish between different delete variants. + + <p>Any exception thrown by this method will cause the tryDelete operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the tryDelete method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable before being deleted</dd> +<dt><span class="strong">Returns:</span></dt><dd>arbitrary state object, passed to afterTryDelete or failedDelete method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/amazon/carbonado/Trigger.html#abortTry()"><code>abortTry()</code></a></dd></dl> +</li> +</ul> +<a name="beforeTryDelete(com.amazon.carbonado.Transaction,java.lang.Object)"> +<!-- --> +</a><a name="beforeTryDelete(com.amazon.carbonado.Transaction, S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>beforeTryDelete</h4> +<pre>public java.lang.Object beforeTryDelete(<a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado">Transaction</a> txn, + <a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called before a storable is to be deleted via tryDelete. The default + implementation simply calls <a href="../../../com/amazon/carbonado/Trigger.html#beforeTryDelete(S)"><code>beforeTryDelete(Object)</code></a>. Only + override if trigger needs access to the transaction and to distinguish + between different delete variants. + + <p>Any exception thrown by this method will cause the tryDelete operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the tryDelete method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>txn</code> - nested transaction which trigger runs in</dd><dd><code>storable</code> - storable before being deleted</dd> +<dt><span class="strong">Returns:</span></dt><dd>arbitrary state object, passed to afterTryDelete or failedDelete method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/amazon/carbonado/Trigger.html#abortTry()"><code>abortTry()</code></a></dd></dl> +</li> +</ul> +<a name="afterDelete(java.lang.Object,java.lang.Object)"> +<!-- --> +</a><a name="afterDelete(S, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>afterDelete</h4> +<pre>public void afterDelete(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called right after a storable has been successfully deleted. The default + implementation does nothing. + + <p>Any exception thrown by this method will cause the delete operation + to rollback and all remaining triggers to not run. The exception is + ultimately passed to the caller of the delete method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable after being deleted</dd><dd><code>state</code> - optional object returned by beforeDelete method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd></dl> +</li> +</ul> +<a name="afterTryDelete(java.lang.Object,java.lang.Object)"> +<!-- --> +</a><a name="afterTryDelete(S, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>afterTryDelete</h4> +<pre>public void afterTryDelete(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state) + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Called right after a storable has been successfully deleted via + tryDelete. The default implementation simply calls <a href="../../../com/amazon/carbonado/Trigger.html#afterDelete(S, java.lang.Object)"><code>afterDelete(S, java.lang.Object)</code></a>. + Only override if trigger needs to distinguish between different delete + variants. + + <p>Any exception thrown by this method will cause the tryDelete + operation to rollback and all remaining triggers to not run. The + exception is ultimately passed to the caller of the tryDelete method.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable after being deleted</dd><dd><code>state</code> - object returned by beforeTryDelete method</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/amazon/carbonado/Trigger.html#abortTry()"><code>abortTry()</code></a></dd></dl> +</li> +</ul> +<a name="failedDelete(java.lang.Object,java.lang.Object)"> +<!-- --> +</a><a name="failedDelete(S, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>failedDelete</h4> +<pre>public void failedDelete(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable, + java.lang.Object state)</pre> +<div class="block">Called when an delete operation failed because the record was missing or + an exception was thrown. The main purpose of this method is to allow any + necessary clean-up to occur on the optional state object. + + <p>Any exception thrown by this method will be passed to the current + thread's uncaught exception handler.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable which failed to be deleted</dd><dd><code>state</code> - optional object returned by beforeDelete + method, but it may be null</dd></dl> +</li> +</ul> +<a name="afterLoad(java.lang.Object)"> +<!-- --> +</a><a name="afterLoad(S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>afterLoad</h4> +<pre>public void afterLoad(<a href="../../../com/amazon/carbonado/Trigger.html" title="type parameter in Trigger">S</a> storable) + throws <a href="../../../com/amazon/carbonado/FetchException.html" title="class in com.amazon.carbonado">FetchException</a></pre> +<div class="block">Called right after a storable has been successfully loaded or + fetched. The default implementation does nothing.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>storable</code> - storable after being loaded or fetched</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/FetchException.html" title="class in com.amazon.carbonado">FetchException</a></code></dd><dt><span class="strong">Since:</span></dt> + <dd>1.2</dd></dl> +</li> +</ul> +<a name="abortTry()"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>abortTry</h4> +<pre>protected <a href="../../../com/amazon/carbonado/Trigger.Abort.html" title="class in com.amazon.carbonado">Trigger.Abort</a> abortTry() + throws <a href="../../../com/amazon/carbonado/Trigger.Abort.html" title="class in com.amazon.carbonado">Trigger.Abort</a></pre> +<div class="block">Call to quickly abort a "try" operation, returning false to the + caller. This method should not be called by a non-try trigger method, + since the caller gets thrown an exception with an incomplete stack trace. + + <p>This method never returns normally, but as a convenience, a return + type is defined. The abort exception can be thrown by <code>throw abortTry()</code>, + but the <code>throw</code> keyword is not needed.</div> +<dl><dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/Trigger.Abort.html" title="class in com.amazon.carbonado">Trigger.Abort</a></code></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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/Trigger.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-files/index-1.html">Index</a></li> +<li><a href="../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../com/amazon/carbonado/Transaction.html" title="interface in com.amazon.carbonado"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../com/amazon/carbonado/Trigger.Abort.html" title="class in com.amazon.carbonado"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../index.html?com/amazon/carbonado/Trigger.html" target="_top">Frames</a></li> +<li><a href="Trigger.html" target="_top">No Frames</a></li> +</ul> +<ul class="navList" id="allclasses_navbar_bottom"> +<li><a href="../../../allclasses-noframe.html">All 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: </li> +<li><a href="#nested_class_summary">Nested</a> | </li> +<li>Field | </li> +<li><a href="#constructor_summary">Constr</a> | </li> +<li><a href="#method_summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </li> +<li><a href="#constructor_detail">Constr</a> | </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>Copyright © 2006-2013 <a href="https://github.com/Carbonado/Carbonado">Amazon Technologies, Inc.</a>. All Rights Reserved.</small></p> +</body> +</html> |