[
https://issues.apache.org/jira/browse/GEODE-3977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16257399#comment-16257399
]
ASF GitHub Bot commented on GEODE-3977:
---------------------------------------
mhansonp closed pull request #155: GEODE-3977: QueryService template args
removed
URL: https://github.com/apache/geode-native/pull/155
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/clicache/integration-test/PutGetTestsN.cs
b/clicache/integration-test/PutGetTestsN.cs
index 21478218..fbc592a6 100644
--- a/clicache/integration-test/PutGetTestsN.cs
+++ b/clicache/integration-test/PutGetTestsN.cs
@@ -318,9 +318,9 @@ public void DoRunQuery()
}
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 90aabf71..c541ef87 100644
--- a/clicache/integration-test/ThinClientAppDomainQueryTests.cs
+++ b/clicache/integration-test/ThinClientAppDomainQueryTests.cs
@@ -124,7 +124,7 @@ public void VerifyQueries()
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 @@ public void VerifyQueries()
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 @@ public void VerifyUnsupporteQueries()
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 @@ public void VerifyUnsupporteQueries()
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 ea90850b..0c9de7ad 100644
--- a/clicache/integration-test/ThinClientCqIRTestsN.cs
+++ b/clicache/integration-test/ThinClientCqIRTestsN.cs
@@ -148,8 +148,8 @@ public void StepOneQE(string locators)
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 @@ public void StepOneQE(string locators)
}
}
}
- 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 2dd81187..9a49e4df 100644
--- a/clicache/integration-test/ThinClientCqTestsN.cs
+++ b/clicache/integration-test/ThinClientCqTestsN.cs
@@ -393,9 +393,9 @@ public void StepOneQE(string locators)
region["3"] = p3;
region["4"] = p4;
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ 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 +409,7 @@ public void StepOneQE(string locators)
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 +454,9 @@ public void StepOnePdxQE(string locators)
region["3"] = p3;
region["4"] = p4;
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ 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 +470,7 @@ public void StepOnePdxQE(string locators)
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 +616,9 @@ public void ProcessCQ(string locators)
region["3"] = p3;
region["4"] = p4;
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ 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 +641,7 @@ public void ProcessCQ(string locators)
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 +687,7 @@ public void ProcessCQ(string locators)
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 +722,7 @@ public void ProcessCQ(string locators)
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 +732,8 @@ public void ProcessCQ(string locators)
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 +744,8 @@ public void CreateAndExecuteCQ_StatusListener(string
poolName, string cqName, st
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 +756,9 @@ public void CreateAndExecuteCQ_Listener(string poolName,
string cqName, string c
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 +768,9 @@ public void CheckCQStatusOnConnect(string poolName, string
cqName, int onCqStatu
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 +789,9 @@ public void PutEntries(string regionName)
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 81232ef5..0c8f1a00 100644
--- a/clicache/integration-test/ThinClientDeltaTestN.cs
+++ b/clicache/integration-test/ThinClientDeltaTestN.cs
@@ -636,8 +636,8 @@ void registerClassDeltaTestImpl()
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 604261a2..6d5c8031 100644
--- a/clicache/integration-test/ThinClientDurableCqTestsN.cs
+++ b/clicache/integration-test/ThinClientDurableCqTestsN.cs
@@ -61,7 +61,7 @@ public void RegisterCqsClient1(bool isRecycle)
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 @@ public void RegisterCqsClient1MultipleChunks()
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 @@ public void RegisterCqsClient2(bool isRecycle)
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 @@ public void RegisterCqsClient2(bool isRecycle)
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 @@ public void VerifyDurableCqListClient1MultipleChunks()
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 @@ public void VerifyDurableCqListClient1(bool isRecycle)
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 @@ public void VerifyDurableCqListClient2(bool isRecycle)
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 3bf8a198..d39005e5 100644
--- a/clicache/integration-test/ThinClientDurableTestsN.cs
+++ b/clicache/integration-test/ThinClientDurableTestsN.cs
@@ -806,7 +806,7 @@ void RunDurableClient(int expectedPendingQSize)
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 2a9d9688..67f87298 100644
--- a/clicache/integration-test/ThinClientHARegionTestsN.cs
+++ b/clicache/integration-test/ThinClientHARegionTestsN.cs
@@ -673,12 +673,12 @@ public void StepTwoFailover()
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 9276d509..9181dd68 100755
--- a/clicache/integration-test/ThinClientPdxTests.cs
+++ b/clicache/integration-test/ThinClientPdxTests.cs
@@ -2673,9 +2673,9 @@ void doQueryTest()
//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 0f7ea101..236cac3e 100644
--- a/clicache/integration-test/ThinClientQueryTestsN.cs
+++ b/clicache/integration-test/ThinClientQueryTestsN.cs
@@ -94,8 +94,8 @@ public void StepOneQE(string locators, bool isPdx)
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 @@ public void StepOneQE(string locators, bool isPdx)
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 @@ public void StepOneQE(string locators, bool isPdx)
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,9 @@ public void StepThreeRS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -269,7 +269,7 @@ public void StepThreeRS()
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 +358,9 @@ public void StepThreePQRS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -375,7 +375,7 @@ public void StepThreePQRS()
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 +486,9 @@ public void StepFourRS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -502,7 +502,7 @@ public void StepFourRS()
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 +534,9 @@ public void StepFourPQRS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -550,7 +550,7 @@ public void StepFourPQRS()
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 +603,9 @@ public void StepThreeSS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -630,7 +630,7 @@ public void StepThreeSS()
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 +675,9 @@ public void StepThreePQSS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -702,7 +702,7 @@ public void StepThreePQSS()
}
}
- 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 +769,9 @@ public void StepFourSS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -785,7 +785,7 @@ public void StepFourSS()
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 +817,9 @@ public void StepFourPQSS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -833,7 +833,7 @@ public void StepFourPQSS()
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 +940,13 @@ public void StepTwoFailover()
IAsyncResult killRes = null;
KillServerDelegate ksd = new KillServerDelegate(KillServer);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ 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 +977,13 @@ public void StepTwoPQFailover()
IAsyncResult killRes = null;
KillServerDelegate ksd = new KillServerDelegate(KillServer);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ 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 +1013,10 @@ public void StepTwoPQFailover()
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 +1035,10 @@ public void StepThreeQT()
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 +1056,10 @@ public void StepFourQT()
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 +1078,9 @@ public void StepFiveQT()
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 +1098,10 @@ public void StepSixQT()
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 +1141,10 @@ public void StepThreePQT()
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 065edfac..0230e5ea 100644
--- a/clicache/integration-test/ThinClientRemoteParamQueryResultSetTests.cs
+++ b/clicache/integration-test/ThinClientRemoteParamQueryResultSetTests.cs
@@ -149,9 +149,9 @@ public void StepThreePQRS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -166,7 +166,7 @@ public void StepThreePQRS()
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 +277,9 @@ public void StepFourPQRS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -293,7 +293,7 @@ public void StepFourPQRS()
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 c4fcd73b..7bee6580 100644
--- a/clicache/integration-test/ThinClientRemoteParamQueryStructSetTests.cs
+++ b/clicache/integration-test/ThinClientRemoteParamQueryStructSetTests.cs
@@ -149,9 +149,9 @@ public void StepThreePQSS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -176,7 +176,7 @@ public void StepThreePQSS()
}
}
- 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 +243,9 @@ public void StepFourPQSS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -259,7 +259,7 @@ public void StepFourPQSS()
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 34db74f9..76f98d53 100644
--- a/clicache/integration-test/ThinClientRemoteQueryExclusivenessTests.cs
+++ b/clicache/integration-test/ThinClientRemoteQueryExclusivenessTests.cs
@@ -90,8 +90,8 @@ public void StepOneQE(string locators, bool isPdx)
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 @@ public void StepOneQE(string locators, bool isPdx)
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 @@ public void StepOneQE(string locators, bool isPdx)
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 4781b6bb..fd79c5b2 100644
--- a/clicache/integration-test/ThinClientRemoteQueryFailoverTests.cs
+++ b/clicache/integration-test/ThinClientRemoteQueryFailoverTests.cs
@@ -145,13 +145,13 @@ public void StepTwoFailover()
IAsyncResult killRes = null;
KillServerDelegate ksd = new KillServerDelegate(KillServer);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ 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 98340640..29a50a7a 100644
--- a/clicache/integration-test/ThinClientRemoteQueryResultSetTests.cs
+++ b/clicache/integration-test/ThinClientRemoteQueryResultSetTests.cs
@@ -150,9 +150,9 @@ public void StepThreeRS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -177,7 +177,7 @@ public void StepThreeRS()
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 +266,9 @@ public void StepFourRS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -282,7 +282,7 @@ public void StepFourRS()
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 780e3057..0683a187 100644
--- a/clicache/integration-test/ThinClientRemoteQueryStructSetTests.cs
+++ b/clicache/integration-test/ThinClientRemoteQueryStructSetTests.cs
@@ -151,9 +151,9 @@ public void StepThreeSS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -178,7 +178,7 @@ public void StepThreeSS()
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 +223,9 @@ public void StepFourSS()
QueryHelper<object, object> qh = QueryHelper<object,
object>.GetHelper(CacheHelper.DCache);
- QueryService<object, object> qs = null;
+ QueryService qs = null;
- qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService<object,
object>();
+ qs =
CacheHelper.DCache.GetPoolManager().Find("__TESTPOOL1_").GetQueryService();
int qryIdx = 0;
@@ -239,7 +239,7 @@ public void StepFourSS()
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 a66c41d3..bee0da72 100644
--- a/clicache/integration-test/ThinClientSecurityAuthzTestBaseN.cs
+++ b/clicache/integration-test/ThinClientSecurityAuthzTestBaseN.cs
@@ -311,7 +311,7 @@ private bool CheckFlags(OpFlags flags, OpFlags checkFlag)
}
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 @@ private bool CheckFlags(OpFlags flags, OpFlags checkFlag)
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 3d697bb3..12bf7ea7 100644
--- a/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
+++ b/clicache/integration-test/ThinClientSecurityAuthzTestsMUN.cs
@@ -219,7 +219,7 @@ public override void EndTest()
}
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 @@ public void registerCQ(Properties<string, string>
credentials, bool durableCQ)
}
// 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 @@ public void verifyCQEvents(bool whetherResult,
CqOperationType opType )
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 @@ public void verifyCQEvents(bool whetherResult,
CqOperationType opType )
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 @@ public void verifyCQEvents(bool whetherResult,
CqOperationType opType )
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 6294bb08..286780d7 100644
--- a/clicache/integration-test/ThinClientStringArrayTestsN.cs
+++ b/clicache/integration-test/ThinClientStringArrayTestsN.cs
@@ -151,9 +151,9 @@ public void StepOneQE(string locators)
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 d7a11110..f6716b8b 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 78b53ed8..8c71f91b 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 2a4bb96c..7e7b2e85 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 78756196..42dfe396 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 f6b08d29..704b5689 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 a3ddfbe0..c78093c6 100644
--- a/clicache/src/QueryService.cpp
+++ b/clicache/src/QueryService.cpp
@@ -35,9 +35,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 +55,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 +94,7 @@ namespace Apache
}
}
- generic<class TKey, class TResult>
- void QueryService<TKey, TResult>::CloseCqs()
+ void QueryService::CloseCqs()
{
try
{
@@ -112,7 +111,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 +136,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 +154,7 @@ namespace Apache
}
}
- generic<class TKey, class TResult>
- void QueryService<TKey, TResult>::ExecuteCqs()
+ void QueryService::ExecuteCqs()
{
try
{
@@ -172,8 +170,7 @@ namespace Apache
}
}
- generic<class TKey, class TResult>
- void QueryService<TKey, TResult>::StopCqs()
+ void QueryService::StopCqs()
{
try
{
@@ -189,8 +186,7 @@ namespace Apache
}
}
- generic<class TKey, class TResult>
- CqServiceStatistics^ QueryService<TKey, TResult>::GetCqStatistics()
+ CqServiceStatistics^ QueryService::GetCqStatistics()
{
try
{
@@ -206,8 +202,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 3bb89f7f..0fce0c79 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 14fa38cd..73bb0830 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 375c17fa..3be2a730 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 ccb11825..335f6e80 100644
--- a/tests/cli/NewFwkLib/CacheServer.cs
+++ b/tests/cli/NewFwkLib/CacheServer.cs
@@ -1050,14 +1050,14 @@ private TVal GetUserObject(string objType)
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 @@ public void DoEntryOperationsForSecurity()
}
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 @@ public void DoCqForMU()
{
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 @@ public void DoCqForMU()
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 @@ public void DoEntryOperationsForMU()
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 a85fd98b..ea91a12d 100644
--- a/tests/cli/NewFwkLib/FwkTest.cs
+++ b/tests/cli/NewFwkLib/FwkTest.cs
@@ -1503,11 +1503,11 @@ public virtual void EndTask()
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 72199d74..6796f32d 100644
--- a/tests/cli/NewFwkLib/PdxTest/PdxTests.cs
+++ b/tests/cli/NewFwkLib/PdxTest/PdxTests.cs
@@ -1099,14 +1099,14 @@ private TVal GetUserObject(string objType)
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 @@ public void DoEntryOperationsForSecurity()
}
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 787db672..7deeabe2 100644
--- a/tests/cli/NewFwkLib/QueryTest/QueryTests.cs
+++ b/tests/cli/NewFwkLib/QueryTest/QueryTests.cs
@@ -233,7 +233,7 @@ private bool VerifyResultSet(int distinctKeys)
}
int numSet = numOfKeys / setSize;
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
ResetKey(CategoryType);
int category;
@@ -310,7 +310,7 @@ private bool VerifyResultSet(int distinctKeys)
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 @@ private bool VerifyStructSet(int distinctKeys)
}
int numSet = numOfKeys / setSize;
- QueryService<TKey, object> qs = CheckQueryService();
+ QueryService qs = CheckQueryService();
DateTime startTime;
DateTime endTime;
@@ -445,7 +445,7 @@ private bool VerifyStructSet(int distinctKeys)
" 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 @@ private bool VerifyStructSet(int distinctKeys)
" 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 @@ private bool ReadQueryString(ref String query)
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 @@ private bool ReadQueryString(ref String query)
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 @@ public void DoRegisterCq()
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 @@ public void DoRegisterCqForConc()
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 @@ public void DoValidateCq()
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 @@ public void DoVerifyCQListenerInvoked()
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 @@ public void DoVerifyCqDestroyed()
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 @@ public void DoCQState()
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 @@ public void DoCQOperation()
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 @@ public void ReRegisterCQ(CqQuery<TKey, object> cq)
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 @@ public void DoRegisterAllKeys()
}
}
- 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 @@ public ISelectResults<object>
RemoteQuery(QueryService<TKey, object> qs, string
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;
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> .NET QueryService templating should match usage
> -----------------------------------------------
>
> Key: GEODE-3977
> URL: https://issues.apache.org/jira/browse/GEODE-3977
> Project: Geode
> Issue Type: Bug
> Components: native client
> Reporter: Ernest Burghardt
>
> QueryService uses generics
> generic<class TKey, class TResult>
> //generic<class TResult>
> Query<TResult>^ QueryService<TKey, TResult>::NewQuery(String^ query)
> but only TResult is used and this can be confusing to the user/developer...
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)