You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by dg...@apache.org on 2017/11/17 22:42:47 UTC
[geode-native] branch develop updated: GEODE-3977: .NET
QueryService template args removed
This is an automated email from the ASF dual-hosted git repository.
dgkimura pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git
The following commit(s) were added to refs/heads/develop by this push:
new c025448 GEODE-3977: .NET QueryService template args removed
c025448 is described below
commit c025448bf9d2e8da5295f244751944d8147ada18
Author: mhansonp <mh...@pivotal.io>
AuthorDate: Fri Nov 17 14:42:45 2017 -0800
GEODE-3977: .NET QueryService template args removed
---
clicache/integration-test/PutGetTestsN.cs | 6 +-
.../ThinClientAppDomainQueryTests.cs | 8 +-
clicache/integration-test/ThinClientCqIRTestsN.cs | 6 +-
clicache/integration-test/ThinClientCqTestsN.cs | 48 ++++-----
clicache/integration-test/ThinClientDeltaTestN.cs | 4 +-
.../integration-test/ThinClientDurableCqTestsN.cs | 14 +--
.../integration-test/ThinClientDurableTestsN.cs | 2 +-
.../integration-test/ThinClientHARegionTestsN.cs | 6 +-
clicache/integration-test/ThinClientPdxTests.cs | 4 +-
clicache/integration-test/ThinClientQueryTestsN.cs | 112 +++++++++------------
.../ThinClientRemoteParamQueryResultSetTests.cs | 12 +--
.../ThinClientRemoteParamQueryStructSetTests.cs | 12 +--
.../ThinClientRemoteQueryExclusivenessTests.cs | 16 +--
.../ThinClientRemoteQueryFailoverTests.cs | 6 +-
.../ThinClientRemoteQueryResultSetTests.cs | 12 +--
.../ThinClientRemoteQueryStructSetTests.cs | 12 +--
.../ThinClientSecurityAuthzTestBaseN.cs | 8 +-
.../ThinClientSecurityAuthzTestsMUN.cs | 10 +-
.../ThinClientStringArrayTestsN.cs | 6 +-
clicache/src/Cache.cpp | 10 +-
clicache/src/Cache.hpp | 7 +-
clicache/src/IRegionService.hpp | 4 +-
clicache/src/Pool.cpp | 5 +-
clicache/src/Pool.hpp | 4 +-
clicache/src/QueryService.cpp | 66 +++++-------
clicache/src/QueryService.hpp | 41 +++++---
clicache/src/impl/AuthenticatedCache.cpp | 5 +-
clicache/src/impl/AuthenticatedCache.hpp | 3 +-
tests/cli/NewFwkLib/CacheServer.cs | 26 ++---
tests/cli/NewFwkLib/FwkTest.cs | 4 +-
tests/cli/NewFwkLib/PdxTest/PdxTests.cs | 10 +-
tests/cli/NewFwkLib/QueryTest/QueryTests.cs | 46 ++++-----
32 files changed, 237 insertions(+), 298 deletions(-)
diff --git a/clicache/integration-test/PutGetTestsN.cs b/clicache/integration-test/PutGetTestsN.cs
index 2147821..fbc592a 100644
--- a/clicache/integration-test/PutGetTestsN.cs
+++ b/clicache/integration-test/PutGetTestsN.cs
@@ -318,9 +318,9 @@ namespace Apache.Geode.Client.UnitTests
}
else
{
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find(m_region.Attributes.PoolName).GetQueryService<object, object>();
- Query<object> qry = qs.NewQuery("SELECT * FROM " + m_region.FullPath);
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find(m_region.Attributes.PoolName).GetQueryService();
+ Query<object> qry = qs.NewQuery<object>("SELECT * FROM " + m_region.FullPath);
ISelectResults<object> results = qry.Execute();
// not really interested in results but loop through them neverthless
Util.Log("DoRunQuery: obtained {0} results", results.Size);
diff --git a/clicache/integration-test/ThinClientAppDomainQueryTests.cs b/clicache/integration-test/ThinClientAppDomainQueryTests.cs
index 90aabf7..c541ef8 100644
--- a/clicache/integration-test/ThinClientAppDomainQueryTests.cs
+++ b/clicache/integration-test/ThinClientAppDomainQueryTests.cs
@@ -124,7 +124,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -146,7 +146,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating query index {0}. Query string {1}", qryIdx, qrystr.Query);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
ISelectResults<object> results = query.Execute();
@@ -204,7 +204,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -218,7 +218,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating unsupported query index {0}.", qryIdx);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
try
{
diff --git a/clicache/integration-test/ThinClientCqIRTestsN.cs b/clicache/integration-test/ThinClientCqIRTestsN.cs
index ea90850..0c9de7a 100644
--- a/clicache/integration-test/ThinClientCqIRTestsN.cs
+++ b/clicache/integration-test/ThinClientCqIRTestsN.cs
@@ -148,8 +148,8 @@ namespace Apache.Geode.Client.UnitTests
region["3"] = p3;
region["4"] = p4;
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
ICqListener<object, object> cqLstner = new MyCqListener<object, object>();
cqFac.AddCqListener(cqLstner);
@@ -207,7 +207,7 @@ namespace Apache.Geode.Client.UnitTests
}
}
}
- qry = qs.GetCq(CqName);
+ qry = qs.GetCq<object, object>(CqName);
qry.Stop();
qry.Close();
// Bring down the region
diff --git a/clicache/integration-test/ThinClientCqTestsN.cs b/clicache/integration-test/ThinClientCqTestsN.cs
index 2dd8118..7cb9309 100644
--- a/clicache/integration-test/ThinClientCqTestsN.cs
+++ b/clicache/integration-test/ThinClientCqTestsN.cs
@@ -393,9 +393,7 @@ namespace Apache.Geode.Client.UnitTests
region["3"] = p3;
region["4"] = p4;
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
ICqListener<object, object> cqLstner = new MyCqListener<object, object>();
cqFac.AddCqListener(cqLstner);
@@ -409,7 +407,7 @@ namespace Apache.Geode.Client.UnitTests
region["1"] = p4;
Thread.Sleep(18000); // sleep 0.3min to allow server c query to complete
- qry = qs.GetCq(CqName);
+ qry = qs.GetCq<object, object>(CqName);
CqServiceStatistics cqSvcStats = qs.GetCqStatistics();
Assert.AreEqual(1, cqSvcStats.numCqsActive());
@@ -454,9 +452,7 @@ namespace Apache.Geode.Client.UnitTests
region["3"] = p3;
region["4"] = p4;
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
ICqListener<object, object> cqLstner = new MyCqListener<object, object>();
cqFac.AddCqListener(cqLstner);
@@ -470,7 +466,7 @@ namespace Apache.Geode.Client.UnitTests
region["1"] = p4;
Thread.Sleep(18000); // sleep 0.3min to allow server c query to complete
- qry = qs.GetCq(CqName);
+ qry = qs.GetCq<object, object>(CqName);
CqServiceStatistics cqSvcStats = qs.GetCqStatistics();
Assert.AreEqual(1, cqSvcStats.numCqsActive());
@@ -616,9 +612,7 @@ namespace Apache.Geode.Client.UnitTests
region["3"] = p3;
region["4"] = p4;
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
ICqListener<object, object> cqLstner = new MyCqListener<object, object>();
@@ -641,7 +635,7 @@ namespace Apache.Geode.Client.UnitTests
region["1"] = p4;
Thread.Sleep(18000); // sleep 0.3min to allow server c query to complete
- qry1 = qs.GetCq("CQ1");
+ qry1 = qs.GetCq<object, object>("CQ1");
cqAttr = qry1.GetCqAttributes();
ICqListener<object, object>[] vl = cqAttr.getCqListeners();
Assert.IsNotNull(vl);
@@ -687,7 +681,7 @@ namespace Apache.Geode.Client.UnitTests
region["1"] = p4;
Thread.Sleep(18000); // sleep 0.3min to allow server c query to complete
- qry1 = qs.GetCq("CQ1");
+ qry1 = qs.GetCq<object, object>("CQ1");
cqAttr = qry1.GetCqAttributes();
ICqListener<object, object>[] v3 = cqAttr.getCqListeners();
Assert.IsNotNull(v3);
@@ -722,7 +716,7 @@ namespace Apache.Geode.Client.UnitTests
region["1"] = p4;
Thread.Sleep(18000); // sleep 0.3min to allow server c query to complete
- qry1 = qs.GetCq("CQ1");
+ qry1 = qs.GetCq<object, object>("CQ1");
cqAttr = qry1.GetCqAttributes();
ICqListener<object, object>[] v4 = cqAttr.getCqListeners();
Assert.IsNotNull(v4);
@@ -732,8 +726,8 @@ namespace Apache.Geode.Client.UnitTests
public void CreateAndExecuteCQ_StatusListener(string poolName, string cqName, string cqQuery, int id)
{
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService();
CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
cqFac.AddCqListener(new MyCqStatusListener<object, object>(id));
CqAttributes<object, object> cqAttr = cqFac.Create();
@@ -744,8 +738,8 @@ namespace Apache.Geode.Client.UnitTests
public void CreateAndExecuteCQ_Listener(string poolName, string cqName, string cqQuery, int id)
{
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService();
CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
cqFac.AddCqListener(new MyCqListener<object, object>(/*id*/));
CqAttributes<object, object> cqAttr = cqFac.Create();
@@ -756,9 +750,9 @@ namespace Apache.Geode.Client.UnitTests
public void CheckCQStatusOnConnect(string poolName, string cqName, int onCqStatusConnect)
{
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
- CqQuery<object, object> query = qs.GetCq(cqName);
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService();
+ CqQuery<object, object> query = qs.GetCq<object, object>(cqName);
CqAttributes<object, object> cqAttr = query.GetCqAttributes();
ICqListener<object, object>[] vl = cqAttr.getCqListeners();
MyCqStatusListener<object, object> myCqStatusLstr = (MyCqStatusListener<object, object>) vl[0];
@@ -768,9 +762,9 @@ namespace Apache.Geode.Client.UnitTests
public void CheckCQStatusOnDisConnect(string poolName, string cqName, int onCqStatusDisConnect)
{
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
- CqQuery<object, object> query = qs.GetCq(cqName);
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService();
+ CqQuery<object, object> query = qs.GetCq<object, object>(cqName);
CqAttributes<object, object> cqAttr = query.GetCqAttributes();
ICqListener<object, object>[] vl = cqAttr.getCqListeners();
MyCqStatusListener<object, object> myCqStatusLstr = (MyCqStatusListener<object, object>)vl[0];
@@ -789,9 +783,9 @@ namespace Apache.Geode.Client.UnitTests
public void CheckCQStatusOnPutEvent(string poolName, string cqName, int onCreateCount)
{
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService<object, object>();
- CqQuery<object, object> query = qs.GetCq(cqName);
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find(poolName).GetQueryService();
+ CqQuery<object, object> query = qs.GetCq<object, object>(cqName);
CqAttributes<object, object> cqAttr = query.GetCqAttributes();
ICqListener<object, object>[] vl = cqAttr.getCqListeners();
MyCqStatusListener<object, object> myCqStatusLstr = (MyCqStatusListener<object, object>)vl[0];
diff --git a/clicache/integration-test/ThinClientDeltaTestN.cs b/clicache/integration-test/ThinClientDeltaTestN.cs
index 81232ef..0c8f1a0 100644
--- a/clicache/integration-test/ThinClientDeltaTestN.cs
+++ b/clicache/integration-test/ThinClientDeltaTestN.cs
@@ -636,8 +636,8 @@ namespace Apache.Geode.Client.UnitTests
void registerCq()
{
Pool thePool = CacheHelper.DCache.GetPoolManager().Find("__TEST_POOL1__");
- QueryService<object, DeltaTestImpl> cqService = null;
- cqService = thePool.GetQueryService<object, DeltaTestImpl>();
+ QueryService cqService = null;
+ cqService = thePool.GetQueryService();
CqAttributesFactory<object, DeltaTestImpl> attrFac = new CqAttributesFactory<object, DeltaTestImpl>();
myCqListener = new CqDeltaListener<object, DeltaTestImpl>();
attrFac.AddCqListener(myCqListener);
diff --git a/clicache/integration-test/ThinClientDurableCqTestsN.cs b/clicache/integration-test/ThinClientDurableCqTestsN.cs
index 604261a..6d5c803 100644
--- a/clicache/integration-test/ThinClientDurableCqTestsN.cs
+++ b/clicache/integration-test/ThinClientDurableCqTestsN.cs
@@ -61,7 +61,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Registering Cqs for client1.");
CqAttributesFactory<object, object> cqAf = new CqAttributesFactory<object, object>();
CqAttributes<object, object> attributes = cqAf.Create();
- QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
if (!isRecycle)
{
@@ -85,7 +85,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Registering Cqs for client1 for multiple chunks.");
CqAttributesFactory<object, object> cqAf = new CqAttributesFactory<object, object>();
CqAttributes<object, object> attributes = cqAf.Create();
- QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
for (int i = 0; i < m_NumberOfCqs; i++)
qs.NewCq("MyCq_" + i.ToString(), "Select * From /" + QueryRegionNames[0] + " where id = 1", attributes, true).ExecuteWithInitialResults();
@@ -97,7 +97,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Registering Cqs for client2.");
CqAttributesFactory<object, object> cqAf = new CqAttributesFactory<object, object>();
CqAttributes<object, object> attributes = cqAf.Create();
- QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
if (!isRecycle)
{
@@ -118,7 +118,7 @@ namespace Apache.Geode.Client.UnitTests
public void VerifyDurableCqListClient1MultipleChunks()
{
Util.Log("Verifying durable Cqs for client1.");
- QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
System.Collections.Generic.List<string> durableCqList = qs.GetAllDurableCqsFromServer();
Assert.AreNotEqual(null, durableCqList);
@@ -130,7 +130,7 @@ namespace Apache.Geode.Client.UnitTests
public void VerifyDurableCqListClient1(bool isRecycle)
{
Util.Log("Verifying durable Cqs for client1.");
- QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
System.Collections.Generic.List<string> durableCqList = qs.GetAllDurableCqsFromServer();
Assert.AreNotEqual(null, durableCqList);
@@ -154,7 +154,7 @@ namespace Apache.Geode.Client.UnitTests
public void VerifyDurableCqListClient2(bool isRecycle)
{
Util.Log("Verifying durable Cqs for client2.");
- QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
System.Collections.Generic.List<string> durableCqList = qs.GetAllDurableCqsFromServer();
Assert.AreNotEqual(null, durableCqList);
@@ -183,7 +183,7 @@ namespace Apache.Geode.Client.UnitTests
public void VerifyEmptyDurableCqListClient1()
{
Util.Log("Verifying empty durable Cqs for client1.");
- QueryService<object, object> qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
System.Collections.Generic.List<string> durableCqList = qs.GetAllDurableCqsFromServer();
Assert.AreNotEqual(null, durableCqList);
Assert.AreEqual(0, durableCqList.Count, "Durable CQ list sholuld be empty");
diff --git a/clicache/integration-test/ThinClientDurableTestsN.cs b/clicache/integration-test/ThinClientDurableTestsN.cs
index 3bf8a19..d39005e 100644
--- a/clicache/integration-test/ThinClientDurableTestsN.cs
+++ b/clicache/integration-test/ThinClientDurableTestsN.cs
@@ -806,7 +806,7 @@ namespace Apache.Geode.Client.UnitTests
IRegion<object, object> region = regionFactory.Create<object, object>("DistRegionAck");
Util.Log("Created the DistRegionAck Region Programmatically");
- QueryService<object, object> qService = cache.GetQueryService<object, object>();
+ QueryService qService = cache.GetQueryService();
CqAttributesFactory<object, object> cqFac = new CqAttributesFactory<object, object>();
ICqListener<object, object> cqLstner = new MyCqListener1<object, object>();
diff --git a/clicache/integration-test/ThinClientHARegionTestsN.cs b/clicache/integration-test/ThinClientHARegionTestsN.cs
index 2a9d968..67f8729 100644
--- a/clicache/integration-test/ThinClientHARegionTestsN.cs
+++ b/clicache/integration-test/ThinClientHARegionTestsN.cs
@@ -673,12 +673,12 @@ namespace Apache.Geode.Client.UnitTests
IAsyncResult killRes = null;
KillServerDelegate ksd = new KillServerDelegate(KillServer);
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
for (int i = 0; i < 10000; i++)
{
- Query<object> qry = qs.NewQuery("select distinct * from /" + QueryRegionName);
+ Query<object> qry = qs.NewQuery<object>("select distinct * from /" + QueryRegionName);
ISelectResults<object> results = qry.Execute();
diff --git a/clicache/integration-test/ThinClientPdxTests.cs b/clicache/integration-test/ThinClientPdxTests.cs
index 9276d50..9181dd6 100755
--- a/clicache/integration-test/ThinClientPdxTests.cs
+++ b/clicache/integration-test/ThinClientPdxTests.cs
@@ -2673,9 +2673,9 @@ namespace Apache.Geode.Client.UnitTests
//private Address _address;
//private Hashtable _hashTable;
- //QueryService<object, object> qs = PoolManager/*<object, object>*/.Find("__TESTPOOL1_").GetQueryService<object, object>();
+ //QueryService qs = PoolManager/*<object, object>*/.Find("__TESTPOOL1_").GetQueryService();
- //Query<object> qry = qs.NewQuery("select _addressArray from /" + m_regionNames[0] + " where arrayCount = 10");
+ //Query<object> qry = qs.NewQuery<object>("select _addressArray from /" + m_regionNames[0] + " where arrayCount = 10");
//ISelectResults<object> results = qry.Execute();
//Assert.Greater(results.Size, 5, "query should have result");
//IEnumerator<object> ie = results.GetEnumerator();
diff --git a/clicache/integration-test/ThinClientQueryTestsN.cs b/clicache/integration-test/ThinClientQueryTestsN.cs
index 0f7ea10..b593595 100644
--- a/clicache/integration-test/ThinClientQueryTestsN.cs
+++ b/clicache/integration-test/ThinClientQueryTestsN.cs
@@ -94,8 +94,8 @@ namespace Apache.Geode.Client.UnitTests
try
{
var poolFail = CacheHelper.DCache.GetPoolManager().CreateFactory().Create("_TESTFAILPOOL_", CacheHelper.DCache);
- var qsFail = poolFail.GetQueryService<object, object>();
- var qryFail = qsFail.NewQuery("select distinct * from /" + QERegionName);
+ var qsFail = poolFail.GetQueryService();
+ var qryFail = qsFail.NewQuery<object>("select distinct * from /" + QERegionName);
var resultsFail = qryFail.Execute();
Assert.Fail("Since no endpoints defined, so exception expected");
}
@@ -136,10 +136,10 @@ namespace Apache.Geode.Client.UnitTests
region["4"] = p4;
}
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
- Query<object> qry = qs.NewQuery("select distinct * from /" + QERegionName);
+ Query<object> qry = qs.NewQuery<object>("select distinct * from /" + QERegionName);
ISelectResults<object> results = qry.Execute();
Int32 count = results.Size;
Assert.AreEqual(4, count, "Expected 4 as number of portfolio objects.");
@@ -150,10 +150,10 @@ namespace Apache.Geode.Client.UnitTests
public void StepTwoQE()
{
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
Util.Log("Going to execute the query");
- Query<object> qry = qs.NewQuery("select distinct * from /" + QERegionName);
+ Query<object> qry = qs.NewQuery<object>("select distinct * from /" + QERegionName);
ISelectResults<object> results = qry.Execute();
Int32 count = results.Size;
Assert.AreEqual(4, count, "Expected 4 as number of portfolio objects.");
@@ -242,9 +242,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -269,7 +267,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating query index {0}. Query string {1}", qryIdx, qrystr.Query);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
ISelectResults<object> results = query.Execute();
@@ -358,9 +356,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -375,7 +371,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating query index {0}. {1}", qryIdx, paramqrystr.Query);
- Query<object> query = qs.NewQuery(paramqrystr.Query);
+ Query<object> query = qs.NewQuery<object>(paramqrystr.Query);
//Populate the parameter list (paramList) for the query.
object[] paramList = new object[QueryStatics.NoOfQueryParam[qryIdx]];
@@ -486,9 +482,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -502,7 +496,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating unsupported query index {0}.", qryIdx);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
try
{
@@ -534,9 +528,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -550,7 +542,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating unsupported query index {0}.", qryIdx);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
object[] paramList = new object[QueryStatics.NoOfQueryParam[qryIdx]];
@@ -603,9 +595,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -630,7 +620,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating query index {0}. {1}", qryIdx, qrystr.Query);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
ISelectResults<object> results = query.Execute();
@@ -675,9 +665,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -702,7 +690,7 @@ namespace Apache.Geode.Client.UnitTests
}
}
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
//Populate the param list, paramList for parameterized query
object[] paramList = new object[QueryStatics.NoOfQueryParamSS[qryIdx]];
@@ -769,9 +757,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -785,7 +771,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating unsupported query index {0}.", qryIdx);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
try
{
@@ -817,9 +803,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -833,7 +817,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating unsupported query index {0}.", qryIdx);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
//Populate the param list
object[] paramList = new object[QueryStatics.NoOfQueryParamSS[qryIdx]];
@@ -940,13 +924,11 @@ namespace Apache.Geode.Client.UnitTests
IAsyncResult killRes = null;
KillServerDelegate ksd = new KillServerDelegate(KillServer);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
for (int i = 0; i < 10000; i++)
{
- Query<object> qry = qs.NewQuery("select distinct * from /" + QueryRegionNames[0]);
+ Query<object> qry = qs.NewQuery<object>("select distinct * from /" + QueryRegionNames[0]);
ISelectResults<object> results = qry.Execute();
@@ -977,13 +959,11 @@ namespace Apache.Geode.Client.UnitTests
IAsyncResult killRes = null;
KillServerDelegate ksd = new KillServerDelegate(KillServer);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
for (int i = 0; i < 10000; i++)
{
- Query<object> qry = qs.NewQuery("select distinct * from /" + QueryRegionNames[0] + " where ID > $1");
+ Query<object> qry = qs.NewQuery<object>("select distinct * from /" + QueryRegionNames[0] + " where ID > $1");
//Populate the param list
object[] paramList = new object[1];
@@ -1013,10 +993,10 @@ namespace Apache.Geode.Client.UnitTests
public void StepThreeQT()
{
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
Util.Log("query " + QueryStatics.ResultSetQueries[34].Query);
- Query<object> query = qs.NewQuery(QueryStatics.ResultSetQueries[34].Query);
+ Query<object> query = qs.NewQuery<object>(QueryStatics.ResultSetQueries[34].Query);
try
{
@@ -1035,10 +1015,10 @@ namespace Apache.Geode.Client.UnitTests
public void StepFourQT()
{
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
- Query<object> query = qs.NewQuery(QueryStatics.ResultSetQueries[35].Query);
+ Query<object> query = qs.NewQuery<object>(QueryStatics.ResultSetQueries[35].Query);
try
{
@@ -1056,10 +1036,10 @@ namespace Apache.Geode.Client.UnitTests
public void StepFiveQT()
{
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
- Query<object> query = qs.NewQuery(QueryStatics.StructSetQueries[17].Query);
+ Query<object> query = qs.NewQuery<object>(QueryStatics.StructSetQueries[17].Query);
try
{
@@ -1078,9 +1058,9 @@ namespace Apache.Geode.Client.UnitTests
public void StepSixQT()
{
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
- Query<object> query = qs.NewQuery(QueryStatics.StructSetQueries[17].Query);
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
+ Query<object> query = qs.NewQuery<object>(QueryStatics.StructSetQueries[17].Query);
try
{
@@ -1098,10 +1078,10 @@ namespace Apache.Geode.Client.UnitTests
public void StepThreePQT()
{
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
- Query<object> query = qs.NewQuery(QueryStatics.StructSetParamQueries[5].Query);
+ Query<object> query = qs.NewQuery<object>(QueryStatics.StructSetParamQueries[5].Query);
try
@@ -1141,10 +1121,10 @@ namespace Apache.Geode.Client.UnitTests
public void StepFourPQT()
{
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
- Query<object> query = qs.NewQuery(QueryStatics.StructSetParamQueries[5].Query);
+ Query<object> query = qs.NewQuery<object>(QueryStatics.StructSetParamQueries[5].Query);
try
{
diff --git a/clicache/integration-test/ThinClientRemoteParamQueryResultSetTests.cs b/clicache/integration-test/ThinClientRemoteParamQueryResultSetTests.cs
index 065edfa..a242f6d 100644
--- a/clicache/integration-test/ThinClientRemoteParamQueryResultSetTests.cs
+++ b/clicache/integration-test/ThinClientRemoteParamQueryResultSetTests.cs
@@ -149,9 +149,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -166,7 +164,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating query index {0}. {1}", qryIdx, paramqrystr.Query);
- Query<object> query = qs.NewQuery(paramqrystr.Query);
+ Query<object> query = qs.NewQuery<object>(paramqrystr.Query);
//Populate the parameter list (paramList) for the query.
object[] paramList = new object[QueryStatics.NoOfQueryParam[qryIdx]];
@@ -277,9 +275,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -293,7 +289,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating unsupported query index {0}.", qryIdx);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
object[] paramList = new object[QueryStatics.NoOfQueryParam[qryIdx]];
diff --git a/clicache/integration-test/ThinClientRemoteParamQueryStructSetTests.cs b/clicache/integration-test/ThinClientRemoteParamQueryStructSetTests.cs
index c4fcd73..f6bd27e 100644
--- a/clicache/integration-test/ThinClientRemoteParamQueryStructSetTests.cs
+++ b/clicache/integration-test/ThinClientRemoteParamQueryStructSetTests.cs
@@ -149,9 +149,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -176,7 +174,7 @@ namespace Apache.Geode.Client.UnitTests
}
}
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
//Populate the param list, paramList for parameterized query
object[] paramList = new object[QueryStatics.NoOfQueryParamSS[qryIdx]];
@@ -243,9 +241,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -259,7 +255,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating unsupported query index {0}.", qryIdx);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
//Populate the param list
object[] paramList = new object[QueryStatics.NoOfQueryParamSS[qryIdx]];
diff --git a/clicache/integration-test/ThinClientRemoteQueryExclusivenessTests.cs b/clicache/integration-test/ThinClientRemoteQueryExclusivenessTests.cs
index 34db74f..76f98d5 100644
--- a/clicache/integration-test/ThinClientRemoteQueryExclusivenessTests.cs
+++ b/clicache/integration-test/ThinClientRemoteQueryExclusivenessTests.cs
@@ -90,8 +90,8 @@ namespace Apache.Geode.Client.UnitTests
try
{
var poolFail = CacheHelper.DCache.GetPoolManager().CreateFactory().Create("_TESTFAILPOOL_", CacheHelper.DCache);
- var qsFail = poolFail.GetQueryService<object, object>();
- var qryFail = qsFail.NewQuery("select distinct * from /" + QERegionName);
+ var qsFail = poolFail.GetQueryService();
+ var qryFail = qsFail.NewQuery<object>("select distinct * from /" + QERegionName);
var resultsFail = qryFail.Execute();
Assert.Fail("Since no endpoints defined, so exception expected");
}
@@ -132,10 +132,10 @@ namespace Apache.Geode.Client.UnitTests
region["4"] = p4;
}
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
- Query<object> qry = qs.NewQuery("select distinct * from /" + QERegionName);
+ Query<object> qry = qs.NewQuery<object>("select distinct * from /" + QERegionName);
ISelectResults<object> results = qry.Execute();
Int32 count = results.Size;
Assert.AreEqual(4, count, "Expected 4 as number of portfolio objects.");
@@ -146,10 +146,10 @@ namespace Apache.Geode.Client.UnitTests
public void StepTwoQE()
{
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
Util.Log("Going to execute the query");
- Query<object> qry = qs.NewQuery("select distinct * from /" + QERegionName);
+ Query<object> qry = qs.NewQuery<object>("select distinct * from /" + QERegionName);
ISelectResults<object> results = qry.Execute();
Int32 count = results.Size;
Assert.AreEqual(4, count, "Expected 4 as number of portfolio objects.");
diff --git a/clicache/integration-test/ThinClientRemoteQueryFailoverTests.cs b/clicache/integration-test/ThinClientRemoteQueryFailoverTests.cs
index 4781b6b..0e56440 100644
--- a/clicache/integration-test/ThinClientRemoteQueryFailoverTests.cs
+++ b/clicache/integration-test/ThinClientRemoteQueryFailoverTests.cs
@@ -145,13 +145,11 @@ namespace Apache.Geode.Client.UnitTests
IAsyncResult killRes = null;
KillServerDelegate ksd = new KillServerDelegate(KillServer);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
for (int i = 0; i < 10000; i++)
{
- Query<object> qry = qs.NewQuery("select distinct * from /" + QueryRegionNames[0]);
+ Query<object> qry = qs.NewQuery<object>("select distinct * from /" + QueryRegionNames[0]);
ISelectResults<object> results = qry.Execute();
diff --git a/clicache/integration-test/ThinClientRemoteQueryResultSetTests.cs b/clicache/integration-test/ThinClientRemoteQueryResultSetTests.cs
index 9834064..2bfce6b 100644
--- a/clicache/integration-test/ThinClientRemoteQueryResultSetTests.cs
+++ b/clicache/integration-test/ThinClientRemoteQueryResultSetTests.cs
@@ -150,9 +150,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -177,7 +175,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating query index {0}. Query string {1}", qryIdx, qrystr.Query);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
ISelectResults<object> results = query.Execute();
@@ -266,9 +264,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -282,7 +278,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating unsupported query index {0}.", qryIdx);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
try
{
diff --git a/clicache/integration-test/ThinClientRemoteQueryStructSetTests.cs b/clicache/integration-test/ThinClientRemoteQueryStructSetTests.cs
index 780e305..21059e3 100644
--- a/clicache/integration-test/ThinClientRemoteQueryStructSetTests.cs
+++ b/clicache/integration-test/ThinClientRemoteQueryStructSetTests.cs
@@ -151,9 +151,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -178,7 +176,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating query index {0}. {1}", qryIdx, qrystr.Query);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
ISelectResults<object> results = query.Execute();
@@ -223,9 +221,7 @@ namespace Apache.Geode.Client.UnitTests
QueryHelper<object, object> qh = QueryHelper<object, object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
-
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
+ var qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -239,7 +235,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("Evaluating unsupported query index {0}.", qryIdx);
- Query<object> query = qs.NewQuery(qrystr.Query);
+ Query<object> query = qs.NewQuery<object>(qrystr.Query);
try
{
diff --git a/clicache/integration-test/ThinClientSecurityAuthzTestBaseN.cs b/clicache/integration-test/ThinClientSecurityAuthzTestBaseN.cs
index a66c41d..bee0da7 100644
--- a/clicache/integration-test/ThinClientSecurityAuthzTestBaseN.cs
+++ b/clicache/integration-test/ThinClientSecurityAuthzTestBaseN.cs
@@ -311,7 +311,7 @@ namespace Apache.Geode.Client.UnitTests
}
else
{
- queryResults = CacheHelper.getMultiuserCache(creds).GetQueryService<object, object>().NewQuery("SELECT DISTINCT * FROM " + region.FullPath).Execute();
+ queryResults = CacheHelper.getMultiuserCache(creds).GetQueryService().NewQuery<object>("SELECT DISTINCT * FROM " + region.FullPath).Execute();
}
Assert.IsNotNull(queryResults);
if (!CheckFlags(flags, OpFlags.CheckFail))
@@ -407,14 +407,14 @@ namespace Apache.Geode.Client.UnitTests
break;
case OperationCode.ExecuteCQ:
Pool/*<object, object>*/ pool = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_");
- QueryService<object, object> qs;
+ QueryService qs;
if (pool != null)
{
- qs = pool.GetQueryService<object, object>();
+ qs = pool.GetQueryService();
}
else
{
- //qs = CacheHelper.DCache.GetQueryService<object, object>();
+ //qs = CacheHelper.DCache.GetQueryService();
qs = null;
}
diff --git a/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs b/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
index 3d697bb..12bf7ea 100644
--- a/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
+++ b/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
@@ -219,7 +219,7 @@ namespace Apache.Geode.Client.UnitTests
}
protected const string RegionName_CQ = "Portfolios";
- static QueryService<object, object> gQueryService = null;
+ static QueryService gQueryService = null;
static string [] QueryStrings = {
"select * from /Portfolios p where p.ID < 1",
@@ -249,7 +249,7 @@ namespace Apache.Geode.Client.UnitTests
}
// VJR: TODO fix cache.GetQueryService to also be generic
- gQueryService = CacheHelper.getMultiuserCache(credentials).GetQueryService<object, object>();
+ gQueryService = CacheHelper.getMultiuserCache(credentials).GetQueryService();
for (int i = 0; i < QueryStrings.Length; i++)
{
@@ -317,7 +317,7 @@ namespace Apache.Geode.Client.UnitTests
Util.Log("verifyCQEvents " + gQueryService);
Assert.IsNotNull(gQueryService);
- CqQuery<object, object> cq = gQueryService.GetCq("cq_" + 3);
+ CqQuery<object, object> cq = gQueryService.GetCq<object, object>("cq_" + 3);
ICqListener<object, object>[] cqL = cq.GetCqAttributes().getCqListeners();
MyCqListener2<object, object> mcqL = (MyCqListener2<object, object>)cqL[0];
@@ -338,7 +338,7 @@ namespace Apache.Geode.Client.UnitTests
Assert.AreEqual(0, mcqL.Updates, "CQ listener 3 should not get any update event ");
}
- cq = gQueryService.GetCq("cq_" + 4);
+ cq = gQueryService.GetCq<object, object>("cq_" + 4);
cqL = cq.GetCqAttributes().getCqListeners();
mcqL = (MyCqListener2<object, object>)cqL[0];
@@ -359,7 +359,7 @@ namespace Apache.Geode.Client.UnitTests
Assert.AreEqual(0, mcqL.Updates, "CQ listener 4 should not get any update event ");
}
- cq = gQueryService.GetCq("cq_" + 0);
+ cq = gQueryService.GetCq<object, object>("cq_" + 0);
cqL = cq.GetCqAttributes().getCqListeners();
mcqL = (MyCqListener2<object, object>)cqL[0];
diff --git a/clicache/integration-test/ThinClientStringArrayTestsN.cs b/clicache/integration-test/ThinClientStringArrayTestsN.cs
index 6294bb0..286780d 100644
--- a/clicache/integration-test/ThinClientStringArrayTestsN.cs
+++ b/clicache/integration-test/ThinClientStringArrayTestsN.cs
@@ -151,9 +151,9 @@ namespace Apache.Geode.Client.UnitTests
region["3"] = p3;
region["4"] = p4;
- QueryService<object, object> qs = null;
- qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object, object>();
- Query<object> qry = qs.NewQuery("select * from /" + QERegionName + " p where p.ID!=3");
+ QueryService qs = null;
+ qs = CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
+ Query<object> qry = qs.NewQuery<object>("select * from /" + QERegionName + " p where p.ID!=3");
ISelectResults<object> results = qry.Execute();
Util.Log("Results size {0}.", results.Size);
diff --git a/clicache/src/Cache.cpp b/clicache/src/Cache.cpp
index d7a1111..f6716b8 100644
--- a/clicache/src/Cache.cpp
+++ b/clicache/src/Cache.cpp
@@ -201,14 +201,13 @@ namespace Apache
return rootRegions;
}
- generic<class TKey, class TResult>
- Client::QueryService<TKey, TResult>^ Cache::GetQueryService( )
+ Client::QueryService^ Cache::GetQueryService( )
{
_GF_MG_EXCEPTION_TRY2
try
{
- return Client::QueryService<TKey, TResult>::Create(m_nativeptr->get()->getQueryService());
+ return Client::QueryService::Create(m_nativeptr->get()->getQueryService());
}
finally
{
@@ -218,15 +217,14 @@ namespace Apache
_GF_MG_EXCEPTION_CATCH_ALL2
}
- generic<class TKey, class TResult>
- Client::QueryService<TKey, TResult>^ Cache::GetQueryService(String^ poolName )
+ Client::QueryService^ Cache::GetQueryService(String^ poolName )
{
_GF_MG_EXCEPTION_TRY2
ManagedString mg_poolName( poolName );
try
{
- return QueryService<TKey, TResult>::Create(m_nativeptr->get()->getQueryService(mg_poolName.CharPtr));
+ return QueryService::Create(m_nativeptr->get()->getQueryService(mg_poolName.CharPtr));
}
finally
{
diff --git a/clicache/src/Cache.hpp b/clicache/src/Cache.hpp
index 78b53ed..8c71f91 100644
--- a/clicache/src/Cache.hpp
+++ b/clicache/src/Cache.hpp
@@ -35,7 +35,6 @@ namespace Apache
namespace native = apache::geode::client;
- generic<class TKey, class TResult>
ref class QueryService;
ref class RegionFactory;
@@ -205,8 +204,7 @@ namespace Apache
/// at least some endpoints must have been defined in some regions
/// before actually firing a query.
/// </remarks>
- generic<class TKey, class TResult>
- virtual Client::QueryService<TKey, TResult>^ GetQueryService();
+ virtual Client::QueryService^ GetQueryService();
/// <summary>
/// Get a query service object to be able to query the cache.
@@ -217,8 +215,7 @@ namespace Apache
/// at least some endpoints must have been defined in some regions
/// before actually firing a query.
/// </remarks>
- generic<class TKey, class TResult>
- virtual Client::QueryService<TKey, TResult>^ GetQueryService(String^ poolName);
+ virtual Client::QueryService^ GetQueryService(String^ poolName);
/// <summary>
/// Returns the instance of <see cref="RegionFactory" /> to create the region
diff --git a/clicache/src/IRegionService.hpp b/clicache/src/IRegionService.hpp
index 2a4bb96..7e7b2e8 100644
--- a/clicache/src/IRegionService.hpp
+++ b/clicache/src/IRegionService.hpp
@@ -32,7 +32,6 @@ namespace Apache
generic<class TKey, class TValue>
interface class IRegion;
- generic<class TKey, class TResult>
ref class QueryService;
interface class IPdxInstanceFactory;
@@ -103,8 +102,7 @@ namespace Apache
/// at least some endpoints must have been defined in some regions
/// before actually firing a query.
/// </remarks>
- generic<class TKey, class TResult>
- Client::QueryService<TKey, TResult>^ GetQueryService();
+ Client::QueryService^ GetQueryService();
/// <summary>
/// Returns an array of root regions in the cache. This set is a
/// snapshot and is not backed by the cache.
diff --git a/clicache/src/Pool.cpp b/clicache/src/Pool.cpp
index 7875619..42dfe39 100644
--- a/clicache/src/Pool.cpp
+++ b/clicache/src/Pool.cpp
@@ -422,14 +422,13 @@ namespace Apache
}
- generic<class TKey, class TResult>
- QueryService<TKey, TResult>^ Pool::GetQueryService()
+ QueryService^ Pool::GetQueryService()
{
_GF_MG_EXCEPTION_TRY2/* due to auto replace */
try
{
- return QueryService<TKey, TResult>::Create(m_nativeptr->get()->getQueryService());
+ return QueryService::Create(m_nativeptr->get()->getQueryService());
}
finally
{
diff --git a/clicache/src/Pool.hpp b/clicache/src/Pool.hpp
index f6b08d2..704b568 100644
--- a/clicache/src/Pool.hpp
+++ b/clicache/src/Pool.hpp
@@ -34,7 +34,6 @@ namespace Apache
namespace native = apache::geode::client;
- generic<class TKey, class TResult>
ref class QueryService;
ref class Cache;
@@ -270,8 +269,7 @@ namespace Apache
/// To perform Query operation on the local cache obtain the QueryService
/// instance from the Cache.
/// </remarks>
- generic<class TKey, class TResult>
- QueryService<TKey, TResult>^ GetQueryService();
+ QueryService^ GetQueryService();
void ReleaseThreadLocalConnection();
diff --git a/clicache/src/QueryService.cpp b/clicache/src/QueryService.cpp
index a3ddfbe..de8d025 100644
--- a/clicache/src/QueryService.cpp
+++ b/clicache/src/QueryService.cpp
@@ -15,16 +15,7 @@
* limitations under the License.
*/
-//#include "geode_includes.hpp"
#include "QueryService.hpp"
-#include "Query.hpp"
-#include "Log.hpp"
-#include "CqAttributes.hpp"
-#include "CqQuery.hpp"
-#include "CqServiceStatistics.hpp"
-#include "impl/ManagedString.hpp"
-#include "ExceptionTypes.hpp"
-#include "impl/SafeConvert.hpp"
using namespace System;
@@ -35,9 +26,8 @@ namespace Apache
namespace Client
{
- generic<class TKey, class TResult>
- //generic<class TResult>
- Query<TResult>^ QueryService<TKey, TResult>::NewQuery(String^ query)
+ generic<class TResult>
+ Query<TResult>^ QueryService::NewQuery(String^ query)
{
ManagedString mg_queryStr(query);
try
@@ -56,26 +46,27 @@ namespace Apache
}
generic<class TKey, class TResult>
- CqQuery<TKey, TResult>^ QueryService<TKey, TResult>::NewCq(String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable)
- {
- ManagedString mg_queryStr(query);
- try
+ CqQuery<TKey, TResult>^ QueryService::NewCq(String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable)
{
- return CqQuery<TKey, TResult>::Create(m_nativeptr->get()->newCq(
- mg_queryStr.CharPtr, cqAttr->GetNative(), isDurable));
- }
- catch (const apache::geode::client::Exception& ex)
- {
- throw GeodeException::Get(ex);
- }
- finally
- {
- GC::KeepAlive(m_nativeptr);
+ ManagedString mg_queryStr(query);
+ try
+ {
+ return CqQuery<TKey, TResult>::Create(m_nativeptr->get()->newCq(
+ mg_queryStr.CharPtr, cqAttr->GetNative(), isDurable));
+ }
+ catch (const apache::geode::client::Exception& ex)
+ {
+ throw GeodeException::Get(ex);
+ }
+ finally
+ {
+ GC::KeepAlive(m_nativeptr);
+ }
}
- }
+
generic<class TKey, class TResult>
- CqQuery<TKey, TResult>^ QueryService<TKey, TResult>::NewCq(String^ name, String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable)
+ CqQuery<TKey, TResult>^ QueryService::NewCq(String^ name, String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable)
{
ManagedString mg_queryStr(query);
ManagedString mg_nameStr(name);
@@ -94,8 +85,7 @@ namespace Apache
}
}
- generic<class TKey, class TResult>
- void QueryService<TKey, TResult>::CloseCqs()
+ void QueryService::CloseCqs()
{
try
{
@@ -112,7 +102,7 @@ namespace Apache
}
generic<class TKey, class TResult>
- array<CqQuery<TKey, TResult>^>^ QueryService<TKey, TResult>::GetCqs()
+ array<CqQuery<TKey, TResult>^>^ QueryService::GetCqs()
{
try
{
@@ -137,7 +127,7 @@ namespace Apache
}
generic<class TKey, class TResult>
- CqQuery<TKey, TResult>^ QueryService<TKey, TResult>::GetCq(String^ name)
+ CqQuery<TKey, TResult>^ QueryService::GetCq(String^ name)
{
ManagedString mg_queryStr(name);
try
@@ -155,8 +145,7 @@ namespace Apache
}
}
- generic<class TKey, class TResult>
- void QueryService<TKey, TResult>::ExecuteCqs()
+ void QueryService::ExecuteCqs()
{
try
{
@@ -172,8 +161,7 @@ namespace Apache
}
}
- generic<class TKey, class TResult>
- void QueryService<TKey, TResult>::StopCqs()
+ void QueryService::StopCqs()
{
try
{
@@ -189,8 +177,7 @@ namespace Apache
}
}
- generic<class TKey, class TResult>
- CqServiceStatistics^ QueryService<TKey, TResult>::GetCqStatistics()
+ CqServiceStatistics^ QueryService::GetCqStatistics()
{
try
{
@@ -206,8 +193,7 @@ namespace Apache
}
}
- generic<class TKey, class TResult>
- System::Collections::Generic::List<String^>^ QueryService<TKey, TResult>::GetAllDurableCqsFromServer()
+ System::Collections::Generic::List<String^>^ QueryService::GetAllDurableCqsFromServer()
{
try
{
diff --git a/clicache/src/QueryService.hpp b/clicache/src/QueryService.hpp
index 3bb89f7..2161d78 100644
--- a/clicache/src/QueryService.hpp
+++ b/clicache/src/QueryService.hpp
@@ -22,6 +22,15 @@
#include "begin_native.hpp"
#include <geode/QueryService.hpp>
#include "end_native.hpp"
+#include "Query.hpp"
+#include "Log.hpp"
+#include "CqAttributes.hpp"
+#include "CqQuery.hpp"
+#include "CqServiceStatistics.hpp"
+#include "impl/ManagedString.hpp"
+#include "ExceptionTypes.hpp"
+#include "impl/SafeConvert.hpp"
+
@@ -51,7 +60,6 @@ namespace Apache
/// <summary>
/// Provides a query service.
/// </summary>
- generic<class TKey, class TResult>
public ref class QueryService sealed
{
public:
@@ -59,72 +67,73 @@ namespace Apache
/// <summary>
/// Get a <c>Query</c> object to enable querying.
/// </summary>
- //generic<class TResult>
+ generic<class TResult>
Query<TResult>^ NewQuery( String^ query );
/// @nativeclient
/// <summary>
/// Get a <c>CqQuery</c> object to enable continuous querying.
/// </summary>
/// @endnativeclient
- //generic<class TKey, class TResult>
- CqQuery<TKey, TResult>^ NewCq( String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable );
+ generic<class TKey, class TResult>
+ CqQuery<TKey, TResult>^ NewCq(String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable);
+
/// @nativeclient
/// <summary>
/// Get a <c>CqQuery</c> object to enable continuous querying.
/// </summary>
/// @endnativeclient
- //generic<class TKey, class TResult>
+ generic<class TKey, class TResult>
CqQuery<TKey, TResult>^ NewCq( String^ name, String^ query, CqAttributes<TKey, TResult>^ cqAttr, bool isDurable );
/// @nativeclient
/// <summary>
/// Close all <c>CqQuery</c> on this client.
/// </summary>
/// @endnativeclient
- void CloseCqs();
+ void CloseCqs();
/// @nativeclient
/// <summary>
/// Get all <c>CqQuery</c> on this client.
/// </summary>
/// @endnativeclient
- //generic<class TKey, class TResult>
- array<CqQuery<TKey, TResult>^>^ GetCqs();
+ generic<class TKey, class TResult>
+ array<CqQuery<TKey, TResult>^>^ GetCqs();
/// @nativeclient
/// <summary>
/// Get the <c>CqQuery</c> with the given name on this client.
/// </summary>
/// @endnativeclient
- //generic<class TKey, class TResult>
- CqQuery<TKey, TResult>^ GetCq(String^ name);
+ generic<class TKey, class TResult>
+ CqQuery<TKey, TResult>^ GetCq(String^ name);
/// @nativeclient
/// <summary>
/// Get the <c>CqQuery</c> with the given name on this client.
/// </summary>
/// @endnativeclient
- void ExecuteCqs();
+ void ExecuteCqs();
/// @nativeclient
/// <summary>
/// Stop all <c>CqQuery</c> on this client.
/// </summary>
/// @endnativeclient
- void StopCqs();
+ void StopCqs();
/// @nativeclient
/// <summary>
/// Get <c>CqServiceStatistics</c> on this client.
/// </summary>
/// @endnativeclient
- CqServiceStatistics^ GetCqStatistics();
+ CqServiceStatistics^ GetCqStatistics();
/// @nativeclient
/// <summary>
/// Get all durableCq nanes from server for this client.
/// </summary>
/// @endnativeclient
- System::Collections::Generic::List<String^>^ GetAllDurableCqsFromServer();
+ System::Collections::Generic::List<String^>^ GetAllDurableCqsFromServer();
internal:
@@ -136,10 +145,10 @@ namespace Apache
/// <returns>
/// The managed wrapper object; null if the native pointer is null.
/// </returns>
- inline static QueryService<TKey, TResult>^ Create(std::shared_ptr<native::QueryService> nativeptr )
+ inline static QueryService^ Create(std::shared_ptr<native::QueryService> nativeptr )
{
return __nullptr == nativeptr ? nullptr :
- gcnew QueryService<TKey, TResult>( nativeptr );
+ gcnew QueryService( nativeptr );
}
diff --git a/clicache/src/impl/AuthenticatedCache.cpp b/clicache/src/impl/AuthenticatedCache.cpp
index 14fa38c..73bb083 100644
--- a/clicache/src/impl/AuthenticatedCache.cpp
+++ b/clicache/src/impl/AuthenticatedCache.cpp
@@ -88,14 +88,13 @@ namespace Apache
_GF_MG_EXCEPTION_CATCH_ALL2
}
- generic<class TKey, class TResult>
- Client::QueryService<TKey, TResult>^ AuthenticatedCache::GetQueryService( )
+ Client::QueryService^ AuthenticatedCache::GetQueryService( )
{
_GF_MG_EXCEPTION_TRY2
try
{
- return Client::QueryService<TKey, TResult>::Create(m_nativeptr->get()->getQueryService( ));
+ return Client::QueryService::Create(m_nativeptr->get()->getQueryService( ));
}
finally
{
diff --git a/clicache/src/impl/AuthenticatedCache.hpp b/clicache/src/impl/AuthenticatedCache.hpp
index 375c17f..3be2a73 100644
--- a/clicache/src/impl/AuthenticatedCache.hpp
+++ b/clicache/src/impl/AuthenticatedCache.hpp
@@ -110,8 +110,7 @@ namespace Apache
/// at least some endpoints must have been defined in some regions
/// before actually firing a query.
/// </remarks>
- generic<class TKey, class TResult>
- virtual QueryService<TKey, TResult>^ GetQueryService();
+ virtual QueryService^ GetQueryService();
/// <summary>
/// Returns an array of root regions in the cache. This set is a
diff --git a/tests/cli/NewFwkLib/CacheServer.cs b/tests/cli/NewFwkLib/CacheServer.cs
index ccb1182..335f6e8 100644
--- a/tests/cli/NewFwkLib/CacheServer.cs
+++ b/tests/cli/NewFwkLib/CacheServer.cs
@@ -1050,14 +1050,14 @@ namespace Apache.Geode.Client.FwkLib
DateTime startTime;
DateTime endTime;
TimeSpan elapsedTime;
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
if (AllowQuery(currentQuery.Category, currentQuery.IsLargeResultset,
isLargeSetQuery, isUnsupportedPRQuery))
{
string query = currentQuery.Query;
FwkInfo("CacheServer.RunQuery: ResultSet Query Category [{0}], " +
"String [{1}].", currentQuery.Category, query);
- Query<object> qry = qs.NewQuery(query);
+ Query<object> qry = qs.NewQuery<object>(query);
object[] paramList = null;
if (isparam)
{
@@ -2818,15 +2818,15 @@ namespace Apache.Geode.Client.FwkLib
}
else if (opCode == "query")
{
- QueryService<TKey, object> qs = CheckQueryService();
- Query<object> qry = qs.NewQuery("select distinct * from /Portfolios where FALSE");
+ QueryService qs = CheckQueryService();
+ Query<object> qry = qs.NewQuery<object>("select distinct * from /Portfolios where FALSE");
ISelectResults<object> result = qry.Execute(TimeSpan.FromSeconds(600));
query++;
}
else if (opCode == "cq")
{
string cqName = String.Format("cq-{0}-{1}", Util.ClientId ,cnt++);
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
cqFac.AddCqListener(cqLstner);
@@ -3513,12 +3513,12 @@ public void DoVerifyQueryResult()
FwkInfo("localInvalidate size is {0}", localInvalidate);
while (query != null && query.Length > 0)
{
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
DateTime startTime;
TimeSpan elapsedTime;
ISelectResults<object> results;
string CqName = String.Format("_default{0}", query);
- CqQuery<TKey, object> cq = qs.GetCq(CqName);
+ CqQuery<TKey, object> cq = qs.GetCq<TKey, object>(CqName);
try
{
if (cq.IsRunning())
@@ -4494,7 +4494,7 @@ private void checkUpdatedValue(TKey key, TVal value)
{
string userName = (String)userList[i];
string cqName = String.Format("cq-{0}", userName);
- QueryService<TKey, object> qs = authCache.GetQueryService<TKey, object>();
+ QueryService qs = authCache.GetQueryService();
CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
cqFac.AddCqListener(cqLstner);
@@ -4572,13 +4572,13 @@ private void checkUpdatedValue(TKey key, TVal value)
string uName = (String)userList[0];
IRegion<TKey, TVal> region = proxyRegionMap[uName];
IRegionService authCache = authCacheMap[uName];
- QueryService<TKey, object> qs = authCache.GetQueryService<TKey, object>();
+ QueryService qs = authCache.GetQueryService();
ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
for (Int32 i = 0; i < userList.Count; i++)
{
string userName = (String)userList[i];
string cqName = String.Format("cq-{0}", userName);
- CqQuery<TKey, object> cq = qs.GetCq(cqName);
+ CqQuery<TKey, object> cq = qs.GetCq<TKey, object>(cqName);
CqStatistics cqStats = cq.GetStatistics();
CqAttributes<TKey, object> cqAttr = cq.GetCqAttributes();
ICqListener<TKey, object>[] vl = cqAttr.getCqListeners();
@@ -4689,14 +4689,14 @@ private void checkUpdatedValue(TKey key, TVal value)
else if (opCode == "query")
{
- QueryService<TKey, object> qs = authCache.GetQueryService<TKey, object>();
- Query<object> qry = qs.NewQuery("select distinct * from /Portfolios where FALSE");
+ QueryService qs = authCache.GetQueryService();
+ Query<object> qry = qs.NewQuery<object>("select distinct * from /Portfolios where FALSE");
ISelectResults<object> result = qry.Execute(TimeSpan.FromSeconds(600));
}
else if (opCode == "cq")
{
string cqName = String.Format("cq-{0}",userName);
- QueryService<TKey, object> qs = authCache.GetQueryService<TKey, object>();
+ QueryService qs = authCache.GetQueryService();
CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
cqFac.AddCqListener(cqLstner);
diff --git a/tests/cli/NewFwkLib/FwkTest.cs b/tests/cli/NewFwkLib/FwkTest.cs
index a85fd98..ea91a12 100644
--- a/tests/cli/NewFwkLib/FwkTest.cs
+++ b/tests/cli/NewFwkLib/FwkTest.cs
@@ -1503,11 +1503,11 @@ namespace Apache.Geode.Client.FwkLib
PopTaskName();
}
- public QueryService<TKey, object> CheckQueryService()
+ public QueryService CheckQueryService()
{
string mode = Util.GetEnvironmentVariable("POOLOPT");
Pool/*<TKey, TVal>*/ pool = CacheHelper<TKey, TVal>.DCache.GetPoolManager().Find("_Test_Pool");
- return pool.GetQueryService<TKey, object>();
+ return pool.GetQueryService();
}
#endregion
diff --git a/tests/cli/NewFwkLib/PdxTest/PdxTests.cs b/tests/cli/NewFwkLib/PdxTest/PdxTests.cs
index 72199d7..6796f32 100644
--- a/tests/cli/NewFwkLib/PdxTest/PdxTests.cs
+++ b/tests/cli/NewFwkLib/PdxTest/PdxTests.cs
@@ -1099,14 +1099,14 @@ namespace Apache.Geode.Client.FwkLib
DateTime startTime;
DateTime endTime;
TimeSpan elapsedTime;
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
if (AllowQuery(currentQuery.Category, currentQuery.IsLargeResultset,
isLargeSetQuery, isUnsupportedPRQuery))
{
string query = currentQuery.Query;
FwkInfo("CacheServer.RunQuery: ResultSet Query Category [{0}], " +
"String [{1}].", currentQuery.Category, query);
- Query<object> qry = qs.NewQuery(query);
+ Query<object> qry = qs.NewQuery<object>(query);
object[] paramList = null;
if (isparam)
{
@@ -3539,14 +3539,14 @@ namespace Apache.Geode.Client.FwkLib
}
else if (opCode == "query")
{
- QueryService<TKey, object> qs = CheckQueryService();
- Query<object> qry = qs.NewQuery("select distinct * from /Portfolios where FALSE");
+ QueryService qs = CheckQueryService();
+ Query<object> qry = qs.NewQuery<object>("select distinct * from /Portfolios where FALSE");
ISelectResults<object> result = qry.Execute(TimeSpan.FromSeconds(600));
}
else if (opCode == "cq")
{
string cqName = String.Format("cq-{0}-{1}", Util.ClientId, cnt++);
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
ICqListener<TKey, object> cqLstner = new MyCqListener<TKey, object>();
cqFac.AddCqListener(cqLstner);
diff --git a/tests/cli/NewFwkLib/QueryTest/QueryTests.cs b/tests/cli/NewFwkLib/QueryTest/QueryTests.cs
index 787db67..7deeabe 100644
--- a/tests/cli/NewFwkLib/QueryTest/QueryTests.cs
+++ b/tests/cli/NewFwkLib/QueryTest/QueryTests.cs
@@ -233,7 +233,7 @@ namespace Apache.Geode.Client.FwkLib
}
int numSet = numOfKeys / setSize;
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
ResetKey(CategoryType);
int category;
@@ -310,7 +310,7 @@ namespace Apache.Geode.Client.FwkLib
paramList[ind] = (System.String)QueryStatics.QueryParamSet[index][ind];
}
}
- Query<object> qry = qs.NewQuery(query);
+ Query<object> qry = qs.NewQuery<object>(query);
DateTime startTime;
DateTime endTime;
TimeSpan elapsedTime;
@@ -414,7 +414,7 @@ namespace Apache.Geode.Client.FwkLib
}
int numSet = numOfKeys / setSize;
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
DateTime startTime;
DateTime endTime;
@@ -445,7 +445,7 @@ namespace Apache.Geode.Client.FwkLib
" String [{1}], NumSet [{2}].", category - 1, query, numSet);
try
{
- Query<object> qry = qs.NewQuery(query);
+ Query<object> qry = qs.NewQuery<object>(query);
object[] paramList = new object[QueryStatics.NoOfQueryParamSS[index]];
Int32 numVal = 0;
@@ -512,7 +512,7 @@ namespace Apache.Geode.Client.FwkLib
" String [{1}], NumSet [{2}].", category-1, query, numSet);
try
{
- Query<object> qry = qs.NewQuery(query);
+ Query<object> qry = qs.NewQuery<object>(query);
startTime = DateTime.Now;
ISelectResults<object> results = qry.Execute(QueryResponseTimeout);
endTime = DateTime.Now;
@@ -568,14 +568,14 @@ namespace Apache.Geode.Client.FwkLib
FwkSevere("ReadQueryString: ResultSize is not defined in xml.");
return false;
}
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
DateTime startTime;
TimeSpan elapsedTime;
ISelectResults<object> results;
if (isCq)
{
string CqName = String.Format("_default{0}",query);
- CqQuery<TKey, object> cq = qs.GetCq(CqName);
+ CqQuery<TKey, object> cq = qs.GetCq<TKey, object>(CqName);
startTime = DateTime.Now;
results = cq.ExecuteWithInitialResults(QueryResponseTimeout);
elapsedTime = DateTime.Now - startTime;
@@ -585,7 +585,7 @@ namespace Apache.Geode.Client.FwkLib
else
{
startTime = DateTime.Now;
- Query<object> qry = qs.NewQuery(query);
+ Query<object> qry = qs.NewQuery<object>(query);
results = qry.Execute(QueryResponseTimeout);
elapsedTime = DateTime.Now - startTime;
FwkInfo("ReadQueryString: Time Taken to execute the query [{0}]:" +
@@ -737,7 +737,7 @@ namespace Apache.Geode.Client.FwkLib
string key = "CQLISTENER_" + clientId;
while (qryStr != null)
{
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
ICqListener<TKey, object> cqLstner = new MyCq1Listener<TKey, object>();
cqFac.AddCqListener(cqLstner);
@@ -767,7 +767,7 @@ namespace Apache.Geode.Client.FwkLib
bool isdurable = GetBoolValue("isDurableC");
while (qryStr != null)
{
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
CqAttributesFactory<TKey, object> cqFac = new CqAttributesFactory<TKey, object>();
ICqListener<TKey, object> cqLstner = new MyCq1Listener<TKey, object>();
cqFac.AddCqListener(cqLstner);
@@ -799,7 +799,7 @@ namespace Apache.Geode.Client.FwkLib
FwkInfo("In QueryTest.DoValidateCq()");
try
{
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
ResetKey("isDurableC");
bool isdurable = GetBoolValue("isDurableC");
ResetKey("NoCqs");
@@ -843,9 +843,9 @@ namespace Apache.Geode.Client.FwkLib
FwkInfo("In QueryTest.DoVerifyCQListenerInvoked()");
try
{
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
ICqListener<TKey, object> cqLstner = new MyCq1Listener<TKey, object>();
- CqQuery<TKey, object>[] vcq = qs.GetCqs();
+ CqQuery<TKey, object>[] vcq = qs.GetCqs<TKey, object>();
System.Collections.Generic.List<string> durableCqList = qs.GetAllDurableCqsFromServer();
FwkInfo("Durable Cq count is {0} and all cq count is {1}", durableCqList.Count, vcq.Length);
//Validate Cq by name
@@ -968,8 +968,8 @@ namespace Apache.Geode.Client.FwkLib
FwkInfo("In QueryTest.DoVerifyCQDestroy()");
try
{
- QueryService<TKey, object> qs = CheckQueryService();
- CqQuery<TKey, object>[] vcq = qs.GetCqs();
+ QueryService qs = CheckQueryService();
+ CqQuery<TKey, object>[] vcq = qs.GetCqs<TKey, object>();
if (vcq.Length != 0)
{
FwkException("cqs should have been removed after close");
@@ -988,8 +988,8 @@ namespace Apache.Geode.Client.FwkLib
try
{
opcode = GetStringValue(CqState);
- QueryService<TKey, object> qs = CheckQueryService();
- CqQuery<TKey, object>[] vcq = qs.GetCqs();
+ QueryService qs = CheckQueryService();
+ CqQuery<TKey, object>[] vcq = qs.GetCqs<TKey, object>();
FwkInfo("QueryTest.DoCQState - number of cqs is {0} ", vcq.Length);
for (int i = 0; i < vcq.Length; i++)
{
@@ -1029,13 +1029,13 @@ namespace Apache.Geode.Client.FwkLib
Int32 getCQAttributes = 0, getCQName = 0, getQuery = 0, getQueryString = 0, getStatistics = 0, stopCq = 0, closeCq = 0, executeCq = 0, executeCqWithIR = 0;
FwkInfo("Operation will work for : {0}" ,secondsToRun);
PaceMeter pm = new PaceMeter(opsSec);
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
while (now < end)
{
try
{
opCode=GetStringValue("cqOps");
- CqQuery<TKey, object>[] vcq = qs.GetCqs();
+ CqQuery<TKey, object>[] vcq = qs.GetCqs<TKey, object>();
CqQuery<TKey, object> cqs = (CqQuery<TKey, object>)vcq.GetValue(Util.Rand(vcq.Length));
FwkInfo("Performing {0} on cq named {1}",opCode,cqs.Name);
if (opCode == null || opCode.Length == 0)
@@ -1251,7 +1251,7 @@ namespace Apache.Geode.Client.FwkLib
ICqListener<TKey, object> cqLstner = new MyCq1Listener<TKey, object>();
cqFac.AddCqListener(cqLstner);
CqAttributes<TKey, object> cqAttr = cqFac.Create();
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
qs.NewCq(query, cqAttr,false);
}
catch (Exception ex)
@@ -1352,12 +1352,12 @@ namespace Apache.Geode.Client.FwkLib
}
}
- public ISelectResults<object> RemoteQuery(QueryService<TKey, object> qs, string queryStr)
+ public ISelectResults<object> RemoteQuery(QueryService qs, string queryStr)
{
DateTime startTime;
DateTime endTime;
TimeSpan elapsedTime;
- Query<object> qry = qs.NewQuery(queryStr);
+ Query<object> qry = qs.NewQuery<object>(queryStr);
startTime = DateTime.Now;
ISelectResults<object> results = qry.Execute(QueryResponseTimeout);
endTime = DateTime.Now;
@@ -1367,7 +1367,7 @@ namespace Apache.Geode.Client.FwkLib
return results;
}
- public ISelectResults<object> ContinuousQuery(QueryService<TKey, object> qs, string queryStr, int cqNum)
+ public ISelectResults<object> ContinuousQuery(QueryService qs, string queryStr, int cqNum)
{
DateTime startTime ,endTime;
TimeSpan elapsedTime;
--
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].