blob: 1c12c05148da0fe67208e98b3c4a5a74c84f4182 [file] [log] [blame]
<!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 -->
<title>EntryEvent (Apache Geode 1.15.1)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.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="EntryEvent (Apache Geode 1.15.1)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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="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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/geode/cache/EntryDestroyedException.html" title="class in org.apache.geode.cache"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/geode/cache/EntryExistsException.html" title="class in org.apache.geode.cache"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/geode/cache/EntryEvent.html" target="_top">Frames</a></li>
<li><a href="EntryEvent.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">org.apache.geode.cache</div>
<h2 title="Interface EntryEvent" class="title">Interface EntryEvent&lt;K,V&gt;</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../../org/apache/geode/cache/CacheEvent.html" title="interface in org.apache.geode.cache">CacheEvent</a>&lt;K,V&gt;</dd>
</dl>
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><a href="../../../../org/apache/geode/cache/util/TimestampedEntryEvent.html" title="interface in org.apache.geode.cache.util">TimestampedEntryEvent</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">EntryEvent&lt;K,V&gt;</span>
extends <a href="../../../../org/apache/geode/cache/CacheEvent.html" title="interface in org.apache.geode.cache">CacheEvent</a>&lt;K,V&gt;</pre>
<div class="block">Contains information about an event affecting an entry, including its identity and the the
circumstances of the event. It is passed in to <code>CacheListener</code>,
<code>CapacityController</code>, and <code>CacheWriter</code>.
<p>
If this event originated from a region stored off heap then this event can only be used as long
as the notification method that obtained it has not returned. For example in your implementation
of <a href="../../../../org/apache/geode/cache/CacheListener.html#afterUpdate-org.apache.geode.cache.EntryEvent-"><code>CacheListener.afterUpdate(EntryEvent)</code></a> the event parameter is only valid until your
afterUpdate method returns. It is not safe to store instances of this class and use them later
when using off heap storage. Attempts to access off-heap data from this event after it has
expired will result in an IllegalStateException.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 3.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/geode/cache/CacheListener.html" title="interface in org.apache.geode.cache"><code>CacheListener</code></a>,
<a href="../../../../org/apache/geode/cache/CacheWriter.html" title="interface in org.apache.geode.cache"><code>CacheWriter</code></a>,
<a href="../../../../org/apache/geode/cache/RegionEvent.html" title="interface in org.apache.geode.cache"><code>RegionEvent</code></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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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="../../../../org/apache/geode/cache/EntryEvent.html" title="type parameter in EntryEvent">K</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/EntryEvent.html#getKey--">getKey</a></span>()</code>
<div class="block">Returns the key.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/geode/cache/EntryEvent.html" title="type parameter in EntryEvent">V</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/EntryEvent.html#getNewValue--">getNewValue</a></span>()</code>
<div class="block">Returns the value in the cache after this event.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/geode/cache/EntryEvent.html" title="type parameter in EntryEvent">V</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/EntryEvent.html#getOldValue--">getOldValue</a></span>()</code>
<div class="block">Returns the value in the cache prior to this event.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/geode/cache/SerializedCacheValue.html" title="interface in org.apache.geode.cache">SerializedCacheValue</a>&lt;<a href="../../../../org/apache/geode/cache/EntryEvent.html" title="type parameter in EntryEvent">V</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/EntryEvent.html#getSerializedNewValue--">getSerializedNewValue</a></span>()</code>
<div class="block">Returns the serialized form of the value in the cache after this event.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/geode/cache/SerializedCacheValue.html" title="interface in org.apache.geode.cache">SerializedCacheValue</a>&lt;<a href="../../../../org/apache/geode/cache/EntryEvent.html" title="type parameter in EntryEvent">V</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/EntryEvent.html#getSerializedOldValue--">getSerializedOldValue</a></span>()</code>
<div class="block">Returns the serialized form of the value in the cache before this event.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/geode/cache/TransactionId.html" title="interface in org.apache.geode.cache">TransactionId</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/EntryEvent.html#getTransactionId--">getTransactionId</a></span>()</code>
<div class="block">Gets the TransactionId for this EntryEvent.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/EntryEvent.html#hasClientOrigin--">hasClientOrigin</a></span>()</code>
<div class="block">Returns true if this event originated on a client.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/EntryEvent.html#isOldValueAvailable--">isOldValueAvailable</a></span>()</code>
<div class="block">Returns <code>true</code> if the old value is "available".</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.geode.cache.CacheEvent">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.geode.cache.<a href="../../../../org/apache/geode/cache/CacheEvent.html" title="interface in org.apache.geode.cache">CacheEvent</a></h3>
<code><a href="../../../../org/apache/geode/cache/CacheEvent.html#getCallbackArgument--">getCallbackArgument</a>, <a href="../../../../org/apache/geode/cache/CacheEvent.html#getDistributedMember--">getDistributedMember</a>, <a href="../../../../org/apache/geode/cache/CacheEvent.html#getOperation--">getOperation</a>, <a href="../../../../org/apache/geode/cache/CacheEvent.html#getRegion--">getRegion</a>, <a href="../../../../org/apache/geode/cache/CacheEvent.html#isCallbackArgumentAvailable--">isCallbackArgumentAvailable</a>, <a href="../../../../org/apache/geode/cache/CacheEvent.html#isOriginRemote--">isOriginRemote</a></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="getKey--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getKey</h4>
<pre><a href="../../../../org/apache/geode/cache/EntryEvent.html" title="type parameter in EntryEvent">K</a>&nbsp;getKey()</pre>
<div class="block">Returns the key.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the key</dd>
</dl>
</li>
</ul>
<a name="getOldValue--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOldValue</h4>
<pre><a href="../../../../org/apache/geode/cache/EntryEvent.html" title="type parameter in EntryEvent">V</a>&nbsp;getOldValue()</pre>
<div class="block">Returns the value in the cache prior to this event. When passed to an event handler after an
event occurs, this value reflects the value that was in the cache in this VM, not necessarily
the value that was in the cache VM that initiated the operation. In certain scenarios the old
value may no longer be available in which case <code>null</code> is returned. This can happen
for disk regions when the old value is on disk only.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the old value in the cache prior to this event. If the entry did not exist, was
invalid, or was not available, then null is returned.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if off-heap and called after the method that was passed this
EntryEvent returns.</dd>
</dl>
</li>
</ul>
<a name="getSerializedOldValue--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSerializedOldValue</h4>
<pre><a href="../../../../org/apache/geode/cache/SerializedCacheValue.html" title="interface in org.apache.geode.cache">SerializedCacheValue</a>&lt;<a href="../../../../org/apache/geode/cache/EntryEvent.html" title="type parameter in EntryEvent">V</a>&gt;&nbsp;getSerializedOldValue()</pre>
<div class="block">Returns the serialized form of the value in the cache before this event.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the serialized form of the value in the cache before this event</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if off-heap and called after the method that was passed this
EntryEvent returns.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 5.5</dd>
</dl>
</li>
</ul>
<a name="getNewValue--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNewValue</h4>
<pre><a href="../../../../org/apache/geode/cache/EntryEvent.html" title="type parameter in EntryEvent">V</a>&nbsp;getNewValue()</pre>
<div class="block">Returns the value in the cache after this event.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value in the cache after this event</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if off-heap and called after the method that was passed this
EntryEvent returns.</dd>
</dl>
</li>
</ul>
<a name="getSerializedNewValue--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSerializedNewValue</h4>
<pre><a href="../../../../org/apache/geode/cache/SerializedCacheValue.html" title="interface in org.apache.geode.cache">SerializedCacheValue</a>&lt;<a href="../../../../org/apache/geode/cache/EntryEvent.html" title="type parameter in EntryEvent">V</a>&gt;&nbsp;getSerializedNewValue()</pre>
<div class="block">Returns the serialized form of the value in the cache after this event.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the serialized form of the value in the cache after this event</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if off-heap and called after the method that was passed this
EntryEvent returns.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 5.5</dd>
</dl>
</li>
</ul>
<a name="getTransactionId--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTransactionId</h4>
<pre><a href="../../../../org/apache/geode/cache/TransactionId.html" title="interface in org.apache.geode.cache">TransactionId</a>&nbsp;getTransactionId()</pre>
<div class="block">Gets the TransactionId for this EntryEvent.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the ID of the transaction that performed the operation that generated this event; null
if no transaction involved.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 4.0</dd>
</dl>
</li>
</ul>
<a name="hasClientOrigin--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasClientOrigin</h4>
<pre>boolean&nbsp;hasClientOrigin()</pre>
<div class="block">Returns true if this event originated on a client.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this event originated on a client.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 5.7</dd>
</dl>
</li>
</ul>
<a name="isOldValueAvailable--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isOldValueAvailable</h4>
<pre>boolean&nbsp;isOldValueAvailable()</pre>
<div class="block">Returns <code>true</code> if the old value is "available". Not available means that an old
value existed but it could not be obtained or it was deemed too expensive to obtain. Note that
<a href="../../../../org/apache/geode/cache/EntryEvent.html#getOldValue--"><code>getOldValue()</code></a> will return <code>null</code> when this method returns <code>false</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether the old value is "available"</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.0</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="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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/geode/cache/EntryDestroyedException.html" title="class in org.apache.geode.cache"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/geode/cache/EntryExistsException.html" title="class in org.apache.geode.cache"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/geode/cache/EntryEvent.html" target="_top">Frames</a></li>
<li><a href="EntryEvent.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 ======= -->
</body>
</html>