blob: 6514b5005b0252704b14339d6adabf0c8b73a719 [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>Region.Entry (Apache Geode 1.15.0)</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="Region.Entry (Apache Geode 1.15.0)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":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/Region.html" title="interface in org.apache.geode.cache"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/geode/cache/RegionAccessException.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/Region.Entry.html" target="_top">Frames</a></li>
<li><a href="Region.Entry.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 Region.Entry" class="title">Interface Region.Entry&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="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a>&lt;K,V&gt;</dd>
</dl>
<dl>
<dt>Enclosing interface:</dt>
<dd><a href="../../../../org/apache/geode/cache/Region.html" title="interface in org.apache.geode.cache">Region</a>&lt;<a href="../../../../org/apache/geode/cache/Region.html" title="type parameter in Region">K</a>,<a href="../../../../org/apache/geode/cache/Region.html" title="type parameter in Region">V</a>&gt;</dd>
</dl>
<hr>
<br>
<pre>public static interface <span class="typeNameLabel">Region.Entry&lt;K,V&gt;</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a>&lt;K,V&gt;</pre>
<div class="block">A key-value pair containing the cached data in a region. This object's operations (except
for{Entry#setValue()}), are not distributed, do not acquire any locks, and do not affect
<code>CacheStatistics</code>.
<p>
Unless otherwise noted, all of these methods throw a <code>CacheClosedException</code> if the
Cache is closed at the time of invocation, or an <code>EntryDestroyedException</code> if the
entry has been destroyed.</div>
</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/Region.Entry.html" title="type parameter in Region.Entry">K</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/Region.Entry.html#getKey--">getKey</a></span>()</code>
<div class="block">Returns the key for this entry.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/geode/cache/Region.html" title="interface in org.apache.geode.cache">Region</a>&lt;<a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">K</a>,<a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">V</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/Region.Entry.html#getRegion--">getRegion</a></span>()</code>
<div class="block">Returns the region that contains this entry.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/geode/cache/CacheStatistics.html" title="interface in org.apache.geode.cache">CacheStatistics</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/Region.Entry.html#getStatistics--">getStatistics</a></span>()</code>
<div class="block">Returns the statistics for this entry.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/Region.Entry.html#getUserAttribute--">getUserAttribute</a></span>()</code>
<div class="block">Returns the user attribute for this entry in the local cache.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">V</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/Region.Entry.html#getValue--">getValue</a></span>()</code>
<div class="block">Returns the value of this entry in the local cache.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/Region.Entry.html#isDestroyed--">isDestroyed</a></span>()</code>
<div class="block">Returns whether this entry has been destroyed.</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/Region.Entry.html#isLocal--">isLocal</a></span>()</code>
<div class="block">This method checks to see if the entry is in the in-process cache, or is in another process.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/Region.Entry.html#setUserAttribute-java.lang.Object-">setUserAttribute</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;userAttribute)</code>
<div class="block">Sets the user attribute for this entry.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">V</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/cache/Region.Entry.html#setValue-V-">setValue</a></span>(<a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">V</a>&nbsp;value)</code>
<div class="block">Sets the value of this entry.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.util.Map.Entry">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;java.util.<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true#comparingByKey--" title="class or interface in java.util">comparingByKey</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true#comparingByKey-java.util.Comparator-" title="class or interface in java.util">comparingByKey</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true#comparingByValue--" title="class or interface in java.util">comparingByValue</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true#comparingByValue-java.util.Comparator-" title="class or interface in java.util">comparingByValue</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.util">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true#hashCode--" title="class or interface in java.util">hashCode</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/Region.Entry.html" title="type parameter in Region.Entry">K</a>&nbsp;getKey()</pre>
<div class="block">Returns the key for this entry.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true#getKey--" title="class or interface in java.util">getKey</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a>&lt;<a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">K</a>,<a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the key for this entry</dd>
</dl>
</li>
</ul>
<a name="getValue--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValue</h4>
<pre><a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">V</a>&nbsp;getValue()</pre>
<div class="block">Returns the value of this entry in the local cache. Does not invoke a
<code>CacheLoader</code>, does not do a netSearch, netLoad, etc.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true#getValue--" title="class or interface in java.util">getValue</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a>&lt;<a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">K</a>,<a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value or <code>null</code> if this entry is invalid</dd>
</dl>
</li>
</ul>
<a name="getRegion--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRegion</h4>
<pre><a href="../../../../org/apache/geode/cache/Region.html" title="interface in org.apache.geode.cache">Region</a>&lt;<a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">K</a>,<a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">V</a>&gt;&nbsp;getRegion()</pre>
<div class="block">Returns the region that contains this entry.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the Region that contains this entry</dd>
</dl>
</li>
</ul>
<a name="isLocal--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isLocal</h4>
<pre>boolean&nbsp;isLocal()</pre>
<div class="block">This method checks to see if the entry is in the in-process cache, or is in another process.
Only Regions with <a href="../../../../org/apache/geode/cache/DataPolicy.html#PARTITION"><code>DataPolicy.PARTITION</code></a> may return false in response to this query. A
non-local Entry will not reflect dynamic changes being made to the cache. For instance, the
result of getValue() will not change, even though the cache may have been updated for the
corresponding key. To see an updated snapshot of a non-local Entry, you must fetch the entry
from the Region again.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether the entry is in the in-process cache, or is in another process</dd>
</dl>
</li>
</ul>
<a name="getStatistics--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatistics</h4>
<pre><a href="../../../../org/apache/geode/cache/CacheStatistics.html" title="interface in org.apache.geode.cache">CacheStatistics</a>&nbsp;getStatistics()</pre>
<div class="block">Returns the statistics for this entry.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the CacheStatistics for this entry</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/geode/cache/StatisticsDisabledException.html" title="class in org.apache.geode.cache">StatisticsDisabledException</a></code> - if statistics have been disabled for this region</dd>
</dl>
</li>
</ul>
<a name="getUserAttribute--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUserAttribute</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;getUserAttribute()</pre>
<div class="block">Returns the user attribute for this entry in the local cache.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the user attribute for this entry</dd>
</dl>
</li>
</ul>
<a name="setUserAttribute-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setUserAttribute</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;setUserAttribute(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;userAttribute)</pre>
<div class="block">Sets the user attribute for this entry. Does not distribute the user attribute to other
caches.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>userAttribute</code> - the user attribute for this entry</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the previous user attribute or null no user attributes has been set for this entry</dd>
</dl>
</li>
</ul>
<a name="isDestroyed--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDestroyed</h4>
<pre>boolean&nbsp;isDestroyed()</pre>
<div class="block">Returns whether this entry has been destroyed.
<p>
Does not throw a <code>EntryDestroyedException</code> if this entry has been destroyed.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this entry has been destroyed</dd>
</dl>
</li>
</ul>
<a name="setValue-java.lang.Object-">
<!-- -->
</a><a name="setValue-V-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setValue</h4>
<pre><a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">V</a>&nbsp;setValue(<a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">V</a>&nbsp;value)</pre>
<div class="block">Sets the value of this entry. It has similar to calling a put on the key of this Entry</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true#setValue-V-" title="class or interface in java.util">setValue</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a>&lt;<a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">K</a>,<a href="../../../../org/apache/geode/cache/Region.Entry.html" title="type parameter in Region.Entry">V</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - Object the value to be set</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the previous value object stored locally for this entry. If the entry did not exist
then <code>null</code> is returned. If the entry was "invalid" then <code>null</code>
is returned. In some cases <code>null</code> may be returned even if a previous value
exists. If the region is a client proxy then <code>null</code> is returned. If the
region is off-heap and the old value was stored in off-heap memory then
<code>null</code> is returned. If the region is partitioned and the setValue is done
on a non-primary then <code>null</code> is returned. If the value is not currently
stored in memory but is on disk and if the region does not have cqs then
<code>null</code> is returned.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 5.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/geode/cache/Region.html#put-K-V-"><code>Region.put(Object, Object)</code></a></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/Region.html" title="interface in org.apache.geode.cache"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/geode/cache/RegionAccessException.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/Region.Entry.html" target="_top">Frames</a></li>
<li><a href="Region.Entry.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>