Skip to content

Commit

Permalink
IGNITE-143 - Continuous queries refactoring (manual merge)
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Kulichenko committed Feb 14, 2015
1 parent e465477 commit b42fdcd
Showing 1 changed file with 24 additions and 6 deletions.
Expand Up @@ -150,9 +150,12 @@ public final class ContinuousQuery<K, V> extends Query<ContinuousQuery<K,V>> {
* time continuous query is executed. * time continuous query is executed.
* *
* @param initFilter Initial query. * @param initFilter Initial query.
* @return {@code this} for chaining.
*/ */
public void setInitialPredicate(Query initFilter) { public ContinuousQuery<K, V> setInitialPredicate(Query initFilter) {
this.initFilter = initFilter; this.initFilter = initFilter;

return this;
} }


/** /**
Expand All @@ -177,9 +180,12 @@ public Query getInitialPredicate() {
* blocking the thread that called the callback. Otherwise, you can get deadlocks. * blocking the thread that called the callback. Otherwise, you can get deadlocks.
* *
* @param locLsnr Local callback. * @param locLsnr Local callback.
* @return {@code this} for chaining.
*/ */
public void setLocalListener(CacheEntryUpdatedListener<K, V> locLsnr) { public ContinuousQuery<K, V> setLocalListener(CacheEntryUpdatedListener<K, V> locLsnr) {
this.locLsnr = locLsnr; this.locLsnr = locLsnr;

return this;
} }


/** /**
Expand All @@ -199,9 +205,12 @@ public CacheEntryUpdatedListener<K, V> getLocalListener() {
* without blocking the thread that called the filter. Otherwise, you can get deadlocks. * without blocking the thread that called the filter. Otherwise, you can get deadlocks.
* *
* @param rmtFilter Key-value filter. * @param rmtFilter Key-value filter.
* @return {@code this} for chaining.
*/ */
public void setRemoteFilter(CacheEntryEventFilter<K, V> rmtFilter) { public ContinuousQuery<K, V> setRemoteFilter(CacheEntryEventFilter<K, V> rmtFilter) {
this.rmtFilter = rmtFilter; this.rmtFilter = rmtFilter;

return this;
} }


/** /**
Expand All @@ -224,12 +233,15 @@ public CacheEntryEventFilter<K, V> getRemoteFilter() {
* disabled). * disabled).
* *
* @param bufSize Buffer size. * @param bufSize Buffer size.
* @return {@code this} for chaining.
*/ */
public void setBufferSize(int bufSize) { public ContinuousQuery<K, V> setBufferSize(int bufSize) {
if (bufSize <= 0) if (bufSize <= 0)
throw new IllegalArgumentException("Buffer size must be above zero."); throw new IllegalArgumentException("Buffer size must be above zero.");


this.bufSize = bufSize; this.bufSize = bufSize;

return this;
} }


/** /**
Expand All @@ -252,12 +264,15 @@ public int getBufferSize() {
* time check is disabled and entries will be sent only when buffer is full. * time check is disabled and entries will be sent only when buffer is full.
* *
* @param timeInterval Time interval. * @param timeInterval Time interval.
* @return {@code this} for chaining.
*/ */
public void setTimeInterval(long timeInterval) { public ContinuousQuery<K, V> setTimeInterval(long timeInterval) {
if (timeInterval < 0) if (timeInterval < 0)
throw new IllegalArgumentException("Time interval can't be negative."); throw new IllegalArgumentException("Time interval can't be negative.");


this.timeInterval = timeInterval; this.timeInterval = timeInterval;

return this;
} }


/** /**
Expand All @@ -280,9 +295,12 @@ public long getTimeInterval() {
* Default value for this flag is {@code true}. * Default value for this flag is {@code true}.
* *
* @param autoUnsubscribe Automatic unsubscription flag. * @param autoUnsubscribe Automatic unsubscription flag.
* @return {@code this} for chaining.
*/ */
public void setAutoUnsubscribe(boolean autoUnsubscribe) { public ContinuousQuery<K, V> setAutoUnsubscribe(boolean autoUnsubscribe) {
this.autoUnsubscribe = autoUnsubscribe; this.autoUnsubscribe = autoUnsubscribe;

return this;
} }


/** /**
Expand Down

0 comments on commit b42fdcd

Please sign in to comment.