#IGNITE-53: wip
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c500eda6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c500eda6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c500eda6 Branch: refs/heads/ignite-94 Commit: c500eda65bb2aa96360027b96dac0169c8c979dc Parents: add3600 Author: ivasilinets <ivasilin...@gridgain.com> Authored: Tue Jan 20 11:27:36 2015 +0300 Committer: ivasilinets <ivasilin...@gridgain.com> Committed: Tue Jan 20 11:27:36 2015 +0300 ---------------------------------------------------------------------- .../processors/cache/IgniteCacheProxy.java | 30 ++++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c500eda6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java index 9d9392a..fbf6904 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java @@ -946,15 +946,33 @@ public class IgniteCacheProxy<K, V> extends IgniteAsyncSupportAdapter implements } /** {@inheritDoc} */ - @Override public void registerCacheEntryListener(CacheEntryListenerConfiguration cacheEntryLsnrConfiguration) { - // TODO IGNITE-1. - throw new UnsupportedOperationException(); + @Override public void registerCacheEntryListener(CacheEntryListenerConfiguration<K, V> lsnrCfg) { + GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + + try { + ctx.continuousQueries().registerCacheEntryListener(lsnrCfg, true); + } + catch (IgniteCheckedException e) { + throw cacheException(e); + } + finally { + gate.leave(prev); + } } /** {@inheritDoc} */ - @Override public void deregisterCacheEntryListener(CacheEntryListenerConfiguration cacheEntryLsnrConfiguration) { - // TODO IGNITE-1. - throw new UnsupportedOperationException(); + @Override public void deregisterCacheEntryListener(CacheEntryListenerConfiguration lsnrCfg) { + GridCacheProjectionImpl<K, V> prev = gate.enter(prj); + + try { + ctx.continuousQueries().deregisterCacheEntryListener(lsnrCfg); + } + catch (IgniteCheckedException e) { + throw cacheException(e); + } + finally { + gate.leave(prev); + } } /** {@inheritDoc} */