You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/01/18 15:12:44 UTC
[39/50] ignite git commit: wip
wip
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9edb32f7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9edb32f7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9edb32f7
Branch: refs/heads/ignite-2324
Commit: 9edb32f7e3e4262bd3a71b93c3dd93d696b2e9bd
Parents: 41ae014
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Thu Jan 14 11:48:47 2016 +0300
Committer: Pavel Tupitsyn <pt...@gridgain.com>
Committed: Thu Jan 14 11:48:47 2016 +0300
----------------------------------------------------------------------
.../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs | 43 ++++++++++++--------
1 file changed, 26 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/9edb32f7/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
index dbb58c8..325d429 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
@@ -1000,36 +1000,45 @@ namespace Apache.Ignite.Core.Impl.Cache
/// <summary>
/// QueryContinuous implementation.
/// </summary>
- private IContinuousQueryHandle<ICacheEntry<TK, TV>> QueryContinuousImpl(ContinuousQuery<TK, TV> qry,
+ private IContinuousQueryHandle<ICacheEntry<TK, TV>> QueryContinuousImpl(ContinuousQuery<TK, TV> qry,
QueryBase initialQry)
{
qry.Validate();
var hnd = new ContinuousQueryHandleImpl<TK, TV>(qry, Marshaller, _flagKeepBinary);
- using (var stream = IgniteManager.Memory.Allocate().GetStream())
+ try
{
- var writer = Marshaller.StartMarshal(stream);
-
- hnd.Start(_ignite, writer, () =>
+ using (var stream = IgniteManager.Memory.Allocate().GetStream())
{
- if (initialQry != null)
+ var writer = Marshaller.StartMarshal(stream);
+
+ hnd.Start(_ignite, writer, () =>
{
- writer.WriteInt((int) initialQry.OpId);
+ if (initialQry != null)
+ {
+ writer.WriteInt((int) initialQry.OpId);
- initialQry.Write(writer, IsKeepBinary);
- }
- else
- writer.WriteInt(-1); // no initial query
+ initialQry.Write(writer, IsKeepBinary);
+ }
+ else
+ writer.WriteInt(-1); // no initial query
- FinishMarshal(writer);
+ FinishMarshal(writer);
- // ReSharper disable once AccessToDisposedClosure
- return UU.CacheOutOpContinuousQuery(Target, (int)CacheOp.QryContinuous, stream.SynchronizeOutput());
- }, qry);
- }
+ // ReSharper disable once AccessToDisposedClosure
+ return UU.CacheOutOpContinuousQuery(Target, (int) CacheOp.QryContinuous,
+ stream.SynchronizeOutput());
+ }, qry);
+ }
- return hnd;
+ return hnd;
+ }
+ catch (Exception)
+ {
+ hnd.Dispose();
+ throw;
+ }
}
#endregion