blob: dd3a3300a91a51110fdb8fb764017b1cbb0bb686 [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>
<META NAME="ROBOTS" CONTENT="NOINDEX">
<link rel="canonical" href="https://ignite.apache.org/releases/1.0.0-rc3/javadoc/org/apache/ignite/cache/query/ContinuousQuery.html" />
<!-- Generated by javadoc (version 1.7.0_21) on Tue Mar 24 10:27:31 MSK 2015 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>ContinuousQuery (Ignite 1.0.0-RC3)</title>
<meta name="date" content="2015-03-24">
<link rel="stylesheet" type="text/css" href="../../../../../javadoc.css" title="Style">
<link rel='shortcut icon' href='http://gridgain.com/wp-content/uploads/2014/09/favicon.ico'/>
<link type='text/css' rel='stylesheet' href='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shCore.css'/>
<link type='text/css' rel='stylesheet' href='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shThemeDefault.css'/>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shCore.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shLegacy.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushJava.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushPlain.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushJScript.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushBash.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushXml.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushScala.js'></script>
<script type='text/javascript' src='http://gridgain.com/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushGroovy.js'></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-61232409-1', 'auto');
ga('send', 'pageview');
</script></head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ContinuousQuery (Ignite 1.0.0-RC3)";
}
//-->
</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/ContinuousQuery.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 class="aboutLanguage"><em>Apache Ignite - In-Memory Data Fabric</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../../org/apache/ignite/cache/query/Query.html" title="class in org.apache.ignite.cache.query"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/ignite/cache/query/ContinuousQuery.html" target="_top">Frames</a></li>
<li><a href="ContinuousQuery.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&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.ignite.cache.query</div>
<h2 title="Class ContinuousQuery" class="title">Class ContinuousQuery<span class='angle_bracket'>&lt;</span>K,V<span class='angle_bracket'>&gt;</span></h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/ignite/cache/query/Query.html" title="class in org.apache.ignite.cache.query">org.apache.ignite.cache.query.Query</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span>K,V<span class='angle_bracket'>&gt;</span><span class='angle_bracket'>&gt;</span></li>
<li>
<ul class="inheritance">
<li>org.apache.ignite.cache.query.ContinuousQuery<span class='angle_bracket'>&lt;</span>K,V<span class='angle_bracket'>&gt;</span></li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd>
</dl>
<hr>
<br>
<pre>public final class <span class="strong">ContinuousQuery<span class='angle_bracket'>&lt;</span>K,V<span class='angle_bracket'>&gt;</span></span>
extends <a href="../../../../../org/apache/ignite/cache/query/Query.html" title="class in org.apache.ignite.cache.query">Query</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span>K,V<span class='angle_bracket'>&gt;</span><span class='angle_bracket'>&gt;</span></pre>
<div class="block">API for configuring continuous cache queries.
<p>
Continuous queries allow to register a remote filter and a local listener
for cache updates. If an update event passes the filter, it will be sent to
the node that executed the query and local listener will be notified.
<p>
Additionally, you can execute initial query to get currently existing data.
Query can be of any type (SQL, TEXT or SCAN) and can be set via <a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#setInitialQuery(org.apache.ignite.cache.query.Query)"><code>setInitialQuery(Query)</code></a>
method.
<p>
Query can be executed either on all nodes in topology using <a href="../../../../../org/apache/ignite/IgniteCache.html#query(org.apache.ignite.cache.query.Query)"><code>IgniteCache.query(Query)</code></a>
method of only on the local node using <a href="../../../../../org/apache/ignite/IgniteCache.html#localQuery(org.apache.ignite.cache.query.Query)"><code>IgniteCache.localQuery(Query)</code></a> method.
Note that in case query is distributed and a new node joins, it will get the remote
filter for the query during discovery process before it actually joins topology,
so no updates will be missed.
<p>
To create a new instance of continuous query use <a href="../../../../../org/apache/ignite/cache/query/Query.html#continuous()"><code>Query.continuous()</code></a> factory method.
<h1 class="header">Example</h1>
As an example, suppose we have cache with <code>'Person'</code> objects and we need
to query all persons with salary above 1000.
<p>
Here is the <code>Person</code> class:
<pre name="code" class="java">
public class Person {
// Name.
private String name;
// Salary.
private double salary;
...
}
</pre>
<p>
You can create and execute continuous query like so:
<pre name="code" class="java">
// Create new continuous query.
ContinuousQuery qry = Query.continuous();
// Initial iteration query will return all persons with salary above 1000.
qry.setInitialQuery(Query.scan(new IgniteBiPredicate&lt;UUID, Person&gt;() {
&#64;Override public boolean apply(UUID id, Person p) {
return p.getSalary() &gt; 1000;
}
}));
// Callback that is called locally when update notifications are received.
// It simply prints out information about all created persons.
qry.setLocalListener(new CacheEntryUpdatedListener&lt;UUID, Person&gt;() {
&#64;Override public void onUpdated(Iterable&lt;CacheEntryEvent&lt;? extends UUID, ? extends Person&gt;&gt; evts) {
for (CacheEntryEvent&lt;? extends UUID, ? extends Person&gt; e : evts) {
Person p = e.getValue();
X.println("&gt;&gt;&gt;");
X.println("&gt;&gt;&gt; " + p.getFirstName() + " " + p.getLastName() +
"'s salary is " + p.getSalary());
X.println("&gt;&gt;&gt;");
}
}
});
// Continuous listener will be notified for persons with salary above 1000.
qry.setRemoteFilter(new CacheEntryEventFilter&lt;UUID, Person&gt;() {
&#64;Override public boolean evaluate(CacheEntryEvent&lt;? extends UUID, ? extends Person&gt; e) {
return e.getValue().getSalary() &gt; 1000;
}
});
// Execute query and get cursor that iterates through initial data.
QueryCursor&lt;Cache.Entry&lt;UUID, Person&gt;&gt; cur = cache.query(qry);
</pre>
This will execute query on all nodes that have cache you are working with and
listener will start to receive notifications for cache updates.
<p>
To stop receiving updates call <a href="../../../../../org/apache/ignite/cache/query/QueryCursor.html#close()"><code>QueryCursor.close()</code></a> method:
<pre name="code" class="java">
cur.close();
</pre>
Note that this works even if you didn't provide initial query. Cursor will
be empty in this case, but it will still unregister listeners when <a href="../../../../../org/apache/ignite/cache/query/QueryCursor.html#close()"><code>QueryCursor.close()</code></a>
is called.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.ignite.cache.query.ContinuousQuery">Serialized Form</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="overviewSummary" 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 boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#DFLT_AUTO_UNSUBSCRIBE">DFLT_AUTO_UNSUBSCRIBE</a></strong></code>
<div class="block">Default value for automatic unsubscription flag.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#DFLT_BUF_SIZE">DFLT_BUF_SIZE</a></strong></code>
<div class="block">Default buffer size.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#DFLT_TIME_INTERVAL">DFLT_TIME_INTERVAL</a></strong></code>
<div class="block">Maximum default time interval after which buffer will be flushed (if buffering is enabled).</div>
</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">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#ContinuousQuery()">ContinuousQuery</a></strong>()</code>&nbsp;</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">&nbsp;</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>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#getBufferSize()">getBufferSize</a></strong>()</code>
<div class="block">Gets buffer size.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/ignite/cache/query/Query.html" title="class in org.apache.ignite.cache.query">Query</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#getInitialQuery()">getInitialQuery</a></strong>()</code>
<div class="block">Gets initial query.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>javax.cache.event.CacheEntryUpdatedListener<span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#getLocalListener()">getLocalListener</a></strong>()</code>
<div class="block">Gets local listener.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>javax.cache.event.CacheEntryEventFilter<span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#getRemoteFilter()">getRemoteFilter</a></strong>()</code>
<div class="block">Gets remote filter.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#getTimeInterval()">getTimeInterval</a></strong>()</code>
<div class="block">Gets time interval.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#isAutoUnsubscribe()">isAutoUnsubscribe</a></strong>()</code>
<div class="block">Gets automatic unsubscription flag value.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#setAutoUnsubscribe(boolean)">setAutoUnsubscribe</a></strong>(boolean&nbsp;autoUnsubscribe)</code>
<div class="block">Sets automatic unsubscribe flag.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#setBufferSize(int)">setBufferSize</a></strong>(int&nbsp;bufSize)</code>
<div class="block">Sets buffer size.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#setInitialQuery(org.apache.ignite.cache.query.Query)">setInitialQuery</a></strong>(<a href="../../../../../org/apache/ignite/cache/query/Query.html" title="class in org.apache.ignite.cache.query">Query</a>&nbsp;initQry)</code>
<div class="block">Sets initial query.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#setLocalListener(javax.cache.event.CacheEntryUpdatedListener)">setLocalListener</a></strong>(javax.cache.event.CacheEntryUpdatedListener<span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span>&nbsp;locLsnr)</code>
<div class="block">Sets local callback.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#setRemoteFilter(javax.cache.event.CacheEntryEventFilter)">setRemoteFilter</a></strong>(javax.cache.event.CacheEntryEventFilter<span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span>&nbsp;rmtFilter)</code>
<div class="block">Sets optional key-value filter.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#setTimeInterval(long)">setTimeInterval</a></strong>(long&nbsp;timeInterval)</code>
<div class="block">Sets time interval.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.ignite.cache.query.Query">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.ignite.cache.query.<a href="../../../../../org/apache/ignite/cache/query/Query.html" title="class in org.apache.ignite.cache.query">Query</a></h3>
<code><a href="../../../../../org/apache/ignite/cache/query/Query.html#continuous()">continuous</a>, <a href="../../../../../org/apache/ignite/cache/query/Query.html#getPageSize()">getPageSize</a>, <a href="../../../../../org/apache/ignite/cache/query/Query.html#scan(org.apache.ignite.lang.IgniteBiPredicate)">scan</a>, <a href="../../../../../org/apache/ignite/cache/query/Query.html#setPageSize(int)">setPageSize</a>, <a href="../../../../../org/apache/ignite/cache/query/Query.html#spi()">spi</a>, <a href="../../../../../org/apache/ignite/cache/query/Query.html#sql(java.lang.Class, java.lang.String)">sql</a>, <a href="../../../../../org/apache/ignite/cache/query/Query.html#sql(java.lang.String)">sql</a>, <a href="../../../../../org/apache/ignite/cache/query/Query.html#text(java.lang.Class, java.lang.String)">text</a>, <a href="../../../../../org/apache/ignite/cache/query/Query.html#toString()">toString</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</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="DFLT_BUF_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DFLT_BUF_SIZE</h4>
<pre>public static final&nbsp;int DFLT_BUF_SIZE</pre>
<div class="block">Default buffer size. Size of <code>1</code> means that all entries
will be sent to master node immediately (buffering is disabled).</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.ignite.cache.query.ContinuousQuery.DFLT_BUF_SIZE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DFLT_TIME_INTERVAL">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DFLT_TIME_INTERVAL</h4>
<pre>public static final&nbsp;long DFLT_TIME_INTERVAL</pre>
<div class="block">Maximum default time interval after which buffer will be flushed (if buffering is enabled).</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.ignite.cache.query.ContinuousQuery.DFLT_TIME_INTERVAL">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DFLT_AUTO_UNSUBSCRIBE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DFLT_AUTO_UNSUBSCRIBE</h4>
<pre>public static final&nbsp;boolean DFLT_AUTO_UNSUBSCRIBE</pre>
<div class="block">Default value for automatic unsubscription flag. Remote filters
will be unregistered by default if master node leaves topology.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../constant-values.html#org.apache.ignite.cache.query.ContinuousQuery.DFLT_AUTO_UNSUBSCRIBE">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="ContinuousQuery()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ContinuousQuery</h4>
<pre>public&nbsp;ContinuousQuery()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setInitialQuery(org.apache.ignite.cache.query.Query)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setInitialQuery</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span>&nbsp;setInitialQuery(<a href="../../../../../org/apache/ignite/cache/query/Query.html" title="class in org.apache.ignite.cache.query">Query</a>&nbsp;initQry)</pre>
<div class="block">Sets initial query.
<p>
This query will be executed before continuous listener is registered
which allows to iterate through entries which already existed at the
time continuous query is executed.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initQry</code> - Initial query.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this</code> for chaining.</dd></dl>
</li>
</ul>
<a name="getInitialQuery()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInitialQuery</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/ignite/cache/query/Query.html" title="class in org.apache.ignite.cache.query">Query</a>&nbsp;getInitialQuery()</pre>
<div class="block">Gets initial query.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Initial query.</dd></dl>
</li>
</ul>
<a name="setLocalListener(javax.cache.event.CacheEntryUpdatedListener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLocalListener</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span>&nbsp;setLocalListener(javax.cache.event.CacheEntryUpdatedListener<span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span>&nbsp;locLsnr)</pre>
<div class="block">Sets local callback. This callback is called only in local node when new updates are received.
<p>
The callback predicate accepts ID of the node from where updates are received and collection
of received entries. Note that for removed entries value will be <code>null</code>.
<p>
If the predicate returns <code>false</code>, query execution will be cancelled.
<p>
<b>WARNING:</b> all operations that involve any kind of JVM-local or distributed locking (e.g.,
synchronization or transactional cache operations), should be executed asynchronously without
blocking the thread that called the callback. Otherwise, you can get deadlocks.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>locLsnr</code> - Local callback.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this</code> for chaining.</dd></dl>
</li>
</ul>
<a name="getLocalListener()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalListener</h4>
<pre>public&nbsp;javax.cache.event.CacheEntryUpdatedListener<span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span>&nbsp;getLocalListener()</pre>
<div class="block">Gets local listener.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Local listener.</dd></dl>
</li>
</ul>
<a name="setRemoteFilter(javax.cache.event.CacheEntryEventFilter)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRemoteFilter</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span>&nbsp;setRemoteFilter(javax.cache.event.CacheEntryEventFilter<span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span>&nbsp;rmtFilter)</pre>
<div class="block">Sets optional key-value filter. This filter is called before entry is sent to the master node.
<p>
<b>WARNING:</b> all operations that involve any kind of JVM-local or distributed locking
(e.g., synchronization or transactional cache operations), should be executed asynchronously
without blocking the thread that called the filter. Otherwise, you can get deadlocks.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>rmtFilter</code> - Key-value filter.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this</code> for chaining.</dd></dl>
</li>
</ul>
<a name="getRemoteFilter()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemoteFilter</h4>
<pre>public&nbsp;javax.cache.event.CacheEntryEventFilter<span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span>&nbsp;getRemoteFilter()</pre>
<div class="block">Gets remote filter.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Remote filter.</dd></dl>
</li>
</ul>
<a name="setBufferSize(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBufferSize</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span>&nbsp;setBufferSize(int&nbsp;bufSize)</pre>
<div class="block">Sets buffer size.
<p>
When a cache update happens, entry is first put into a buffer. Entries from buffer will be
sent to the master node only if the buffer is full or time provided via <a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#setTimeInterval(long)"><code>setTimeInterval(long)</code></a> method is
exceeded.
<p>
Default buffer size is <code>1</code> which means that entries will be sent immediately (buffering is
disabled).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bufSize</code> - Buffer size.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this</code> for chaining.</dd></dl>
</li>
</ul>
<a name="getBufferSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBufferSize</h4>
<pre>public&nbsp;int&nbsp;getBufferSize()</pre>
<div class="block">Gets buffer size.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Buffer size.</dd></dl>
</li>
</ul>
<a name="setTimeInterval(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setTimeInterval</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span>&nbsp;setTimeInterval(long&nbsp;timeInterval)</pre>
<div class="block">Sets time interval.
<p>
When a cache update happens, entry is first put into a buffer. Entries from buffer will
be sent to the master node only if the buffer is full (its size can be provided via <a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html#setBufferSize(int)"><code>setBufferSize(int)</code></a>
method) or time provided via this method is exceeded.
<p>
Default time interval is <code>0</code> which means that
time check is disabled and entries will be sent only when buffer is full.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>timeInterval</code> - Time interval.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this</code> for chaining.</dd></dl>
</li>
</ul>
<a name="getTimeInterval()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTimeInterval</h4>
<pre>public&nbsp;long&nbsp;getTimeInterval()</pre>
<div class="block">Gets time interval.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Time interval.</dd></dl>
</li>
</ul>
<a name="setAutoUnsubscribe(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAutoUnsubscribe</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="class in org.apache.ignite.cache.query">ContinuousQuery</a><span class='angle_bracket'>&lt;</span><a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">K</a>,<a href="../../../../../org/apache/ignite/cache/query/ContinuousQuery.html" title="type parameter in ContinuousQuery">V</a><span class='angle_bracket'>&gt;</span>&nbsp;setAutoUnsubscribe(boolean&nbsp;autoUnsubscribe)</pre>
<div class="block">Sets automatic unsubscribe flag.
<p>
This flag indicates that query filters on remote nodes should be
automatically unregistered if master node (node that initiated the query) leaves topology. If this flag is
<code>false</code>, filters will be unregistered only when the query is cancelled from master node, and won't ever be
unregistered if master node leaves grid.
<p>
Default value for this flag is <code>true</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>autoUnsubscribe</code> - Automatic unsubscription flag.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this</code> for chaining.</dd></dl>
</li>
</ul>
<a name="isAutoUnsubscribe()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isAutoUnsubscribe</h4>
<pre>public&nbsp;boolean&nbsp;isAutoUnsubscribe()</pre>
<div class="block">Gets automatic unsubscription flag value.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Automatic unsubscription flag.</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/ContinuousQuery.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 class="aboutLanguage"><em>Apache Ignite - In-Memory Data Fabric</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../../org/apache/ignite/cache/query/Query.html" title="class in org.apache.ignite.cache.query"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/ignite/cache/query/ContinuousQuery.html" target="_top">Frames</a></li>
<li><a href="ContinuousQuery.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&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><table width="100%" border="0" cellspacing=0 cellpadding=0 style="padding: 5px"> <tr> <td> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <a target=_blank href="https://incubator.apache.org/projects/ignite.html"><nobr>2015 Copyright &#169; Apache Software Foundation</nobr></a> </td> </tr> </tbody> </table> </td> <td width="100%" align="right" valign="center"> <a href="https://twitter.com/ApacheIgnite" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @ApacheIgnite</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> </td> </tr> <tr> <td colspan="2" valign="top" align="left"> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <b>Apache Ignite Fabric</b> </td> <td>:&nbsp;&nbsp; ver. <strong>1.0.0-RC3</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>:&nbsp;&nbsp; March 24 2015 </td> </tr> </tbody> </table> </td> </tr> </table></small></p>
<!--FOOTER--><script type='text/javascript'>SyntaxHighlighter.all();dp.SyntaxHighlighter.HighlightAll('code');</script>
</body>
</html>