blob: 2b16dd7dc5ad27012a4b00ba181cde85d2b65f97 [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 (1.8.0) on Sun Aug 28 20:42:13 EST 2016 -->
<title>JavaSpace (Apache River v3.0.0 API Documentation (internals))</title>
<meta name="date" content="2016-08-28">
<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="JavaSpace (Apache River v3.0.0 API Documentation (internals))";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":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="class-use/JavaSpace.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../net/jini/space/InternalSpaceException.html" title="class in net.jini.space"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../net/jini/space/JavaSpace05.html" title="interface in net.jini.space"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?net/jini/space/JavaSpace.html" target="_top">Frames</a></li>
<li><a href="JavaSpace.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><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&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">net.jini.space</div>
<h2 title="Interface JavaSpace" class="title">Interface JavaSpace</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><a href="../../../net/jini/space/JavaSpace05.html" title="interface in net.jini.space">JavaSpace05</a></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../org/apache/river/outrigger/ConstrainableSpaceProxy2.html" title="class in org.apache.river.outrigger">ConstrainableSpaceProxy2</a>, <a href="../../../org/apache/river/outrigger/SpaceProxy2.html" title="class in org.apache.river.outrigger">SpaceProxy2</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">JavaSpace</span></pre>
<div class="block">This interface is implemented by servers that export a
JavaSpaces technology service. The operations in this interface
are the public methods that all such spaces support.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Sun Microsystems, Inc.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry"><code>Entry</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/space/JavaSpace.html#NO_WAIT">NO_WAIT</a></span></code>
<div class="block">Wait for no time at all.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== 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="../../../net/jini/core/event/EventRegistration.html" title="class in net.jini.core.event">EventRegistration</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/space/JavaSpace.html#notify-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-net.jini.core.event.RemoteEventListener-long-java.rmi.MarshalledObject-">notify</a></span>(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;tmpl,
<a href="../../../net/jini/core/transaction/Transaction.html" title="interface in net.jini.core.transaction">Transaction</a>&nbsp;txn,
<a href="../../../net/jini/core/event/RemoteEventListener.html" title="interface in net.jini.core.event">RemoteEventListener</a>&nbsp;listener,
long&nbsp;lease,
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/MarshalledObject.html?is-external=true" title="class or interface in java.rmi">MarshalledObject</a>&nbsp;handback)</code>
<div class="block">When entries are written that match this template notify the
given <code>listener</code> with a <code>RemoteEvent</code> that
includes the <code>handback</code> object.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/space/JavaSpace.html#read-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-">read</a></span>(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;tmpl,
<a href="../../../net/jini/core/transaction/Transaction.html" title="interface in net.jini.core.transaction">Transaction</a>&nbsp;txn,
long&nbsp;timeout)</code>
<div class="block">Read any matching entry from the space, blocking until one exists.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/space/JavaSpace.html#readIfExists-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-">readIfExists</a></span>(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;tmpl,
<a href="../../../net/jini/core/transaction/Transaction.html" title="interface in net.jini.core.transaction">Transaction</a>&nbsp;txn,
long&nbsp;timeout)</code>
<div class="block">Read any matching entry from the space, returning
<code>null</code> if there is currently is none.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/space/JavaSpace.html#snapshot-net.jini.core.entry.Entry-">snapshot</a></span>(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;e)</code>
<div class="block">The process of serializing an entry for transmission to a JavaSpaces
service will be identical if the same entry is used twice.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/space/JavaSpace.html#take-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-">take</a></span>(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;tmpl,
<a href="../../../net/jini/core/transaction/Transaction.html" title="interface in net.jini.core.transaction">Transaction</a>&nbsp;txn,
long&nbsp;timeout)</code>
<div class="block">Take a matching entry from the space, waiting until one exists.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/space/JavaSpace.html#takeIfExists-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-">takeIfExists</a></span>(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;tmpl,
<a href="../../../net/jini/core/transaction/Transaction.html" title="interface in net.jini.core.transaction">Transaction</a>&nbsp;txn,
long&nbsp;timeout)</code>
<div class="block">Take a matching entry from the space, returning
<code>null</code> if there is currently is none.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../net/jini/core/lease/Lease.html" title="interface in net.jini.core.lease">Lease</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../net/jini/space/JavaSpace.html#write-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-">write</a></span>(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;entry,
<a href="../../../net/jini/core/transaction/Transaction.html" title="interface in net.jini.core.transaction">Transaction</a>&nbsp;txn,
long&nbsp;lease)</code>
<div class="block">Write a new entry into the space.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="NO_WAIT">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>NO_WAIT</h4>
<pre>static final&nbsp;long NO_WAIT</pre>
<div class="block">Wait for no time at all. This is used as a timeout value in
various read and take calls.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../net/jini/space/JavaSpace.html#read-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-"><code>read(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)</code></a>,
<a href="../../../net/jini/space/JavaSpace.html#readIfExists-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-"><code>readIfExists(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)</code></a>,
<a href="../../../net/jini/space/JavaSpace.html#take-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-"><code>take(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)</code></a>,
<a href="../../../net/jini/space/JavaSpace.html#takeIfExists-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-"><code>takeIfExists(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)</code></a>,
<a href="../../../constant-values.html#net.jini.space.JavaSpace.NO_WAIT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="write-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre><a href="../../../net/jini/core/lease/Lease.html" title="interface in net.jini.core.lease">Lease</a>&nbsp;write(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;entry,
<a href="../../../net/jini/core/transaction/Transaction.html" title="interface in net.jini.core.transaction">Transaction</a>&nbsp;txn,
long&nbsp;lease)
throws <a href="../../../net/jini/core/transaction/TransactionException.html" title="class in net.jini.core.transaction">TransactionException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></pre>
<div class="block">Write a new entry into the space.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>entry</code> - the entry to write</dd>
<dd><code>txn</code> - the transaction object, if any, under which to
perform the write</dd>
<dd><code>lease</code> - the requested lease time, in milliseconds</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a lease for the entry that was written to the space</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../net/jini/core/transaction/TransactionException.html" title="class in net.jini.core.transaction">TransactionException</a></code> - if a transaction error occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></code> - if a communication error occurs</dd>
</dl>
</li>
</ul>
<a name="read-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre><a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;read(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;tmpl,
<a href="../../../net/jini/core/transaction/Transaction.html" title="interface in net.jini.core.transaction">Transaction</a>&nbsp;txn,
long&nbsp;timeout)
throws <a href="../../../net/jini/core/entry/UnusableEntryException.html" title="class in net.jini.core.entry">UnusableEntryException</a>,
<a href="../../../net/jini/core/transaction/TransactionException.html" title="class in net.jini.core.transaction">TransactionException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></pre>
<div class="block">Read any matching entry from the space, blocking until one exists.
Return <code>null</code> if the timeout expires.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tmpl</code> - The template used for matching. Matching is
done against <code>tmpl</code> with <code>null</code>
fields being wildcards ("match anything") other
fields being values ("match exactly on the
serialized form").</dd>
<dd><code>txn</code> - The transaction (if any) under which to work.</dd>
<dd><code>timeout</code> - How long the client is willing to wait for a
transactionally proper matching entry. A
timeout of <code>NO_WAIT</code> means to wait
no time at all; this is equivalent to a wait
of zero.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a copy of the entry read from the space</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../net/jini/core/entry/UnusableEntryException.html" title="class in net.jini.core.entry">UnusableEntryException</a></code> - if any serialized field of the entry
being read cannot be deserialized for any reason</dd>
<dd><code><a href="../../../net/jini/core/transaction/TransactionException.html" title="class in net.jini.core.transaction">TransactionException</a></code> - if a transaction error occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code> - if the thread in which the read
occurs is interrupted</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></code> - if a communication error occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if a negative timeout value is used</dd>
</dl>
</li>
</ul>
<a name="readIfExists-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readIfExists</h4>
<pre><a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;readIfExists(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;tmpl,
<a href="../../../net/jini/core/transaction/Transaction.html" title="interface in net.jini.core.transaction">Transaction</a>&nbsp;txn,
long&nbsp;timeout)
throws <a href="../../../net/jini/core/entry/UnusableEntryException.html" title="class in net.jini.core.entry">UnusableEntryException</a>,
<a href="../../../net/jini/core/transaction/TransactionException.html" title="class in net.jini.core.transaction">TransactionException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></pre>
<div class="block">Read any matching entry from the space, returning
<code>null</code> if there is currently is none. Matching and
timeouts are done as in <code>read</code>, except that blocking
in this call is done only if necessary to wait for transactional
state to settle.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tmpl</code> - The template used for matching. Matching is
done against <code>tmpl</code> with <code>null</code>
fields being wildcards ("match anything") other
fields being values ("match exactly on the
serialized form").</dd>
<dd><code>txn</code> - The transaction (if any) under which to work.</dd>
<dd><code>timeout</code> - How long the client is willing to wait for a
transactionally proper matching entry. A
timeout of <code>NO_WAIT</code> means to wait
no time at all; this is equivalent to a wait
of zero.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a copy of the entry read from the space</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../net/jini/core/entry/UnusableEntryException.html" title="class in net.jini.core.entry">UnusableEntryException</a></code> - if any serialized field of the entry
being read cannot be deserialized for any reason</dd>
<dd><code><a href="../../../net/jini/core/transaction/TransactionException.html" title="class in net.jini.core.transaction">TransactionException</a></code> - if a transaction error occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code> - if the thread in which the read
occurs is interrupted</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></code> - if a communication error occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if a negative timeout value is used</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../net/jini/space/JavaSpace.html#read-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-"><code>read(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)</code></a></dd>
</dl>
</li>
</ul>
<a name="take-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>take</h4>
<pre><a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;take(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;tmpl,
<a href="../../../net/jini/core/transaction/Transaction.html" title="interface in net.jini.core.transaction">Transaction</a>&nbsp;txn,
long&nbsp;timeout)
throws <a href="../../../net/jini/core/entry/UnusableEntryException.html" title="class in net.jini.core.entry">UnusableEntryException</a>,
<a href="../../../net/jini/core/transaction/TransactionException.html" title="class in net.jini.core.transaction">TransactionException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></pre>
<div class="block">Take a matching entry from the space, waiting until one exists.
Matching is and timeout done as for <code>read</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tmpl</code> - The template used for matching. Matching is
done against <code>tmpl</code> with <code>null</code>
fields being wildcards ("match anything") other
fields being values ("match exactly on the
serialized form").</dd>
<dd><code>txn</code> - The transaction (if any) under which to work.</dd>
<dd><code>timeout</code> - How long the client is willing to wait for a
transactionally proper matching entry. A
timeout of <code>NO_WAIT</code> means to wait
no time at all; this is equivalent to a wait
of zero.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the entry taken from the space</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../net/jini/core/entry/UnusableEntryException.html" title="class in net.jini.core.entry">UnusableEntryException</a></code> - if any serialized field of the entry
being read cannot be deserialized for any reason</dd>
<dd><code><a href="../../../net/jini/core/transaction/TransactionException.html" title="class in net.jini.core.transaction">TransactionException</a></code> - if a transaction error occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code> - if the thread in which the take
occurs is interrupted</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></code> - if a communication error occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if a negative timeout value is used</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../net/jini/space/JavaSpace.html#read-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-"><code>read(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)</code></a></dd>
</dl>
</li>
</ul>
<a name="takeIfExists-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>takeIfExists</h4>
<pre><a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;takeIfExists(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;tmpl,
<a href="../../../net/jini/core/transaction/Transaction.html" title="interface in net.jini.core.transaction">Transaction</a>&nbsp;txn,
long&nbsp;timeout)
throws <a href="../../../net/jini/core/entry/UnusableEntryException.html" title="class in net.jini.core.entry">UnusableEntryException</a>,
<a href="../../../net/jini/core/transaction/TransactionException.html" title="class in net.jini.core.transaction">TransactionException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></pre>
<div class="block">Take a matching entry from the space, returning
<code>null</code> if there is currently is none. Matching is
and timeout done as for <code>read</code>, except that blocking
in this call is done only if necessary to wait for transactional
state to settle.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tmpl</code> - The template used for matching. Matching is
done against <code>tmpl</code> with <code>null</code>
fields being wildcards ("match anything") other
fields being values ("match exactly on the
serialized form").</dd>
<dd><code>txn</code> - The transaction (if any) under which to work.</dd>
<dd><code>timeout</code> - How long the client is willing to wait for a
transactionally proper matching entry. A
timeout of <code>NO_WAIT</code> means to wait
no time at all; this is equivalent to a wait
of zero.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the entry taken from the space</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../net/jini/core/entry/UnusableEntryException.html" title="class in net.jini.core.entry">UnusableEntryException</a></code> - if any serialized field of the entry
being read cannot be deserialized for any reason</dd>
<dd><code><a href="../../../net/jini/core/transaction/TransactionException.html" title="class in net.jini.core.transaction">TransactionException</a></code> - if a transaction error occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</a></code> - if the thread in which the take
occurs is interrupted</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></code> - if a communication error occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if a negative timeout value is used</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../net/jini/space/JavaSpace.html#read-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-"><code>read(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)</code></a></dd>
</dl>
</li>
</ul>
<a name="notify-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-net.jini.core.event.RemoteEventListener-long-java.rmi.MarshalledObject-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>notify</h4>
<pre><a href="../../../net/jini/core/event/EventRegistration.html" title="class in net.jini.core.event">EventRegistration</a>&nbsp;notify(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;tmpl,
<a href="../../../net/jini/core/transaction/Transaction.html" title="interface in net.jini.core.transaction">Transaction</a>&nbsp;txn,
<a href="../../../net/jini/core/event/RemoteEventListener.html" title="interface in net.jini.core.event">RemoteEventListener</a>&nbsp;listener,
long&nbsp;lease,
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/MarshalledObject.html?is-external=true" title="class or interface in java.rmi">MarshalledObject</a>&nbsp;handback)
throws <a href="../../../net/jini/core/transaction/TransactionException.html" title="class in net.jini.core.transaction">TransactionException</a>,
<a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></pre>
<div class="block">When entries are written that match this template notify the
given <code>listener</code> with a <code>RemoteEvent</code> that
includes the <code>handback</code> object. Matching is done as
for <code>read</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>tmpl</code> - The template used for matching. Matching is
done against <code>tmpl</code> with <code>null</code>
fields being wildcards ("match anything") other
fields being values ("match exactly on the
serialized form").</dd>
<dd><code>txn</code> - The transaction (if any) under which to work.</dd>
<dd><code>listener</code> - The remote event listener to notify.</dd>
<dd><code>lease</code> - the requested lease time, in milliseconds</dd>
<dd><code>handback</code> - An object to send to the listener as part of the
event notification.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the event registration to the the registrant</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../net/jini/core/transaction/TransactionException.html" title="class in net.jini.core.transaction">TransactionException</a></code> - if a transaction error occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></code> - if a communication error occurs</dd>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the lease time requested
is not Lease.ANY and is negative</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../net/jini/space/JavaSpace.html#read-net.jini.core.entry.Entry-net.jini.core.transaction.Transaction-long-"><code>read(net.jini.core.entry.Entry, net.jini.core.transaction.Transaction, long)</code></a>,
<a href="../../../net/jini/core/event/EventRegistration.html" title="class in net.jini.core.event"><code>EventRegistration</code></a></dd>
</dl>
</li>
</ul>
<a name="snapshot-net.jini.core.entry.Entry-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>snapshot</h4>
<pre><a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;snapshot(<a href="../../../net/jini/core/entry/Entry.html" title="interface in net.jini.core.entry">Entry</a>&nbsp;e)
throws <a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></pre>
<div class="block">The process of serializing an entry for transmission to a JavaSpaces
service will be identical if the same entry is used twice. This is most
likely to be an issue with templates that are used repeatedly to search
for entries with <code>read</code> or <code>take</code>. The client-side
implementations of <code>read</code> and <code>take</code> cannot
reasonably avoid this duplicated effort, since they have no efficient
way of checking whether the same template is being used without
intervening modification.
The <code>snapshot</code> method gives the JavaSpaces service implementor
a way to reduce the impact of repeated use of the same entry. Invoking
<code>snapshot</code> with an <code>Entry</code> will return another
<code>Entry</code> object that contains a <i>snapshot</i> of the
original entry. Using the returned snapshot entry is equivalent to
using the unmodified original entry in all operations on the same
JavaSpaces service. Modifications to the original entry will not
affect the snapshot. You can <code>snapshot</code> a <code>null</code>
template; <code>snapshot</code> may or may not return null given a
<code>null</code> template.
The entry returned from <code>snapshot</code> will be guaranteed
equivalent to the original unmodified object only when used with
the space. Using the snapshot with any other JavaSpaces service
will generate an <code>IllegalArgumentException</code> unless the
other space can use it because of knowledge about the JavaSpaces
service that generated the snapshot. The snapshot will be a different
object from the original, may or may not have the same hash code,
and <code>equals</code> may or may not return <code>true</code>
when invoked with the original object, even if the original
object is unmodified.
A snapshot is guaranteed to work only within the virtual machine
in which it was generated. If a snapshot is passed to another
virtual machine (for example, in a parameter of an RMI call),
using it--even with the same JavaSpaces service--may generate
an <code>IllegalArgumentException</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>e</code> - the entry to take a snapshot of.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a snapshot of the entry.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/rmi/RemoteException.html?is-external=true" title="class or interface in java.rmi">RemoteException</a></code> - if a communication error occurs</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/JavaSpace.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../net/jini/space/InternalSpaceException.html" title="class in net.jini.space"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../net/jini/space/JavaSpace05.html" title="interface in net.jini.space"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?net/jini/space/JavaSpace.html" target="_top">Frames</a></li>
<li><a href="JavaSpace.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><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright 2007-2013, multiple authors.<br>Licensed under the <a href=http://www.apache.org/licenses/LICENSE-2.0 target=child >Apache License, Version 2.0</a>, see the <a href=../../../doc-files/NOTICE target=child >NOTICE</a> file for attributions.</small></p>
</body>
</html>