You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/09/17 15:27:01 UTC
[1/5] ignite git commit: IGNITE-1499: Correct method naming
conventions on public API.
Repository: ignite
Updated Branches:
refs/heads/ignite-1282 837de6725 -> c5fd4a5b1
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Portable/PortableApiSelfTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Portable/PortableApiSelfTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Portable/PortableApiSelfTest.cs
index 6f00fae..b9a9936 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Portable/PortableApiSelfTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Portable/PortableApiSelfTest.cs
@@ -132,63 +132,63 @@ namespace Apache.Ignite.Core.Tests.Portable
string field2 = "field2";
// 1. Ensure that builder works fine.
- IPortableObject portObj1 = _grid.Portables().Builder(typeName1).SetField(field1, 1).Build();
+ IPortableObject portObj1 = _grid.GetPortables().GetBuilder(typeName1).SetField(field1, 1).Build();
- Assert.AreEqual(typeName1, portObj1.Metadata().TypeName);
- Assert.AreEqual(1, portObj1.Metadata().Fields.Count);
- Assert.AreEqual(field1, portObj1.Metadata().Fields.First());
- Assert.AreEqual(PortableTypeNames.TypeNameInt, portObj1.Metadata().FieldTypeName(field1));
+ Assert.AreEqual(typeName1, portObj1.GetMetadata().TypeName);
+ Assert.AreEqual(1, portObj1.GetMetadata().Fields.Count);
+ Assert.AreEqual(field1, portObj1.GetMetadata().Fields.First());
+ Assert.AreEqual(PortableTypeNames.TypeNameInt, portObj1.GetMetadata().GetFieldTypeName(field1));
- Assert.AreEqual(1, portObj1.Field<int>(field1));
+ Assert.AreEqual(1, portObj1.GetField<int>(field1));
// 2. Ensure that object can be unmarshalled without deserialization.
byte[] data = ((PortableUserObject) portObj1).Data;
portObj1 = _grid.Marshaller.Unmarshal<IPortableObject>(data, PortableMode.ForcePortable);
- Assert.AreEqual(typeName1, portObj1.Metadata().TypeName);
- Assert.AreEqual(1, portObj1.Metadata().Fields.Count);
- Assert.AreEqual(field1, portObj1.Metadata().Fields.First());
- Assert.AreEqual(PortableTypeNames.TypeNameInt, portObj1.Metadata().FieldTypeName(field1));
+ Assert.AreEqual(typeName1, portObj1.GetMetadata().TypeName);
+ Assert.AreEqual(1, portObj1.GetMetadata().Fields.Count);
+ Assert.AreEqual(field1, portObj1.GetMetadata().Fields.First());
+ Assert.AreEqual(PortableTypeNames.TypeNameInt, portObj1.GetMetadata().GetFieldTypeName(field1));
- Assert.AreEqual(1, portObj1.Field<int>(field1));
+ Assert.AreEqual(1, portObj1.GetField<int>(field1));
// 3. Ensure that we can nest one anonymous object inside another
IPortableObject portObj2 =
- _grid.Portables().Builder(typeName2).SetField(field2, portObj1).Build();
+ _grid.GetPortables().GetBuilder(typeName2).SetField(field2, portObj1).Build();
- Assert.AreEqual(typeName2, portObj2.Metadata().TypeName);
- Assert.AreEqual(1, portObj2.Metadata().Fields.Count);
- Assert.AreEqual(field2, portObj2.Metadata().Fields.First());
- Assert.AreEqual(PortableTypeNames.TypeNameObject, portObj2.Metadata().FieldTypeName(field2));
+ Assert.AreEqual(typeName2, portObj2.GetMetadata().TypeName);
+ Assert.AreEqual(1, portObj2.GetMetadata().Fields.Count);
+ Assert.AreEqual(field2, portObj2.GetMetadata().Fields.First());
+ Assert.AreEqual(PortableTypeNames.TypeNameObject, portObj2.GetMetadata().GetFieldTypeName(field2));
- portObj1 = portObj2.Field<IPortableObject>(field2);
+ portObj1 = portObj2.GetField<IPortableObject>(field2);
- Assert.AreEqual(typeName1, portObj1.Metadata().TypeName);
- Assert.AreEqual(1, portObj1.Metadata().Fields.Count);
- Assert.AreEqual(field1, portObj1.Metadata().Fields.First());
- Assert.AreEqual(PortableTypeNames.TypeNameInt, portObj1.Metadata().FieldTypeName(field1));
+ Assert.AreEqual(typeName1, portObj1.GetMetadata().TypeName);
+ Assert.AreEqual(1, portObj1.GetMetadata().Fields.Count);
+ Assert.AreEqual(field1, portObj1.GetMetadata().Fields.First());
+ Assert.AreEqual(PortableTypeNames.TypeNameInt, portObj1.GetMetadata().GetFieldTypeName(field1));
- Assert.AreEqual(1, portObj1.Field<int>(field1));
+ Assert.AreEqual(1, portObj1.GetField<int>(field1));
// 4. Ensure that we can unmarshal object with other nested object.
data = ((PortableUserObject) portObj2).Data;
portObj2 = _grid.Marshaller.Unmarshal<IPortableObject>(data, PortableMode.ForcePortable);
- Assert.AreEqual(typeName2, portObj2.Metadata().TypeName);
- Assert.AreEqual(1, portObj2.Metadata().Fields.Count);
- Assert.AreEqual(field2, portObj2.Metadata().Fields.First());
- Assert.AreEqual(PortableTypeNames.TypeNameObject, portObj2.Metadata().FieldTypeName(field2));
+ Assert.AreEqual(typeName2, portObj2.GetMetadata().TypeName);
+ Assert.AreEqual(1, portObj2.GetMetadata().Fields.Count);
+ Assert.AreEqual(field2, portObj2.GetMetadata().Fields.First());
+ Assert.AreEqual(PortableTypeNames.TypeNameObject, portObj2.GetMetadata().GetFieldTypeName(field2));
- portObj1 = portObj2.Field<IPortableObject>(field2);
+ portObj1 = portObj2.GetField<IPortableObject>(field2);
- Assert.AreEqual(typeName1, portObj1.Metadata().TypeName);
- Assert.AreEqual(1, portObj1.Metadata().Fields.Count);
- Assert.AreEqual(field1, portObj1.Metadata().Fields.First());
- Assert.AreEqual(PortableTypeNames.TypeNameInt, portObj1.Metadata().FieldTypeName(field1));
+ Assert.AreEqual(typeName1, portObj1.GetMetadata().TypeName);
+ Assert.AreEqual(1, portObj1.GetMetadata().Fields.Count);
+ Assert.AreEqual(field1, portObj1.GetMetadata().Fields.First());
+ Assert.AreEqual(PortableTypeNames.TypeNameInt, portObj1.GetMetadata().GetFieldTypeName(field1));
- Assert.AreEqual(1, portObj1.Field<int>(field1));
+ Assert.AreEqual(1, portObj1.GetField<int>(field1));
}
/// <summary>
@@ -200,7 +200,7 @@ namespace Apache.Ignite.Core.Tests.Portable
DateTime date = DateTime.Now.ToUniversalTime();
Guid guid = Guid.NewGuid();
- IPortables api = _grid.Portables();
+ IPortables api = _grid.GetPortables();
// 1. Primitives.
Assert.AreEqual(1, api.ToPortable<byte>((byte)1));
@@ -240,26 +240,26 @@ namespace Apache.Ignite.Core.Tests.Portable
// 4. Objects.
IPortableObject portObj = api.ToPortable<IPortableObject>(new ToPortable(1));
- Assert.AreEqual(typeof(ToPortable).Name, portObj.Metadata().TypeName);
- Assert.AreEqual(1, portObj.Metadata().Fields.Count);
- Assert.AreEqual("Val", portObj.Metadata().Fields.First());
- Assert.AreEqual(PortableTypeNames.TypeNameInt, portObj.Metadata().FieldTypeName("Val"));
+ Assert.AreEqual(typeof(ToPortable).Name, portObj.GetMetadata().TypeName);
+ Assert.AreEqual(1, portObj.GetMetadata().Fields.Count);
+ Assert.AreEqual("Val", portObj.GetMetadata().Fields.First());
+ Assert.AreEqual(PortableTypeNames.TypeNameInt, portObj.GetMetadata().GetFieldTypeName("Val"));
- Assert.AreEqual(1, portObj.Field<int>("val"));
+ Assert.AreEqual(1, portObj.GetField<int>("val"));
Assert.AreEqual(1, portObj.Deserialize<ToPortable>().Val);
portObj = api.ToPortable<IPortableObject>(new ToPortableNoMeta(1));
- Assert.AreEqual(0, portObj.Metadata().Fields.Count);
+ Assert.AreEqual(0, portObj.GetMetadata().Fields.Count);
- Assert.AreEqual(1, portObj.Field<int>("Val"));
+ Assert.AreEqual(1, portObj.GetField<int>("Val"));
Assert.AreEqual(1, portObj.Deserialize<ToPortableNoMeta>().Val);
// 5. Object array.
IPortableObject[] portObjArr = api.ToPortable<IPortableObject[]>(new[] { new ToPortable(1) });
Assert.AreEqual(1, portObjArr.Length);
- Assert.AreEqual(1, portObjArr[0].Field<int>("Val"));
+ Assert.AreEqual(1, portObjArr[0].GetField<int>("Val"));
Assert.AreEqual(1, portObjArr[0].Deserialize<ToPortable>().Val);
}
@@ -270,18 +270,18 @@ namespace Apache.Ignite.Core.Tests.Portable
public void TestRemove()
{
// Create empty object.
- IPortableObject portObj = _grid.Portables().Builder(typeof(Remove)).Build();
+ IPortableObject portObj = _grid.GetPortables().GetBuilder(typeof(Remove)).Build();
- Assert.IsNull(portObj.Field<object>("val"));
+ Assert.IsNull(portObj.GetField<object>("val"));
Assert.IsNull(portObj.Deserialize<Remove>().Val);
- IPortableMetadata meta = portObj.Metadata();
+ IPortableMetadata meta = portObj.GetMetadata();
Assert.AreEqual(typeof(Remove).Name, meta.TypeName);
Assert.AreEqual(0, meta.Fields.Count);
// Populate it with field.
- IPortableBuilder builder = _grid.Portables().Builder(portObj);
+ IPortableBuilder builder = _grid.GetPortables().GetBuilder(portObj);
Assert.IsNull(builder.GetField<object>("val"));
@@ -293,18 +293,18 @@ namespace Apache.Ignite.Core.Tests.Portable
portObj = builder.Build();
- Assert.AreEqual(val, portObj.Field<object>("val"));
+ Assert.AreEqual(val, portObj.GetField<object>("val"));
Assert.AreEqual(val, portObj.Deserialize<Remove>().Val);
- meta = portObj.Metadata();
+ meta = portObj.GetMetadata();
Assert.AreEqual(typeof(Remove).Name, meta.TypeName);
Assert.AreEqual(1, meta.Fields.Count);
Assert.AreEqual("val", meta.Fields.First());
- Assert.AreEqual(PortableTypeNames.TypeNameObject, meta.FieldTypeName("val"));
+ Assert.AreEqual(PortableTypeNames.TypeNameObject, meta.GetFieldTypeName("val"));
// Perform field remove.
- builder = _grid.Portables().Builder(portObj);
+ builder = _grid.GetPortables().GetBuilder(portObj);
Assert.AreEqual(val, builder.GetField<object>("val"));
@@ -319,18 +319,18 @@ namespace Apache.Ignite.Core.Tests.Portable
portObj = builder.Build();
- Assert.IsNull(portObj.Field<object>("val"));
+ Assert.IsNull(portObj.GetField<object>("val"));
Assert.IsNull(portObj.Deserialize<Remove>().Val);
// Test correct removal of field being referenced by handle somewhere else.
RemoveInner inner = new RemoveInner(2);
- portObj = _grid.Portables().Builder(typeof(Remove))
+ portObj = _grid.GetPortables().GetBuilder(typeof(Remove))
.SetField("val", inner)
.SetField("val2", inner)
.Build();
- portObj = _grid.Portables().Builder(portObj).RemoveField("val").Build();
+ portObj = _grid.GetPortables().GetBuilder(portObj).RemoveField("val").Build();
Remove obj = portObj.Deserialize<Remove>();
@@ -345,56 +345,56 @@ namespace Apache.Ignite.Core.Tests.Portable
public void TestBuilderInBuilder()
{
// Test different builders assembly.
- IPortableBuilder builderOuter = _grid.Portables().Builder(typeof(BuilderInBuilderOuter));
- IPortableBuilder builderInner = _grid.Portables().Builder(typeof(BuilderInBuilderInner));
+ IPortableBuilder builderOuter = _grid.GetPortables().GetBuilder(typeof(BuilderInBuilderOuter));
+ IPortableBuilder builderInner = _grid.GetPortables().GetBuilder(typeof(BuilderInBuilderInner));
builderOuter.SetField<object>("inner", builderInner);
builderInner.SetField<object>("outer", builderOuter);
IPortableObject outerPortObj = builderOuter.Build();
- IPortableMetadata meta = outerPortObj.Metadata();
+ IPortableMetadata meta = outerPortObj.GetMetadata();
Assert.AreEqual(typeof(BuilderInBuilderOuter).Name, meta.TypeName);
Assert.AreEqual(1, meta.Fields.Count);
Assert.AreEqual("inner", meta.Fields.First());
- Assert.AreEqual(PortableTypeNames.TypeNameObject, meta.FieldTypeName("inner"));
+ Assert.AreEqual(PortableTypeNames.TypeNameObject, meta.GetFieldTypeName("inner"));
- IPortableObject innerPortObj = outerPortObj.Field<IPortableObject>("inner");
+ IPortableObject innerPortObj = outerPortObj.GetField<IPortableObject>("inner");
- meta = innerPortObj.Metadata();
+ meta = innerPortObj.GetMetadata();
Assert.AreEqual(typeof(BuilderInBuilderInner).Name, meta.TypeName);
Assert.AreEqual(1, meta.Fields.Count);
Assert.AreEqual("outer", meta.Fields.First());
- Assert.AreEqual(PortableTypeNames.TypeNameObject, meta.FieldTypeName("outer"));
+ Assert.AreEqual(PortableTypeNames.TypeNameObject, meta.GetFieldTypeName("outer"));
BuilderInBuilderOuter outer = outerPortObj.Deserialize<BuilderInBuilderOuter>();
Assert.AreSame(outer, outer.Inner.Outer);
// Test same builders assembly.
- innerPortObj = _grid.Portables().Builder(typeof(BuilderInBuilderInner)).Build();
+ innerPortObj = _grid.GetPortables().GetBuilder(typeof(BuilderInBuilderInner)).Build();
- outerPortObj = _grid.Portables().Builder(typeof(BuilderInBuilderOuter))
+ outerPortObj = _grid.GetPortables().GetBuilder(typeof(BuilderInBuilderOuter))
.SetField("inner", innerPortObj)
.SetField("inner2", innerPortObj)
.Build();
- meta = outerPortObj.Metadata();
+ meta = outerPortObj.GetMetadata();
Assert.AreEqual(typeof(BuilderInBuilderOuter).Name, meta.TypeName);
Assert.AreEqual(2, meta.Fields.Count);
Assert.IsTrue(meta.Fields.Contains("inner"));
Assert.IsTrue(meta.Fields.Contains("inner2"));
- Assert.AreEqual(PortableTypeNames.TypeNameObject, meta.FieldTypeName("inner"));
- Assert.AreEqual(PortableTypeNames.TypeNameObject, meta.FieldTypeName("inner2"));
+ Assert.AreEqual(PortableTypeNames.TypeNameObject, meta.GetFieldTypeName("inner"));
+ Assert.AreEqual(PortableTypeNames.TypeNameObject, meta.GetFieldTypeName("inner2"));
outer = outerPortObj.Deserialize<BuilderInBuilderOuter>();
Assert.AreSame(outer.Inner, outer.Inner2);
- builderOuter = _grid.Portables().Builder(outerPortObj);
+ builderOuter = _grid.GetPortables().GetBuilder(outerPortObj);
IPortableBuilder builderInner2 = builderOuter.GetField<IPortableBuilder>("inner2");
builderInner2.SetField("outer", builderOuter);
@@ -413,22 +413,22 @@ namespace Apache.Ignite.Core.Tests.Portable
[Test]
public void TestDecimals()
{
- IPortableObject portObj = _grid.Portables().Builder(typeof(DecimalHolder))
+ IPortableObject portObj = _grid.GetPortables().GetBuilder(typeof(DecimalHolder))
.SetField("val", decimal.One)
.SetField("valArr", new[] { decimal.MinusOne })
.Build();
- IPortableMetadata meta = portObj.Metadata();
+ IPortableMetadata meta = portObj.GetMetadata();
Assert.AreEqual(typeof(DecimalHolder).Name, meta.TypeName);
Assert.AreEqual(2, meta.Fields.Count);
Assert.IsTrue(meta.Fields.Contains("val"));
Assert.IsTrue(meta.Fields.Contains("valArr"));
- Assert.AreEqual(PortableTypeNames.TypeNameDecimal, meta.FieldTypeName("val"));
- Assert.AreEqual(PortableTypeNames.TypeNameArrayDecimal, meta.FieldTypeName("valArr"));
+ Assert.AreEqual(PortableTypeNames.TypeNameDecimal, meta.GetFieldTypeName("val"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayDecimal, meta.GetFieldTypeName("valArr"));
- Assert.AreEqual(decimal.One, portObj.Field<decimal>("val"));
- Assert.AreEqual(new[] { decimal.MinusOne }, portObj.Field<decimal[]>("valArr"));
+ Assert.AreEqual(decimal.One, portObj.GetField<decimal>("val"));
+ Assert.AreEqual(new[] { decimal.MinusOne }, portObj.GetField<decimal[]>("valArr"));
DecimalHolder obj = portObj.Deserialize<DecimalHolder>();
@@ -443,33 +443,33 @@ namespace Apache.Ignite.Core.Tests.Portable
public void TestBuilderCollection()
{
// Test collection with single element.
- IPortableBuilder builderCol = _grid.Portables().Builder(typeof(BuilderCollection));
+ IPortableBuilder builderCol = _grid.GetPortables().GetBuilder(typeof(BuilderCollection));
IPortableBuilder builderItem =
- _grid.Portables().Builder(typeof(BuilderCollectionItem)).SetField("val", 1);
+ _grid.GetPortables().GetBuilder(typeof(BuilderCollectionItem)).SetField("val", 1);
builderCol.SetField<ICollection>("col", new List<IPortableBuilder> { builderItem });
IPortableObject portCol = builderCol.Build();
- IPortableMetadata meta = portCol.Metadata();
+ IPortableMetadata meta = portCol.GetMetadata();
Assert.AreEqual(typeof(BuilderCollection).Name, meta.TypeName);
Assert.AreEqual(1, meta.Fields.Count);
Assert.AreEqual("col", meta.Fields.First());
- Assert.AreEqual(PortableTypeNames.TypeNameCollection, meta.FieldTypeName("col"));
+ Assert.AreEqual(PortableTypeNames.TypeNameCollection, meta.GetFieldTypeName("col"));
- ICollection<IPortableObject> portColItems = portCol.Field<ICollection<IPortableObject>>("col");
+ ICollection<IPortableObject> portColItems = portCol.GetField<ICollection<IPortableObject>>("col");
Assert.AreEqual(1, portColItems.Count);
IPortableObject portItem = portColItems.First();
- meta = portItem.Metadata();
+ meta = portItem.GetMetadata();
Assert.AreEqual(typeof(BuilderCollectionItem).Name, meta.TypeName);
Assert.AreEqual(1, meta.Fields.Count);
Assert.AreEqual("val", meta.Fields.First());
- Assert.AreEqual(PortableTypeNames.TypeNameInt, meta.FieldTypeName("val"));
+ Assert.AreEqual(PortableTypeNames.TypeNameInt, meta.GetFieldTypeName("val"));
BuilderCollection col = portCol.Deserialize<BuilderCollection>();
@@ -478,7 +478,7 @@ namespace Apache.Ignite.Core.Tests.Portable
Assert.AreEqual(1, col.Col.First().Val);
// Add more portable objects to collection.
- builderCol = _grid.Portables().Builder(portCol);
+ builderCol = _grid.GetPortables().GetBuilder(portCol);
IList builderColItems = builderCol.GetField<IList>("col");
@@ -515,7 +515,7 @@ namespace Apache.Ignite.Core.Tests.Portable
Assert.AreNotSame(item2, item3);
// Test handle update inside collection.
- builderCol = _grid.Portables().Builder(portCol);
+ builderCol = _grid.GetPortables().GetBuilder(portCol);
builderColItems = builderCol.GetField<IList>("col");
@@ -538,12 +538,12 @@ namespace Apache.Ignite.Core.Tests.Portable
[Test]
public void TestEmptyDefined()
{
- IPortableObject portObj = _grid.Portables().Builder(typeof(Empty)).Build();
+ IPortableObject portObj = _grid.GetPortables().GetBuilder(typeof(Empty)).Build();
Assert.IsNotNull(portObj);
Assert.AreEqual(0, portObj.GetHashCode());
- IPortableMetadata meta = portObj.Metadata();
+ IPortableMetadata meta = portObj.GetMetadata();
Assert.IsNotNull(meta);
Assert.AreEqual(typeof(Empty).Name, meta.TypeName);
@@ -560,7 +560,7 @@ namespace Apache.Ignite.Core.Tests.Portable
[Test]
public void TestEmptyNoMeta()
{
- IPortableObject portObj = _grid.Portables().Builder(typeof(EmptyNoMeta)).Build();
+ IPortableObject portObj = _grid.GetPortables().GetBuilder(typeof(EmptyNoMeta)).Build();
Assert.IsNotNull(portObj);
Assert.AreEqual(0, portObj.GetHashCode());
@@ -576,12 +576,12 @@ namespace Apache.Ignite.Core.Tests.Portable
[Test]
public void TestEmptyUndefined()
{
- IPortableObject portObj = _grid.Portables().Builder(TypeEmpty).Build();
+ IPortableObject portObj = _grid.GetPortables().GetBuilder(TypeEmpty).Build();
Assert.IsNotNull(portObj);
Assert.AreEqual(0, portObj.GetHashCode());
- IPortableMetadata meta = portObj.Metadata();
+ IPortableMetadata meta = portObj.GetMetadata();
Assert.IsNotNull(meta);
Assert.AreEqual(TypeEmpty, meta.TypeName);
@@ -594,9 +594,9 @@ namespace Apache.Ignite.Core.Tests.Portable
[Test]
public void TestEmptyRebuild()
{
- var portObj = (PortableUserObject) _grid.Portables().Builder(typeof(EmptyNoMeta)).Build();
+ var portObj = (PortableUserObject) _grid.GetPortables().GetBuilder(typeof(EmptyNoMeta)).Build();
- PortableUserObject newPortObj = (PortableUserObject) _grid.Portables().Builder(portObj).Build();
+ PortableUserObject newPortObj = (PortableUserObject) _grid.GetPortables().GetBuilder(portObj).Build();
Assert.AreEqual(portObj.Data, newPortObj.Data);
}
@@ -607,7 +607,7 @@ namespace Apache.Ignite.Core.Tests.Portable
[Test]
public void TestHashCodeChange()
{
- IPortableObject portObj = _grid.Portables().Builder(typeof(EmptyNoMeta)).HashCode(100).Build();
+ IPortableObject portObj = _grid.GetPortables().GetBuilder(typeof(EmptyNoMeta)).SetHashCode(100).Build();
Assert.AreEqual(100, portObj.GetHashCode());
}
@@ -618,7 +618,7 @@ namespace Apache.Ignite.Core.Tests.Portable
[Test]
public void TestPrimitiveFields()
{
- IPortableObject portObj = _grid.Portables().Builder(typeof(Primitives))
+ IPortableObject portObj = _grid.GetPortables().GetBuilder(typeof(Primitives))
.SetField<byte>("fByte", 1)
.SetField("fBool", true)
.SetField<short>("fShort", 2)
@@ -627,34 +627,34 @@ namespace Apache.Ignite.Core.Tests.Portable
.SetField<long>("fLong", 4)
.SetField<float>("fFloat", 5)
.SetField<double>("fDouble", 6)
- .HashCode(100)
+ .SetHashCode(100)
.Build();
Assert.AreEqual(100, portObj.GetHashCode());
- IPortableMetadata meta = portObj.Metadata();
+ IPortableMetadata meta = portObj.GetMetadata();
Assert.AreEqual(typeof(Primitives).Name, meta.TypeName);
Assert.AreEqual(8, meta.Fields.Count);
- Assert.AreEqual(PortableTypeNames.TypeNameByte, meta.FieldTypeName("fByte"));
- Assert.AreEqual(PortableTypeNames.TypeNameBool, meta.FieldTypeName("fBool"));
- Assert.AreEqual(PortableTypeNames.TypeNameShort, meta.FieldTypeName("fShort"));
- Assert.AreEqual(PortableTypeNames.TypeNameChar, meta.FieldTypeName("fChar"));
- Assert.AreEqual(PortableTypeNames.TypeNameInt, meta.FieldTypeName("fInt"));
- Assert.AreEqual(PortableTypeNames.TypeNameLong, meta.FieldTypeName("fLong"));
- Assert.AreEqual(PortableTypeNames.TypeNameFloat, meta.FieldTypeName("fFloat"));
- Assert.AreEqual(PortableTypeNames.TypeNameDouble, meta.FieldTypeName("fDouble"));
-
- Assert.AreEqual(1, portObj.Field<byte>("fByte"));
- Assert.AreEqual(true, portObj.Field<bool>("fBool"));
- Assert.AreEqual(2, portObj.Field<short>("fShort"));
- Assert.AreEqual('a', portObj.Field<char>("fChar"));
- Assert.AreEqual(3, portObj.Field<int>("fInt"));
- Assert.AreEqual(4, portObj.Field<long>("fLong"));
- Assert.AreEqual(5, portObj.Field<float>("fFloat"));
- Assert.AreEqual(6, portObj.Field<double>("fDouble"));
+ Assert.AreEqual(PortableTypeNames.TypeNameByte, meta.GetFieldTypeName("fByte"));
+ Assert.AreEqual(PortableTypeNames.TypeNameBool, meta.GetFieldTypeName("fBool"));
+ Assert.AreEqual(PortableTypeNames.TypeNameShort, meta.GetFieldTypeName("fShort"));
+ Assert.AreEqual(PortableTypeNames.TypeNameChar, meta.GetFieldTypeName("fChar"));
+ Assert.AreEqual(PortableTypeNames.TypeNameInt, meta.GetFieldTypeName("fInt"));
+ Assert.AreEqual(PortableTypeNames.TypeNameLong, meta.GetFieldTypeName("fLong"));
+ Assert.AreEqual(PortableTypeNames.TypeNameFloat, meta.GetFieldTypeName("fFloat"));
+ Assert.AreEqual(PortableTypeNames.TypeNameDouble, meta.GetFieldTypeName("fDouble"));
+
+ Assert.AreEqual(1, portObj.GetField<byte>("fByte"));
+ Assert.AreEqual(true, portObj.GetField<bool>("fBool"));
+ Assert.AreEqual(2, portObj.GetField<short>("fShort"));
+ Assert.AreEqual('a', portObj.GetField<char>("fChar"));
+ Assert.AreEqual(3, portObj.GetField<int>("fInt"));
+ Assert.AreEqual(4, portObj.GetField<long>("fLong"));
+ Assert.AreEqual(5, portObj.GetField<float>("fFloat"));
+ Assert.AreEqual(6, portObj.GetField<double>("fDouble"));
Primitives obj = portObj.Deserialize<Primitives>();
@@ -668,7 +668,7 @@ namespace Apache.Ignite.Core.Tests.Portable
Assert.AreEqual(6, obj.FDouble);
// Overwrite.
- portObj = _grid.Portables().Builder(portObj)
+ portObj = _grid.GetPortables().GetBuilder(portObj)
.SetField<byte>("fByte", 7)
.SetField("fBool", false)
.SetField<short>("fShort", 8)
@@ -677,19 +677,19 @@ namespace Apache.Ignite.Core.Tests.Portable
.SetField<long>("fLong", 10)
.SetField<float>("fFloat", 11)
.SetField<double>("fDouble", 12)
- .HashCode(200)
+ .SetHashCode(200)
.Build();
Assert.AreEqual(200, portObj.GetHashCode());
- Assert.AreEqual(7, portObj.Field<byte>("fByte"));
- Assert.AreEqual(false, portObj.Field<bool>("fBool"));
- Assert.AreEqual(8, portObj.Field<short>("fShort"));
- Assert.AreEqual('b', portObj.Field<char>("fChar"));
- Assert.AreEqual(9, portObj.Field<int>("fInt"));
- Assert.AreEqual(10, portObj.Field<long>("fLong"));
- Assert.AreEqual(11, portObj.Field<float>("fFloat"));
- Assert.AreEqual(12, portObj.Field<double>("fDouble"));
+ Assert.AreEqual(7, portObj.GetField<byte>("fByte"));
+ Assert.AreEqual(false, portObj.GetField<bool>("fBool"));
+ Assert.AreEqual(8, portObj.GetField<short>("fShort"));
+ Assert.AreEqual('b', portObj.GetField<char>("fChar"));
+ Assert.AreEqual(9, portObj.GetField<int>("fInt"));
+ Assert.AreEqual(10, portObj.GetField<long>("fLong"));
+ Assert.AreEqual(11, portObj.GetField<float>("fFloat"));
+ Assert.AreEqual(12, portObj.GetField<double>("fDouble"));
obj = portObj.Deserialize<Primitives>();
@@ -709,7 +709,7 @@ namespace Apache.Ignite.Core.Tests.Portable
[Test]
public void TestPrimitiveArrayFields()
{
- IPortableObject portObj = _grid.Portables().Builder(typeof(PrimitiveArrays))
+ IPortableObject portObj = _grid.GetPortables().GetBuilder(typeof(PrimitiveArrays))
.SetField("fByte", new byte[] { 1 })
.SetField("fBool", new[] { true })
.SetField("fShort", new short[] { 2 })
@@ -718,34 +718,34 @@ namespace Apache.Ignite.Core.Tests.Portable
.SetField("fLong", new long[] { 4 })
.SetField("fFloat", new float[] { 5 })
.SetField("fDouble", new double[] { 6 })
- .HashCode(100)
+ .SetHashCode(100)
.Build();
Assert.AreEqual(100, portObj.GetHashCode());
- IPortableMetadata meta = portObj.Metadata();
+ IPortableMetadata meta = portObj.GetMetadata();
Assert.AreEqual(typeof(PrimitiveArrays).Name, meta.TypeName);
Assert.AreEqual(8, meta.Fields.Count);
- Assert.AreEqual(PortableTypeNames.TypeNameArrayByte, meta.FieldTypeName("fByte"));
- Assert.AreEqual(PortableTypeNames.TypeNameArrayBool, meta.FieldTypeName("fBool"));
- Assert.AreEqual(PortableTypeNames.TypeNameArrayShort, meta.FieldTypeName("fShort"));
- Assert.AreEqual(PortableTypeNames.TypeNameArrayChar, meta.FieldTypeName("fChar"));
- Assert.AreEqual(PortableTypeNames.TypeNameArrayInt, meta.FieldTypeName("fInt"));
- Assert.AreEqual(PortableTypeNames.TypeNameArrayLong, meta.FieldTypeName("fLong"));
- Assert.AreEqual(PortableTypeNames.TypeNameArrayFloat, meta.FieldTypeName("fFloat"));
- Assert.AreEqual(PortableTypeNames.TypeNameArrayDouble, meta.FieldTypeName("fDouble"));
-
- Assert.AreEqual(new byte[] { 1 }, portObj.Field<byte[]>("fByte"));
- Assert.AreEqual(new[] { true }, portObj.Field<bool[]>("fBool"));
- Assert.AreEqual(new short[] { 2 }, portObj.Field<short[]>("fShort"));
- Assert.AreEqual(new[] { 'a' }, portObj.Field<char[]>("fChar"));
- Assert.AreEqual(new[] { 3 }, portObj.Field<int[]>("fInt"));
- Assert.AreEqual(new long[] { 4 }, portObj.Field<long[]>("fLong"));
- Assert.AreEqual(new float[] { 5 }, portObj.Field<float[]>("fFloat"));
- Assert.AreEqual(new double[] { 6 }, portObj.Field<double[]>("fDouble"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayByte, meta.GetFieldTypeName("fByte"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayBool, meta.GetFieldTypeName("fBool"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayShort, meta.GetFieldTypeName("fShort"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayChar, meta.GetFieldTypeName("fChar"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayInt, meta.GetFieldTypeName("fInt"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayLong, meta.GetFieldTypeName("fLong"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayFloat, meta.GetFieldTypeName("fFloat"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayDouble, meta.GetFieldTypeName("fDouble"));
+
+ Assert.AreEqual(new byte[] { 1 }, portObj.GetField<byte[]>("fByte"));
+ Assert.AreEqual(new[] { true }, portObj.GetField<bool[]>("fBool"));
+ Assert.AreEqual(new short[] { 2 }, portObj.GetField<short[]>("fShort"));
+ Assert.AreEqual(new[] { 'a' }, portObj.GetField<char[]>("fChar"));
+ Assert.AreEqual(new[] { 3 }, portObj.GetField<int[]>("fInt"));
+ Assert.AreEqual(new long[] { 4 }, portObj.GetField<long[]>("fLong"));
+ Assert.AreEqual(new float[] { 5 }, portObj.GetField<float[]>("fFloat"));
+ Assert.AreEqual(new double[] { 6 }, portObj.GetField<double[]>("fDouble"));
PrimitiveArrays obj = portObj.Deserialize<PrimitiveArrays>();
@@ -759,7 +759,7 @@ namespace Apache.Ignite.Core.Tests.Portable
Assert.AreEqual(new double[] { 6 }, obj.FDouble);
// Overwrite.
- portObj = _grid.Portables().Builder(portObj)
+ portObj = _grid.GetPortables().GetBuilder(portObj)
.SetField("fByte", new byte[] { 7 })
.SetField("fBool", new[] { false })
.SetField("fShort", new short[] { 8 })
@@ -768,19 +768,19 @@ namespace Apache.Ignite.Core.Tests.Portable
.SetField("fLong", new long[] { 10 })
.SetField("fFloat", new float[] { 11 })
.SetField("fDouble", new double[] { 12 })
- .HashCode(200)
+ .SetHashCode(200)
.Build();
Assert.AreEqual(200, portObj.GetHashCode());
- Assert.AreEqual(new byte[] { 7 }, portObj.Field<byte[]>("fByte"));
- Assert.AreEqual(new[] { false }, portObj.Field<bool[]>("fBool"));
- Assert.AreEqual(new short[] { 8 }, portObj.Field<short[]>("fShort"));
- Assert.AreEqual(new[] { 'b' }, portObj.Field<char[]>("fChar"));
- Assert.AreEqual(new[] { 9 }, portObj.Field<int[]>("fInt"));
- Assert.AreEqual(new long[] { 10 }, portObj.Field<long[]>("fLong"));
- Assert.AreEqual(new float[] { 11 }, portObj.Field<float[]>("fFloat"));
- Assert.AreEqual(new double[] { 12 }, portObj.Field<double[]>("fDouble"));
+ Assert.AreEqual(new byte[] { 7 }, portObj.GetField<byte[]>("fByte"));
+ Assert.AreEqual(new[] { false }, portObj.GetField<bool[]>("fBool"));
+ Assert.AreEqual(new short[] { 8 }, portObj.GetField<short[]>("fShort"));
+ Assert.AreEqual(new[] { 'b' }, portObj.GetField<char[]>("fChar"));
+ Assert.AreEqual(new[] { 9 }, portObj.GetField<int[]>("fInt"));
+ Assert.AreEqual(new long[] { 10 }, portObj.GetField<long[]>("fLong"));
+ Assert.AreEqual(new float[] { 11 }, portObj.GetField<float[]>("fFloat"));
+ Assert.AreEqual(new double[] { 12 }, portObj.GetField<double[]>("fDouble"));
obj = portObj.Deserialize<PrimitiveArrays>();
@@ -806,7 +806,7 @@ namespace Apache.Ignite.Core.Tests.Portable
Guid guid = Guid.NewGuid();
Guid? nGuid = Guid.NewGuid();
- IPortableObject portObj = _grid.Portables().Builder(typeof(StringDateGuidEnum))
+ IPortableObject portObj = _grid.GetPortables().GetBuilder(typeof(StringDateGuidEnum))
.SetField("fStr", "str")
.SetField("fDate", date)
.SetField("fNDate", nDate)
@@ -817,38 +817,38 @@ namespace Apache.Ignite.Core.Tests.Portable
.SetField("fDateArr", new[] { nDate })
.SetField("fGuidArr", new[] { nGuid })
.SetField("fEnumArr", new[] { TestEnum.One })
- .HashCode(100)
+ .SetHashCode(100)
.Build();
Assert.AreEqual(100, portObj.GetHashCode());
- IPortableMetadata meta = portObj.Metadata();
+ IPortableMetadata meta = portObj.GetMetadata();
Assert.AreEqual(typeof(StringDateGuidEnum).Name, meta.TypeName);
Assert.AreEqual(10, meta.Fields.Count);
- Assert.AreEqual(PortableTypeNames.TypeNameString, meta.FieldTypeName("fStr"));
- Assert.AreEqual(PortableTypeNames.TypeNameDate, meta.FieldTypeName("fDate"));
- Assert.AreEqual(PortableTypeNames.TypeNameDate, meta.FieldTypeName("fNDate"));
- Assert.AreEqual(PortableTypeNames.TypeNameGuid, meta.FieldTypeName("fGuid"));
- Assert.AreEqual(PortableTypeNames.TypeNameGuid, meta.FieldTypeName("fNGuid"));
- Assert.AreEqual(PortableTypeNames.TypeNameEnum, meta.FieldTypeName("fEnum"));
- Assert.AreEqual(PortableTypeNames.TypeNameArrayString, meta.FieldTypeName("fStrArr"));
- Assert.AreEqual(PortableTypeNames.TypeNameArrayDate, meta.FieldTypeName("fDateArr"));
- Assert.AreEqual(PortableTypeNames.TypeNameArrayGuid, meta.FieldTypeName("fGuidArr"));
- Assert.AreEqual(PortableTypeNames.TypeNameArrayEnum, meta.FieldTypeName("fEnumArr"));
-
- Assert.AreEqual("str", portObj.Field<string>("fStr"));
- Assert.AreEqual(date, portObj.Field<DateTime>("fDate"));
- Assert.AreEqual(nDate, portObj.Field<DateTime?>("fNDate"));
- Assert.AreEqual(guid, portObj.Field<Guid>("fGuid"));
- Assert.AreEqual(nGuid, portObj.Field<Guid?>("fNGuid"));
- Assert.AreEqual(TestEnum.One, portObj.Field<TestEnum>("fEnum"));
- Assert.AreEqual(new[] { "str" }, portObj.Field<string[]>("fStrArr"));
- Assert.AreEqual(new[] { nDate }, portObj.Field<DateTime?[]>("fDateArr"));
- Assert.AreEqual(new[] { nGuid }, portObj.Field<Guid?[]>("fGuidArr"));
- Assert.AreEqual(new[] { TestEnum.One }, portObj.Field<TestEnum[]>("fEnumArr"));
+ Assert.AreEqual(PortableTypeNames.TypeNameString, meta.GetFieldTypeName("fStr"));
+ Assert.AreEqual(PortableTypeNames.TypeNameDate, meta.GetFieldTypeName("fDate"));
+ Assert.AreEqual(PortableTypeNames.TypeNameDate, meta.GetFieldTypeName("fNDate"));
+ Assert.AreEqual(PortableTypeNames.TypeNameGuid, meta.GetFieldTypeName("fGuid"));
+ Assert.AreEqual(PortableTypeNames.TypeNameGuid, meta.GetFieldTypeName("fNGuid"));
+ Assert.AreEqual(PortableTypeNames.TypeNameEnum, meta.GetFieldTypeName("fEnum"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayString, meta.GetFieldTypeName("fStrArr"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayDate, meta.GetFieldTypeName("fDateArr"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayGuid, meta.GetFieldTypeName("fGuidArr"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayEnum, meta.GetFieldTypeName("fEnumArr"));
+
+ Assert.AreEqual("str", portObj.GetField<string>("fStr"));
+ Assert.AreEqual(date, portObj.GetField<DateTime>("fDate"));
+ Assert.AreEqual(nDate, portObj.GetField<DateTime?>("fNDate"));
+ Assert.AreEqual(guid, portObj.GetField<Guid>("fGuid"));
+ Assert.AreEqual(nGuid, portObj.GetField<Guid?>("fNGuid"));
+ Assert.AreEqual(TestEnum.One, portObj.GetField<TestEnum>("fEnum"));
+ Assert.AreEqual(new[] { "str" }, portObj.GetField<string[]>("fStrArr"));
+ Assert.AreEqual(new[] { nDate }, portObj.GetField<DateTime?[]>("fDateArr"));
+ Assert.AreEqual(new[] { nGuid }, portObj.GetField<Guid?[]>("fGuidArr"));
+ Assert.AreEqual(new[] { TestEnum.One }, portObj.GetField<TestEnum[]>("fEnumArr"));
StringDateGuidEnum obj = portObj.Deserialize<StringDateGuidEnum>();
@@ -870,7 +870,7 @@ namespace Apache.Ignite.Core.Tests.Portable
guid = Guid.NewGuid();
nGuid = Guid.NewGuid();
- portObj = _grid.Portables().Builder(typeof(StringDateGuidEnum))
+ portObj = _grid.GetPortables().GetBuilder(typeof(StringDateGuidEnum))
.SetField("fStr", "str2")
.SetField("fDate", date)
.SetField("fNDate", nDate)
@@ -881,21 +881,21 @@ namespace Apache.Ignite.Core.Tests.Portable
.SetField("fDateArr", new[] { nDate })
.SetField("fGuidArr", new[] { nGuid })
.SetField("fEnumArr", new[] { TestEnum.Two })
- .HashCode(200)
+ .SetHashCode(200)
.Build();
Assert.AreEqual(200, portObj.GetHashCode());
- Assert.AreEqual("str2", portObj.Field<string>("fStr"));
- Assert.AreEqual(date, portObj.Field<DateTime>("fDate"));
- Assert.AreEqual(nDate, portObj.Field<DateTime?>("fNDate"));
- Assert.AreEqual(guid, portObj.Field<Guid>("fGuid"));
- Assert.AreEqual(nGuid, portObj.Field<Guid?>("fNGuid"));
- Assert.AreEqual(TestEnum.Two, portObj.Field<TestEnum>("fEnum"));
- Assert.AreEqual(new[] { "str2" }, portObj.Field<string[]>("fStrArr"));
- Assert.AreEqual(new[] { nDate }, portObj.Field<DateTime?[]>("fDateArr"));
- Assert.AreEqual(new[] { nGuid }, portObj.Field<Guid?[]>("fGuidArr"));
- Assert.AreEqual(new[] { TestEnum.Two }, portObj.Field<TestEnum[]>("fEnumArr"));
+ Assert.AreEqual("str2", portObj.GetField<string>("fStr"));
+ Assert.AreEqual(date, portObj.GetField<DateTime>("fDate"));
+ Assert.AreEqual(nDate, portObj.GetField<DateTime?>("fNDate"));
+ Assert.AreEqual(guid, portObj.GetField<Guid>("fGuid"));
+ Assert.AreEqual(nGuid, portObj.GetField<Guid?>("fNGuid"));
+ Assert.AreEqual(TestEnum.Two, portObj.GetField<TestEnum>("fEnum"));
+ Assert.AreEqual(new[] { "str2" }, portObj.GetField<string[]>("fStrArr"));
+ Assert.AreEqual(new[] { nDate }, portObj.GetField<DateTime?[]>("fDateArr"));
+ Assert.AreEqual(new[] { nGuid }, portObj.GetField<Guid?[]>("fGuidArr"));
+ Assert.AreEqual(new[] { TestEnum.Two }, portObj.GetField<TestEnum[]>("fEnumArr"));
obj = portObj.Deserialize<StringDateGuidEnum>();
@@ -920,21 +920,21 @@ namespace Apache.Ignite.Core.Tests.Portable
// 1. Test simple array.
CompositeInner[] inArr = { new CompositeInner(1) };
- IPortableObject portObj = _grid.Portables().Builder(typeof(CompositeArray)).HashCode(100)
+ IPortableObject portObj = _grid.GetPortables().GetBuilder(typeof(CompositeArray)).SetHashCode(100)
.SetField("inArr", inArr).Build();
- IPortableMetadata meta = portObj.Metadata();
+ IPortableMetadata meta = portObj.GetMetadata();
Assert.AreEqual(typeof(CompositeArray).Name, meta.TypeName);
Assert.AreEqual(1, meta.Fields.Count);
- Assert.AreEqual(PortableTypeNames.TypeNameArrayObject, meta.FieldTypeName("inArr"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayObject, meta.GetFieldTypeName("inArr"));
Assert.AreEqual(100, portObj.GetHashCode());
- IPortableObject[] portInArr = portObj.Field<IPortableObject[]>("inArr");
+ IPortableObject[] portInArr = portObj.GetField<IPortableObject[]>("inArr");
Assert.AreEqual(1, portInArr.Length);
- Assert.AreEqual(1, portInArr[0].Field<int>("val"));
+ Assert.AreEqual(1, portInArr[0].GetField<int>("val"));
CompositeArray arr = portObj.Deserialize<CompositeArray>();
@@ -945,15 +945,15 @@ namespace Apache.Ignite.Core.Tests.Portable
// 2. Test addition to array.
portInArr = new[] { portInArr[0], null };
- portObj = _grid.Portables().Builder(portObj).HashCode(200)
+ portObj = _grid.GetPortables().GetBuilder(portObj).SetHashCode(200)
.SetField("inArr", portInArr).Build();
Assert.AreEqual(200, portObj.GetHashCode());
- portInArr = portObj.Field<IPortableObject[]>("inArr");
+ portInArr = portObj.GetField<IPortableObject[]>("inArr");
Assert.AreEqual(2, portInArr.Length);
- Assert.AreEqual(1, portInArr[0].Field<int>("val"));
+ Assert.AreEqual(1, portInArr[0].GetField<int>("val"));
Assert.IsNull(portInArr[1]);
arr = portObj.Deserialize<CompositeArray>();
@@ -963,18 +963,18 @@ namespace Apache.Ignite.Core.Tests.Portable
Assert.AreEqual(1, arr.InArr[0].Val);
Assert.IsNull(arr.InArr[1]);
- portInArr[1] = _grid.Portables().Builder(typeof(CompositeInner)).SetField("val", 2).Build();
+ portInArr[1] = _grid.GetPortables().GetBuilder(typeof(CompositeInner)).SetField("val", 2).Build();
- portObj = _grid.Portables().Builder(portObj).HashCode(300)
+ portObj = _grid.GetPortables().GetBuilder(portObj).SetHashCode(300)
.SetField("inArr", portInArr).Build();
Assert.AreEqual(300, portObj.GetHashCode());
- portInArr = portObj.Field<IPortableObject[]>("inArr");
+ portInArr = portObj.GetField<IPortableObject[]>("inArr");
Assert.AreEqual(2, portInArr.Length);
- Assert.AreEqual(1, portInArr[0].Field<int>("val"));
- Assert.AreEqual(2, portInArr[1].Field<int>("val"));
+ Assert.AreEqual(1, portInArr[0].GetField<int>("val"));
+ Assert.AreEqual(2, portInArr[1].GetField<int>("val"));
arr = portObj.Deserialize<CompositeArray>();
@@ -988,16 +988,16 @@ namespace Apache.Ignite.Core.Tests.Portable
inArr = new[] { inner, inner };
- portObj = _grid.Portables().Builder(typeof(CompositeArray)).HashCode(100)
+ portObj = _grid.GetPortables().GetBuilder(typeof(CompositeArray)).SetHashCode(100)
.SetField("inArr", inArr).Build();
Assert.AreEqual(100, portObj.GetHashCode());
- portInArr = portObj.Field<IPortableObject[]>("inArr");
+ portInArr = portObj.GetField<IPortableObject[]>("inArr");
Assert.AreEqual(2, portInArr.Length);
- Assert.AreEqual(1, portInArr[0].Field<int>("val"));
- Assert.AreEqual(1, portInArr[1].Field<int>("val"));
+ Assert.AreEqual(1, portInArr[0].GetField<int>("val"));
+ Assert.AreEqual(1, portInArr[1].GetField<int>("val"));
arr = portObj.Deserialize<CompositeArray>();
@@ -1006,18 +1006,18 @@ namespace Apache.Ignite.Core.Tests.Portable
Assert.AreEqual(1, arr.InArr[0].Val);
Assert.AreEqual(1, arr.InArr[1].Val);
- portInArr[0] = _grid.Portables().Builder(typeof(CompositeInner)).SetField("val", 2).Build();
+ portInArr[0] = _grid.GetPortables().GetBuilder(typeof(CompositeInner)).SetField("val", 2).Build();
- portObj = _grid.Portables().Builder(portObj).HashCode(200)
+ portObj = _grid.GetPortables().GetBuilder(portObj).SetHashCode(200)
.SetField("inArr", portInArr).Build();
Assert.AreEqual(200, portObj.GetHashCode());
- portInArr = portObj.Field<IPortableObject[]>("inArr");
+ portInArr = portObj.GetField<IPortableObject[]>("inArr");
Assert.AreEqual(2, portInArr.Length);
- Assert.AreEqual(2, portInArr[0].Field<int>("val"));
- Assert.AreEqual(1, portInArr[1].Field<int>("val"));
+ Assert.AreEqual(2, portInArr[0].GetField<int>("val"));
+ Assert.AreEqual(1, portInArr[1].GetField<int>("val"));
arr = portObj.Deserialize<CompositeArray>();
@@ -1029,23 +1029,23 @@ namespace Apache.Ignite.Core.Tests.Portable
// 4. Test nested object handle inversion.
CompositeOuter[] outArr = { new CompositeOuter(inner), new CompositeOuter(inner) };
- portObj = _grid.Portables().Builder(typeof(CompositeArray)).HashCode(100)
+ portObj = _grid.GetPortables().GetBuilder(typeof(CompositeArray)).SetHashCode(100)
.SetField("outArr", outArr).Build();
- meta = portObj.Metadata();
+ meta = portObj.GetMetadata();
Assert.AreEqual(typeof(CompositeArray).Name, meta.TypeName);
Assert.AreEqual(2, meta.Fields.Count);
- Assert.AreEqual(PortableTypeNames.TypeNameArrayObject, meta.FieldTypeName("inArr"));
- Assert.AreEqual(PortableTypeNames.TypeNameArrayObject, meta.FieldTypeName("outArr"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayObject, meta.GetFieldTypeName("inArr"));
+ Assert.AreEqual(PortableTypeNames.TypeNameArrayObject, meta.GetFieldTypeName("outArr"));
Assert.AreEqual(100, portObj.GetHashCode());
- IPortableObject[] portOutArr = portObj.Field<IPortableObject[]>("outArr");
+ IPortableObject[] portOutArr = portObj.GetField<IPortableObject[]>("outArr");
Assert.AreEqual(2, portOutArr.Length);
- Assert.AreEqual(1, portOutArr[0].Field<IPortableObject>("inner").Field<int>("val"));
- Assert.AreEqual(1, portOutArr[1].Field<IPortableObject>("inner").Field<int>("val"));
+ Assert.AreEqual(1, portOutArr[0].GetField<IPortableObject>("inner").GetField<int>("val"));
+ Assert.AreEqual(1, portOutArr[1].GetField<IPortableObject>("inner").GetField<int>("val"));
arr = portObj.Deserialize<CompositeArray>();
@@ -1054,19 +1054,19 @@ namespace Apache.Ignite.Core.Tests.Portable
Assert.AreEqual(1, arr.OutArr[0].Inner.Val);
Assert.AreEqual(1, arr.OutArr[1].Inner.Val);
- portOutArr[0] = _grid.Portables().Builder(typeof(CompositeOuter))
+ portOutArr[0] = _grid.GetPortables().GetBuilder(typeof(CompositeOuter))
.SetField("inner", new CompositeInner(2)).Build();
- portObj = _grid.Portables().Builder(portObj).HashCode(200)
+ portObj = _grid.GetPortables().GetBuilder(portObj).SetHashCode(200)
.SetField("outArr", portOutArr).Build();
Assert.AreEqual(200, portObj.GetHashCode());
- portInArr = portObj.Field<IPortableObject[]>("outArr");
+ portInArr = portObj.GetField<IPortableObject[]>("outArr");
Assert.AreEqual(2, portInArr.Length);
- Assert.AreEqual(2, portOutArr[0].Field<IPortableObject>("inner").Field<int>("val"));
- Assert.AreEqual(1, portOutArr[1].Field<IPortableObject>("inner").Field<int>("val"));
+ Assert.AreEqual(2, portOutArr[0].GetField<IPortableObject>("inner").GetField<int>("val"));
+ Assert.AreEqual(1, portOutArr[1].GetField<IPortableObject>("inner").GetField<int>("val"));
arr = portObj.Deserialize<CompositeArray>();
@@ -1092,36 +1092,36 @@ namespace Apache.Ignite.Core.Tests.Portable
dict[3] = new CompositeInner(3);
gDict[4] = new CompositeInner(4);
- IPortableObject portObj = _grid.Portables().Builder(typeof(CompositeContainer)).HashCode(100)
+ IPortableObject portObj = _grid.GetPortables().GetBuilder(typeof(CompositeContainer)).SetHashCode(100)
.SetField<ICollection>("col", col)
.SetField("gCol", gCol)
.SetField("dict", dict)
.SetField("gDict", gDict).Build();
// 1. Check meta.
- IPortableMetadata meta = portObj.Metadata();
+ IPortableMetadata meta = portObj.GetMetadata();
Assert.AreEqual(typeof(CompositeContainer).Name, meta.TypeName);
Assert.AreEqual(4, meta.Fields.Count);
- Assert.AreEqual(PortableTypeNames.TypeNameCollection, meta.FieldTypeName("col"));
- Assert.AreEqual(PortableTypeNames.TypeNameCollection, meta.FieldTypeName("gCol"));
- Assert.AreEqual(PortableTypeNames.TypeNameMap, meta.FieldTypeName("dict"));
- Assert.AreEqual(PortableTypeNames.TypeNameMap, meta.FieldTypeName("gDict"));
+ Assert.AreEqual(PortableTypeNames.TypeNameCollection, meta.GetFieldTypeName("col"));
+ Assert.AreEqual(PortableTypeNames.TypeNameCollection, meta.GetFieldTypeName("gCol"));
+ Assert.AreEqual(PortableTypeNames.TypeNameMap, meta.GetFieldTypeName("dict"));
+ Assert.AreEqual(PortableTypeNames.TypeNameMap, meta.GetFieldTypeName("gDict"));
// 2. Check in portable form.
- Assert.AreEqual(1, portObj.Field<ICollection>("col").Count);
- Assert.AreEqual(1, portObj.Field<ICollection>("col").OfType<IPortableObject>().First()
- .Field<int>("val"));
+ Assert.AreEqual(1, portObj.GetField<ICollection>("col").Count);
+ Assert.AreEqual(1, portObj.GetField<ICollection>("col").OfType<IPortableObject>().First()
+ .GetField<int>("val"));
- Assert.AreEqual(1, portObj.Field<ICollection<IPortableObject>>("gCol").Count);
- Assert.AreEqual(2, portObj.Field<ICollection<IPortableObject>>("gCol").First().Field<int>("val"));
+ Assert.AreEqual(1, portObj.GetField<ICollection<IPortableObject>>("gCol").Count);
+ Assert.AreEqual(2, portObj.GetField<ICollection<IPortableObject>>("gCol").First().GetField<int>("val"));
- Assert.AreEqual(1, portObj.Field<IDictionary>("dict").Count);
- Assert.AreEqual(3, ((IPortableObject) portObj.Field<IDictionary>("dict")[3]).Field<int>("val"));
+ Assert.AreEqual(1, portObj.GetField<IDictionary>("dict").Count);
+ Assert.AreEqual(3, ((IPortableObject) portObj.GetField<IDictionary>("dict")[3]).GetField<int>("val"));
- Assert.AreEqual(1, portObj.Field<IDictionary<int, IPortableObject>>("gDict").Count);
- Assert.AreEqual(4, portObj.Field<IDictionary<int, IPortableObject>>("gDict")[4].Field<int>("val"));
+ Assert.AreEqual(1, portObj.GetField<IDictionary<int, IPortableObject>>("gDict").Count);
+ Assert.AreEqual(4, portObj.GetField<IDictionary<int, IPortableObject>>("gDict")[4].GetField<int>("val"));
// 3. Check in deserialized form.
CompositeContainer obj = portObj.Deserialize<CompositeContainer>();
@@ -1158,7 +1158,7 @@ namespace Apache.Ignite.Core.Tests.Portable
Assert.AreEqual(1, raw.A);
Assert.AreEqual(2, raw.B);
- IPortableObject newPortObj = _grid.Portables().Builder(portObj).SetField("a", 3).Build();
+ IPortableObject newPortObj = _grid.GetPortables().GetBuilder(portObj).SetField("a", 3).Build();
raw = newPortObj.Deserialize<WithRaw>();
@@ -1173,26 +1173,26 @@ namespace Apache.Ignite.Core.Tests.Portable
public void TestNested()
{
// 1. Create from scratch.
- IPortableBuilder builder = _grid.Portables().Builder(typeof(NestedOuter));
+ IPortableBuilder builder = _grid.GetPortables().GetBuilder(typeof(NestedOuter));
NestedInner inner1 = new NestedInner {Val = 1};
builder.SetField("inner1", inner1);
IPortableObject outerPortObj = builder.Build();
- IPortableMetadata meta = outerPortObj.Metadata();
+ IPortableMetadata meta = outerPortObj.GetMetadata();
Assert.AreEqual(typeof(NestedOuter).Name, meta.TypeName);
Assert.AreEqual(1, meta.Fields.Count);
- Assert.AreEqual(PortableTypeNames.TypeNameObject, meta.FieldTypeName("inner1"));
+ Assert.AreEqual(PortableTypeNames.TypeNameObject, meta.GetFieldTypeName("inner1"));
- IPortableObject innerPortObj1 = outerPortObj.Field<IPortableObject>("inner1");
+ IPortableObject innerPortObj1 = outerPortObj.GetField<IPortableObject>("inner1");
- IPortableMetadata innerMeta = innerPortObj1.Metadata();
+ IPortableMetadata innerMeta = innerPortObj1.GetMetadata();
Assert.AreEqual(typeof(NestedInner).Name, innerMeta.TypeName);
Assert.AreEqual(1, innerMeta.Fields.Count);
- Assert.AreEqual(PortableTypeNames.TypeNameInt, innerMeta.FieldTypeName("Val"));
+ Assert.AreEqual(PortableTypeNames.TypeNameInt, innerMeta.GetFieldTypeName("Val"));
inner1 = innerPortObj1.Deserialize<NestedInner>();
@@ -1203,7 +1203,7 @@ namespace Apache.Ignite.Core.Tests.Portable
Assert.IsNull(outer.Inner2);
// 2. Add another field over existing portable object.
- builder = _grid.Portables().Builder(outerPortObj);
+ builder = _grid.GetPortables().GetBuilder(outerPortObj);
NestedInner inner2 = new NestedInner {Val = 2};
builder.SetField("inner2", inner2);
@@ -1215,13 +1215,13 @@ namespace Apache.Ignite.Core.Tests.Portable
Assert.AreEqual(2, outer.Inner2.Val);
// 3. Try setting inner object in portable form.
- innerPortObj1 = _grid.Portables().Builder(innerPortObj1).SetField("val", 3).Build();
+ innerPortObj1 = _grid.GetPortables().GetBuilder(innerPortObj1).SetField("val", 3).Build();
inner1 = innerPortObj1.Deserialize<NestedInner>();
Assert.AreEqual(3, inner1.Val);
- outerPortObj = _grid.Portables().Builder(outerPortObj).SetField<object>("inner1", innerPortObj1).Build();
+ outerPortObj = _grid.GetPortables().GetBuilder(outerPortObj).SetField<object>("inner1", innerPortObj1).Build();
outer = outerPortObj.Deserialize<NestedOuter>();
Assert.AreEqual(3, outer.Inner1.Val);
@@ -1245,9 +1245,9 @@ namespace Apache.Ignite.Core.Tests.Portable
byte[] outerBytes = _marsh.Marshal(outer);
- IPortableBuilder builder = _grid.Portables().Builder(typeof(MigrationOuter));
+ IPortableBuilder builder = _grid.GetPortables().GetBuilder(typeof(MigrationOuter));
- builder.HashCode(outer.GetHashCode());
+ builder.SetHashCode(outer.GetHashCode());
builder.SetField<object>("inner1", inner);
builder.SetField<object>("inner2", inner);
@@ -1264,7 +1264,7 @@ namespace Apache.Ignite.Core.Tests.Portable
MigrationInner inner1 = new MigrationInner {Val = 2};
IPortableObject portOuterMigrated =
- _grid.Portables().Builder(portOuter).SetField<object>("inner1", inner1).Build();
+ _grid.GetPortables().GetBuilder(portOuter).SetField<object>("inner1", inner1).Build();
MigrationOuter outerMigrated = portOuterMigrated.Deserialize<MigrationOuter>();
@@ -1273,10 +1273,10 @@ namespace Apache.Ignite.Core.Tests.Portable
// 3. Change the first value using serialized form.
IPortableObject inner1Port =
- _grid.Portables().Builder(typeof(MigrationInner)).SetField("val", 2).Build();
+ _grid.GetPortables().GetBuilder(typeof(MigrationInner)).SetField("val", 2).Build();
portOuterMigrated =
- _grid.Portables().Builder(portOuter).SetField<object>("inner1", inner1Port).Build();
+ _grid.GetPortables().GetBuilder(portOuter).SetField<object>("inner1", inner1Port).Build();
outerMigrated = portOuterMigrated.Deserialize<MigrationOuter>();
@@ -1299,10 +1299,10 @@ namespace Apache.Ignite.Core.Tests.Portable
byte[] rawOuter = _marsh.Marshal(outer);
IPortableObject portOuter = _marsh.Unmarshal<IPortableObject>(rawOuter, PortableMode.ForcePortable);
- IPortableObject portInner = portOuter.Field<IPortableObject>("inner");
+ IPortableObject portInner = portOuter.GetField<IPortableObject>("inner");
// 1. Ensure that inner object can be deserialized after build.
- IPortableObject portInnerNew = _grid.Portables().Builder(portInner).Build();
+ IPortableObject portInnerNew = _grid.GetPortables().GetBuilder(portInner).Build();
InversionInner innerNew = portInnerNew.Deserialize<InversionInner>();
@@ -1310,7 +1310,7 @@ namespace Apache.Ignite.Core.Tests.Portable
// 2. Ensure that portable object with external dependencies could be added to builder.
IPortableObject portOuterNew =
- _grid.Portables().Builder(typeof(InversionOuter)).SetField<object>("inner", portInner).Build();
+ _grid.GetPortables().GetBuilder(typeof(InversionOuter)).SetField<object>("inner", portInner).Build();
InversionOuter outerNew = portOuterNew.Deserialize<InversionOuter>();
@@ -1324,33 +1324,33 @@ namespace Apache.Ignite.Core.Tests.Portable
[Test]
public void TestBuildMultiple()
{
- IPortableBuilder builder = _grid.Portables().Builder(typeof(Primitives));
+ IPortableBuilder builder = _grid.GetPortables().GetBuilder(typeof(Primitives));
builder.SetField<byte>("fByte", 1).SetField("fBool", true);
IPortableObject po1 = builder.Build();
IPortableObject po2 = builder.Build();
- Assert.AreEqual(1, po1.Field<byte>("fByte"));
- Assert.AreEqual(true, po1.Field<bool>("fBool"));
+ Assert.AreEqual(1, po1.GetField<byte>("fByte"));
+ Assert.AreEqual(true, po1.GetField<bool>("fBool"));
- Assert.AreEqual(1, po2.Field<byte>("fByte"));
- Assert.AreEqual(true, po2.Field<bool>("fBool"));
+ Assert.AreEqual(1, po2.GetField<byte>("fByte"));
+ Assert.AreEqual(true, po2.GetField<bool>("fBool"));
builder.SetField<byte>("fByte", 2);
IPortableObject po3 = builder.Build();
- Assert.AreEqual(1, po1.Field<byte>("fByte"));
- Assert.AreEqual(true, po1.Field<bool>("fBool"));
+ Assert.AreEqual(1, po1.GetField<byte>("fByte"));
+ Assert.AreEqual(true, po1.GetField<bool>("fBool"));
- Assert.AreEqual(1, po2.Field<byte>("fByte"));
- Assert.AreEqual(true, po2.Field<bool>("fBool"));
+ Assert.AreEqual(1, po2.GetField<byte>("fByte"));
+ Assert.AreEqual(true, po2.GetField<bool>("fBool"));
- Assert.AreEqual(2, po3.Field<byte>("fByte"));
- Assert.AreEqual(true, po2.Field<bool>("fBool"));
+ Assert.AreEqual(2, po3.GetField<byte>("fByte"));
+ Assert.AreEqual(true, po2.GetField<bool>("fBool"));
- builder = _grid.Portables().Builder(po1);
+ builder = _grid.GetPortables().GetBuilder(po1);
builder.SetField<byte>("fByte", 10);
@@ -1361,14 +1361,14 @@ namespace Apache.Ignite.Core.Tests.Portable
po3 = builder.Build();
- Assert.AreEqual(10, po1.Field<byte>("fByte"));
- Assert.AreEqual(true, po1.Field<bool>("fBool"));
+ Assert.AreEqual(10, po1.GetField<byte>("fByte"));
+ Assert.AreEqual(true, po1.GetField<bool>("fBool"));
- Assert.AreEqual(10, po2.Field<byte>("fByte"));
- Assert.AreEqual(true, po2.Field<bool>("fBool"));
+ Assert.AreEqual(10, po2.GetField<byte>("fByte"));
+ Assert.AreEqual(true, po2.GetField<bool>("fBool"));
- Assert.AreEqual(20, po3.Field<byte>("fByte"));
- Assert.AreEqual(true, po3.Field<bool>("fBool"));
+ Assert.AreEqual(20, po3.GetField<byte>("fByte"));
+ Assert.AreEqual(true, po3.GetField<bool>("fBool"));
}
/// <summary>
@@ -1377,11 +1377,11 @@ namespace Apache.Ignite.Core.Tests.Portable
[Test]
public void TestTypeId()
{
- Assert.Throws<ArgumentException>(() => _grid.Portables().GetTypeId(null));
+ Assert.Throws<ArgumentException>(() => _grid.GetPortables().GetTypeId(null));
- Assert.AreEqual(IdMapper.TestTypeId, _grid.Portables().GetTypeId(IdMapper.TestTypeName));
+ Assert.AreEqual(IdMapper.TestTypeId, _grid.GetPortables().GetTypeId(IdMapper.TestTypeName));
- Assert.AreEqual(PortableUtils.StringHashCode("someTypeName"), _grid.Portables().GetTypeId("someTypeName"));
+ Assert.AreEqual(PortableUtils.StringHashCode("someTypeName"), _grid.GetPortables().GetTypeId("someTypeName"));
}
/// <summary>
@@ -1391,7 +1391,7 @@ namespace Apache.Ignite.Core.Tests.Portable
public void TestMetadata()
{
// Populate metadata
- var portables = _grid.Portables();
+ var portables = _grid.GetPortables();
portables.ToPortable<IPortableObject>(new DecimalHolder());
@@ -1773,13 +1773,13 @@ namespace Apache.Ignite.Core.Tests.Portable
public const int TestTypeId = -65537;
/** <inheritdoc /> */
- public int TypeId(string typeName)
+ public int GetTypeId(string typeName)
{
return typeName == TestTypeName ? TestTypeId : 0;
}
/** <inheritdoc /> */
- public int FieldId(int typeId, string fieldName)
+ public int GetFieldId(int typeId, string fieldName)
{
return 0;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Portable/PortableSelfTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Portable/PortableSelfTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Portable/PortableSelfTest.cs
index 8ec6955..ae114f3 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Portable/PortableSelfTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Portable/PortableSelfTest.cs
@@ -594,8 +594,8 @@ namespace Apache.Ignite.Core.Tests.Portable
IPortableObject portNewObj = marsh.Unmarshal<IPortableObject>(data, PortableMode.ForcePortable);
- Assert.AreEqual(obj.Field1, portNewObj.Field<int>("field1"));
- Assert.AreEqual(obj.Field2, portNewObj.Field<int>("Field2"));
+ Assert.AreEqual(obj.Field1, portNewObj.GetField<int>("field1"));
+ Assert.AreEqual(obj.Field2, portNewObj.GetField<int>("Field2"));
}
/**
@@ -711,8 +711,8 @@ namespace Apache.Ignite.Core.Tests.Portable
IPortableObject portObj = marsh.Unmarshal<IPortableObject>(marsh.Marshal(obj1), PortableMode.ForcePortable);
- Assert.AreEqual(obj1.Val, portObj.Field<decimal>("val"));
- Assert.AreEqual(obj1.ValArr, portObj.Field<decimal[]>("valArr"));
+ Assert.AreEqual(obj1.Val, portObj.GetField<decimal>("val"));
+ Assert.AreEqual(obj1.ValArr, portObj.GetField<decimal[]>("valArr"));
Assert.AreEqual(obj1.Val, portObj.Deserialize<DecimalReflective>().Val);
Assert.AreEqual(obj1.ValArr, portObj.Deserialize<DecimalReflective>().ValArr);
@@ -727,8 +727,8 @@ namespace Apache.Ignite.Core.Tests.Portable
portObj = marsh.Unmarshal<IPortableObject>(marsh.Marshal(obj2), PortableMode.ForcePortable);
- Assert.AreEqual(obj2.Val, portObj.Field<decimal>("val"));
- Assert.AreEqual(obj2.ValArr, portObj.Field<decimal[]>("valArr"));
+ Assert.AreEqual(obj2.Val, portObj.GetField<decimal>("val"));
+ Assert.AreEqual(obj2.ValArr, portObj.GetField<decimal[]>("valArr"));
Assert.AreEqual(obj2.Val, portObj.Deserialize<DecimalMarshalAware>().Val);
Assert.AreEqual(obj2.ValArr, portObj.Deserialize<DecimalMarshalAware>().ValArr);
@@ -977,7 +977,7 @@ namespace Apache.Ignite.Core.Tests.Portable
CheckHandlesConsistency(outer, inner, newOuter, newInner);
// Get inner object by field.
- IPortableObject innerObj = outerObj.Field<IPortableObject>("inner");
+ IPortableObject innerObj = outerObj.GetField<IPortableObject>("inner");
newInner = innerObj.Deserialize<HandleInner>();
newOuter = newInner.Outer;
@@ -985,7 +985,7 @@ namespace Apache.Ignite.Core.Tests.Portable
CheckHandlesConsistency(outer, inner, newOuter, newInner);
// Get outer object from inner object by handle.
- outerObj = innerObj.Field<IPortableObject>("outer");
+ outerObj = innerObj.GetField<IPortableObject>("outer");
newOuter = outerObj.Deserialize<HandleOuter>();
newInner = newOuter.Inner;
@@ -1156,10 +1156,10 @@ namespace Apache.Ignite.Core.Tests.Portable
IPortableObject portObj = marsh.Unmarshal<IPortableObject>(bytes, PortableMode.ForcePortable);
- Assert.AreEqual(guidArr, portObj.Field<Guid[]>("guidArr"));
- Assert.AreEqual(nGuidArr, portObj.Field<Guid?[]>("nGuidArr"));
- Assert.AreEqual(dateArr, portObj.Field<DateTime[]>("dateArr"));
- Assert.AreEqual(nDateArr, portObj.Field<DateTime?[]>("nDateArr"));
+ Assert.AreEqual(guidArr, portObj.GetField<Guid[]>("guidArr"));
+ Assert.AreEqual(nGuidArr, portObj.GetField<Guid?[]>("nGuidArr"));
+ Assert.AreEqual(dateArr, portObj.GetField<DateTime[]>("dateArr"));
+ Assert.AreEqual(nDateArr, portObj.GetField<DateTime?[]>("nDateArr"));
obj1 = portObj.Deserialize<SpecialArray>();
@@ -1180,10 +1180,10 @@ namespace Apache.Ignite.Core.Tests.Portable
portObj = marsh.Unmarshal<IPortableObject>(bytes, PortableMode.ForcePortable);
- Assert.AreEqual(guidArr, portObj.Field<Guid[]>("a"));
- Assert.AreEqual(nGuidArr, portObj.Field<Guid?[]>("b"));
- Assert.AreEqual(dateArr, portObj.Field<DateTime[]>("c"));
- Assert.AreEqual(nDateArr, portObj.Field<DateTime?[]>("d"));
+ Assert.AreEqual(guidArr, portObj.GetField<Guid[]>("a"));
+ Assert.AreEqual(nGuidArr, portObj.GetField<Guid?[]>("b"));
+ Assert.AreEqual(dateArr, portObj.GetField<DateTime[]>("c"));
+ Assert.AreEqual(nDateArr, portObj.GetField<DateTime?[]>("d"));
obj2 = portObj.Deserialize<SpecialArrayMarshalAware>();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/PortableConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/PortableConfigurationTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/PortableConfigurationTest.cs
index 67a8d7d..26c9122 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/PortableConfigurationTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/PortableConfigurationTest.cs
@@ -75,7 +75,7 @@ namespace Apache.Ignite.Core.Tests
PortableConfiguration = portableConfiguration
});
- _cache = grid.Cache<int, TestGenericPortableBase>(null);
+ _cache = grid.GetCache<int, TestGenericPortableBase>(null);
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/SerializationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/SerializationTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/SerializationTest.cs
index 8ed2899..e1a543e 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/SerializationTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/SerializationTest.cs
@@ -70,7 +70,7 @@ namespace Apache.Ignite.Core.Tests
public void TestSerializableXmlDoc()
{
var grid = Ignition.GetIgnite(GridName);
- var cache = grid.Cache<int, SerializableXmlDoc>("replicated");
+ var cache = grid.GetCache<int, SerializableXmlDoc>("replicated");
var doc = new SerializableXmlDoc();
@@ -97,9 +97,9 @@ namespace Apache.Ignite.Core.Tests
/// <param name="arg">Task arg.</param>
private static void CheckTask(IIgnite grid, object arg)
{
- var jobResult = grid.Compute().Execute(new CombineStringsTask(), arg);
+ var jobResult = grid.GetCompute().Execute(new CombineStringsTask(), arg);
- var nodeCount = grid.Cluster.Nodes().Count;
+ var nodeCount = grid.GetCluster().GetNodes().Count;
var expectedRes =
CombineStringsTask.CombineStrings(Enumerable.Range(0, nodeCount).Select(x => arg.ToString()));
@@ -115,7 +115,7 @@ namespace Apache.Ignite.Core.Tests
{
const int count = 50;
- var cache = Ignition.GetIgnite(GridName).Cache<int, object>("local");
+ var cache = Ignition.GetIgnite(GridName).GetCache<int, object>("local");
// Put multiple objects from muliple same-named assemblies to cache
for (var i = 0; i < count; i++)
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs
index 7f5aa44..6b2a7ec 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTest.cs
@@ -109,7 +109,7 @@ namespace Apache.Ignite.Core.Tests.Services
Name = SvcName,
MaxPerNodeCount = 3,
TotalCount = 3,
- NodeFilter = new NodeFilter {NodeId = Grid1.Cluster.LocalNode.Id},
+ NodeFilter = new NodeFilter {NodeId = Grid1.GetCluster().GetLocalNode().Id},
Service = portable ? new TestIgniteServicePortable() : new TestIgniteServiceSerializable()
};
@@ -133,10 +133,10 @@ namespace Apache.Ignite.Core.Tests.Services
// Check that only one node has the service.
foreach (var grid in Grids)
{
- if (grid.Cluster.LocalNode.Id == svc0.NodeId)
+ if (grid.GetCluster().GetLocalNode().Id == svc0.NodeId)
CheckServiceStarted(grid);
else
- Assert.IsNull(grid.Services().GetService<TestIgniteServiceSerializable>(SvcName));
+ Assert.IsNull(grid.GetServices().GetService<TestIgniteServiceSerializable>(SvcName));
}
}
@@ -150,9 +150,9 @@ namespace Apache.Ignite.Core.Tests.Services
Services.DeployNodeSingleton(SvcName, svc);
- Assert.AreEqual(1, Grid1.Services().GetServices<ITestIgniteService>(SvcName).Count);
- Assert.AreEqual(1, Grid2.Services().GetServices<ITestIgniteService>(SvcName).Count);
- Assert.AreEqual(1, Grid3.Services().GetServices<ITestIgniteService>(SvcName).Count);
+ Assert.AreEqual(1, Grid1.GetServices().GetServices<ITestIgniteService>(SvcName).Count);
+ Assert.AreEqual(1, Grid2.GetServices().GetServices<ITestIgniteService>(SvcName).Count);
+ Assert.AreEqual(1, Grid3.GetServices().GetServices<ITestIgniteService>(SvcName).Count);
}
/// <summary>
@@ -165,7 +165,7 @@ namespace Apache.Ignite.Core.Tests.Services
Services.DeployKeyAffinitySingleton(SvcName, svc, CacheName, AffKey);
- var affNode = Grid1.Affinity(CacheName).MapKeyToNode(AffKey);
+ var affNode = Grid1.GetAffinity(CacheName).MapKeyToNode(AffKey);
var prx = Services.GetServiceProxy<ITestIgniteService>(SvcName);
@@ -251,7 +251,7 @@ namespace Apache.Ignite.Core.Tests.Services
? new TestIgniteServicePortable {TestProperty = 17}
: new TestIgniteServiceSerializable {TestProperty = 17};
- Grid1.Cluster.ForNodeIds(Grid2.Cluster.LocalNode.Id, Grid3.Cluster.LocalNode.Id).Services()
+ Grid1.GetCluster().ForNodeIds(Grid2.GetCluster().GetLocalNode().Id, Grid3.GetCluster().GetLocalNode().Id).GetServices()
.DeployNodeSingleton(SvcName,
svc);
@@ -275,8 +275,8 @@ namespace Apache.Ignite.Core.Tests.Services
Assert.Throws<ServiceInvocationException>(() => prx.ErrMethod(123));
// Check local scenario (proxy should not be created for local instance)
- Assert.IsTrue(ReferenceEquals(Grid2.Services().GetService<ITestIgniteService>(SvcName),
- Grid2.Services().GetServiceProxy<ITestIgniteService>(SvcName)));
+ Assert.IsTrue(ReferenceEquals(Grid2.GetServices().GetService<ITestIgniteService>(SvcName),
+ Grid2.GetServices().GetServiceProxy<ITestIgniteService>(SvcName)));
// Check sticky = false: call multiple times, check that different nodes get invoked
var invokedIds = Enumerable.Range(1, 100).Select(x => prx.NodeId).Distinct().ToList();
@@ -303,11 +303,11 @@ namespace Apache.Ignite.Core.Tests.Services
var svc = new TestIgniteServicePortable {TestProperty = 33};
// Deploy locally or to the remote node
- var nodeId = (local ? Grid1 : Grid2).Cluster.LocalNode.Id;
+ var nodeId = (local ? Grid1 : Grid2).GetCluster().GetLocalNode().Id;
- var cluster = Grid1.Cluster.ForNodeIds(nodeId);
+ var cluster = Grid1.GetCluster().ForNodeIds(nodeId);
- cluster.Services().DeployNodeSingleton(SvcName, svc);
+ cluster.GetServices().DeployNodeSingleton(SvcName, svc);
// Get proxy
var prx = Services.GetServiceProxy<ITestIgniteServiceProxyInterface>(SvcName);
@@ -347,7 +347,7 @@ namespace Apache.Ignite.Core.Tests.Services
Assert.AreEqual(1, desc.MaxPerNodeCount);
Assert.AreEqual(1, desc.TotalCount);
Assert.AreEqual(typeof(TestIgniteServiceSerializable), desc.Type);
- Assert.AreEqual(Grid1.Cluster.LocalNode.Id, desc.OriginNodeId);
+ Assert.AreEqual(Grid1.GetCluster().GetLocalNode().Id, desc.OriginNodeId);
var top = desc.TopologySnapshot;
var prx = Services.GetServiceProxy<ITestIgniteService>(SvcName);
@@ -366,7 +366,7 @@ namespace Apache.Ignite.Core.Tests.Services
var svc = new TestIgniteServicePortable();
// Deploy to grid2
- Grid1.Cluster.ForNodeIds(Grid2.Cluster.LocalNode.Id).Services().WithKeepPortable()
+ Grid1.GetCluster().ForNodeIds(Grid2.GetCluster().GetLocalNode().Id).GetServices().WithKeepPortable()
.DeployNodeSingleton(SvcName, svc);
// Get proxy
@@ -377,7 +377,7 @@ namespace Apache.Ignite.Core.Tests.Services
var res = (IPortableObject) prx.Method(obj);
Assert.AreEqual(11, res.Deserialize<PortableObject>().Val);
- res = (IPortableObject) prx.Method(Grid1.Portables().ToPortable<IPortableObject>(obj));
+ res = (IPortableObject) prx.Method(Grid1.GetPortables().ToPortable<IPortableObject>(obj));
Assert.AreEqual(11, res.Deserialize<PortableObject>().Val);
}
@@ -390,7 +390,7 @@ namespace Apache.Ignite.Core.Tests.Services
var svc = new TestIgniteServicePortable();
// Deploy to grid2
- Grid1.Cluster.ForNodeIds(Grid2.Cluster.LocalNode.Id).Services().WithServerKeepPortable()
+ Grid1.GetCluster().ForNodeIds(Grid2.GetCluster().GetLocalNode().Id).GetServices().WithServerKeepPortable()
.DeployNodeSingleton(SvcName, svc);
// Get proxy
@@ -401,7 +401,7 @@ namespace Apache.Ignite.Core.Tests.Services
var res = (PortableObject) prx.Method(obj);
Assert.AreEqual(11, res.Val);
- res = (PortableObject)prx.Method(Grid1.Portables().ToPortable<IPortableObject>(obj));
+ res = (PortableObject)prx.Method(Grid1.GetPortables().ToPortable<IPortableObject>(obj));
Assert.AreEqual(11, res.Val);
}
@@ -414,7 +414,7 @@ namespace Apache.Ignite.Core.Tests.Services
var svc = new TestIgniteServicePortable();
// Deploy to grid2
- Grid1.Cluster.ForNodeIds(Grid2.Cluster.LocalNode.Id).Services().WithKeepPortable().WithServerKeepPortable()
+ Grid1.GetCluster().ForNodeIds(Grid2.GetCluster().GetLocalNode().Id).GetServices().WithKeepPortable().WithServerKeepPortable()
.DeployNodeSingleton(SvcName, svc);
// Get proxy
@@ -425,7 +425,7 @@ namespace Apache.Ignite.Core.Tests.Services
var res = (IPortableObject)prx.Method(obj);
Assert.AreEqual(11, res.Deserialize<PortableObject>().Val);
- res = (IPortableObject)prx.Method(Grid1.Portables().ToPortable<IPortableObject>(obj));
+ res = (IPortableObject)prx.Method(Grid1.GetPortables().ToPortable<IPortableObject>(obj));
Assert.AreEqual(11, res.Deserialize<PortableObject>().Val);
}
@@ -478,7 +478,7 @@ namespace Apache.Ignite.Core.Tests.Services
// Cancellation failed, but service is removed.
foreach (var grid in Grids)
- Assert.IsNull(grid.Services().GetService<ITestIgniteService>(SvcName));
+ Assert.IsNull(grid.GetServices().GetService<ITestIgniteService>(SvcName));
}
[Test]
@@ -538,7 +538,7 @@ namespace Apache.Ignite.Core.Tests.Services
/// </summary>
private static void CheckServiceStarted(IIgnite grid, int count = 1)
{
- var services = grid.Services().GetServices<TestIgniteServiceSerializable>(SvcName);
+ var services = grid.GetServices().GetServices<TestIgniteServiceSerializable>(SvcName);
Assert.AreEqual(count, services.Count);
@@ -553,7 +553,7 @@ namespace Apache.Ignite.Core.Tests.Services
Assert.IsTrue(svc.Executed);
Assert.IsFalse(svc.Cancelled);
- Assert.AreEqual(grid.Cluster.LocalNode.Id, svc.NodeId);
+ Assert.AreEqual(grid.GetCluster().GetLocalNode().Id, svc.NodeId);
}
/// <summary>
@@ -583,7 +583,7 @@ namespace Apache.Ignite.Core.Tests.Services
/// </summary>
protected virtual IServices Services
{
- get { return Grid1.Services(); }
+ get { return Grid1.GetServices(); }
}
/// <summary>
@@ -658,7 +658,7 @@ namespace Apache.Ignite.Core.Tests.Services
/** <inheritdoc /> */
public Guid NodeId
{
- get { return _grid.Cluster.LocalNode.Id; }
+ get { return _grid.GetCluster().GetLocalNode().Id; }
}
/** <inheritdoc /> */
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTestAsync.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTestAsync.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTestAsync.cs
index 68ae93e..b0e507a 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTestAsync.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Services/ServicesTestAsync.cs
@@ -27,7 +27,7 @@ namespace Apache.Ignite.Core.Tests.Services
/** <inheritdoc /> */
protected override IServices Services
{
- get { return new ServicesAsyncWrapper(Grid1.Services()); }
+ get { return new ServicesAsyncWrapper(Grid1.GetServices()); }
}
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/TestUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/TestUtils.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/TestUtils.cs
index a60efa7..3287e2f 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/TestUtils.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/TestUtils.cs
@@ -217,7 +217,7 @@ namespace Apache.Ignite.Core.Tests
while (true)
{
- if (grid.Cluster.Nodes().Count != size)
+ if (grid.GetCluster().GetNodes().Count != size)
{
if (left > 0)
{
[4/5] ignite git commit: IGNITE-1499: Correct method naming
conventions on public API.
Posted by vo...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
index 6af877e..ae00c91 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTest.cs
@@ -349,7 +349,7 @@ namespace Apache.Ignite.Core.Tests.Cache
{
var cache = Cache(i);
- if (!cache.IsEmpty)
+ if (!cache.IsEmpty())
{
var entries = Enumerable.Range(0, 2000)
.Select(x => new KeyValuePair<int, int>(x, cache.LocalPeek(x)))
@@ -374,7 +374,7 @@ namespace Apache.Ignite.Core.Tests.Cache
}
public ICache<TK, TV> Cache<TK, TV>(int idx) {
- return GetIgnite(idx).Cache<TK, TV>(CacheName());
+ return GetIgnite(idx).GetCache<TK, TV>(CacheName());
}
public ICache<int, int> Cache()
@@ -389,12 +389,12 @@ namespace Apache.Ignite.Core.Tests.Cache
public ICacheAffinity Affinity()
{
- return GetIgnite(0).Affinity(CacheName());
+ return GetIgnite(0).GetAffinity(CacheName());
}
public ITransactions Transactions
{
- get { return GetIgnite(0).Transactions; }
+ get { return GetIgnite(0).GetTransactions(); }
}
[Test]
@@ -431,7 +431,7 @@ namespace Apache.Ignite.Core.Tests.Cache
{
var cache = Cache(i);
- Assert.IsTrue(cache.IsEmpty);
+ Assert.IsTrue(cache.IsEmpty());
}
for (int i = 0; i < GridCount(); i++)
@@ -445,7 +445,7 @@ namespace Apache.Ignite.Core.Tests.Cache
{
var cache = Cache(i);
- Assert.IsFalse(cache.IsEmpty);
+ Assert.IsFalse(cache.IsEmpty());
}
}
@@ -1015,13 +1015,13 @@ namespace Apache.Ignite.Core.Tests.Cache
cache.LocalEvict(new[] {key});
- Assert.AreEqual(0, cache.LocalSize(CachePeekMode.Onheap));
+ Assert.AreEqual(0, cache.GetLocalSize(CachePeekMode.Onheap));
Assert.AreEqual(0, PeekInt(cache, key));
Assert.AreEqual(1, cache.Get(key));
- Assert.AreEqual(1, cache.LocalSize(CachePeekMode.Onheap));
+ Assert.AreEqual(1, cache.GetLocalSize(CachePeekMode.Onheap));
Assert.AreEqual(1, PeekInt(cache, key));
}
@@ -1043,7 +1043,7 @@ namespace Apache.Ignite.Core.Tests.Cache
cache.LocalEvict(new List<int> { -1, keys[0], keys[1] });
- Assert.AreEqual(1, cache.LocalSize(CachePeekMode.Onheap));
+ Assert.AreEqual(1, cache.GetLocalSize(CachePeekMode.Onheap));
Assert.AreEqual(0, PeekInt(cache, keys[0]));
Assert.AreEqual(0, PeekInt(cache, keys[1]));
@@ -1052,7 +1052,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(1, cache.Get(keys[0]));
Assert.AreEqual(2, cache.Get(keys[1]));
- Assert.AreEqual(3, cache.LocalSize());
+ Assert.AreEqual(3, cache.GetLocalSize());
Assert.AreEqual(1, PeekInt(cache, keys[0]));
Assert.AreEqual(2, PeekInt(cache, keys[1]));
@@ -1068,13 +1068,13 @@ namespace Apache.Ignite.Core.Tests.Cache
cache.Put(PrimaryKeyForCache(cache, 500), 1);
- Assert.IsFalse(cache.IsEmpty);
+ Assert.IsFalse(cache.IsEmpty());
}
Cache().Clear();
for (int i = 0; i < GridCount(); i++)
- Assert.IsTrue(Cache(i).IsEmpty);
+ Assert.IsTrue(Cache(i).IsEmpty());
}
[Test]
@@ -1086,7 +1086,7 @@ namespace Apache.Ignite.Core.Tests.Cache
foreach (var key in keys)
cache.Put(key, 3);
- var i = cache.Size();
+ var i = cache.GetSize();
foreach (var key in keys)
{
@@ -1094,9 +1094,9 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(0, cache.Get(key));
- Assert.Less(cache.Size(), i);
+ Assert.Less(cache.GetSize(), i);
- i = cache.Size();
+ i = cache.GetSize();
}
}
@@ -1124,7 +1124,7 @@ namespace Apache.Ignite.Core.Tests.Cache
foreach (var key in keys)
cache.Put(key, 3);
- var i = cache.Size();
+ var i = cache.GetSize();
foreach (var key in keys)
{
@@ -1132,9 +1132,9 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(0, cache.LocalPeek(key));
- Assert.Less(cache.Size(), i);
+ Assert.Less(cache.GetSize(), i);
- i = cache.Size();
+ i = cache.GetSize();
}
cache.Clear();
@@ -1168,7 +1168,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(true, cache.Remove(1));
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
Assert.AreEqual(0, cache.Get(1));
@@ -1179,7 +1179,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.IsFalse(cache.Remove(1, -1));
Assert.IsTrue(cache.Remove(1, 1));
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
Assert.AreEqual(0, cache.Get(1));
}
@@ -1195,7 +1195,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(1, cache.GetAndRemove(1));
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
Assert.AreEqual(0, cache.Get(1));
@@ -1206,7 +1206,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.IsFalse(cache.Remove(1, -1));
Assert.IsTrue(cache.Remove(1, 1));
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
Assert.AreEqual(0, cache.Get(1));
}
@@ -1223,7 +1223,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.IsFalse(cache.Remove(-1));
Assert.IsTrue(cache.Remove(1));
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
Assert.AreEqual(0, cache.Get(1));
}
@@ -1240,7 +1240,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.IsFalse(cache.Remove(-1));
Assert.IsTrue(cache.Remove(1));
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
Assert.AreEqual(0, cache.Get(1));
}
@@ -1260,7 +1260,7 @@ namespace Apache.Ignite.Core.Tests.Cache
cache.RemoveAll();
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
Assert.AreEqual(0, cache.Get(keys[0]));
Assert.AreEqual(0, cache.Get(keys[1]));
@@ -1281,7 +1281,7 @@ namespace Apache.Ignite.Core.Tests.Cache
cache.RemoveAll();
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
Assert.AreEqual(0, cache.Get(keys[0]));
Assert.AreEqual(0, cache.Get(keys[1]));
@@ -1292,7 +1292,7 @@ namespace Apache.Ignite.Core.Tests.Cache
{
var cache = Cache();
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
cache.Put(1, 1);
cache.Put(2, 2);
@@ -1304,7 +1304,7 @@ namespace Apache.Ignite.Core.Tests.Cache
cache.RemoveAll(new List<int> { 0, 1, 2 });
- Assert.AreEqual(1, cache.Size(CachePeekMode.Primary));
+ Assert.AreEqual(1, cache.GetSize(CachePeekMode.Primary));
Assert.AreEqual(0, cache.Get(1));
Assert.AreEqual(0, cache.Get(2));
@@ -1316,7 +1316,7 @@ namespace Apache.Ignite.Core.Tests.Cache
{
var cache = Cache().WithAsync().WrapAsync();
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
cache.Put(1, 1);
cache.Put(2, 2);
@@ -1328,7 +1328,7 @@ namespace Apache.Ignite.Core.Tests.Cache
cache.RemoveAll(new List<int> { 0, 1, 2 });
- Assert.AreEqual(1, cache.Size(CachePeekMode.Primary));
+ Assert.AreEqual(1, cache.GetSize(CachePeekMode.Primary));
Assert.AreEqual(0, cache.Get(1));
Assert.AreEqual(0, cache.Get(2));
@@ -1347,13 +1347,13 @@ namespace Apache.Ignite.Core.Tests.Cache
foreach (int key in keys)
cache.Put(key, 1);
- Assert.IsTrue(cache.Size() >= 2);
- Assert.AreEqual(2, cache.LocalSize(CachePeekMode.Primary));
+ Assert.IsTrue(cache.GetSize() >= 2);
+ Assert.AreEqual(2, cache.GetLocalSize(CachePeekMode.Primary));
}
ICache<int, int> cache0 = Cache();
- Assert.AreEqual(GridCount() * 2, cache0.Size(CachePeekMode.Primary));
+ Assert.AreEqual(GridCount() * 2, cache0.GetSize(CachePeekMode.Primary));
if (!LocalCache() && !ReplicatedCache())
{
@@ -1361,7 +1361,7 @@ namespace Apache.Ignite.Core.Tests.Cache
cache0.Put(nearKey, 1);
- Assert.AreEqual(NearEnabled() ? 1 : 0, cache0.Size(CachePeekMode.Near));
+ Assert.AreEqual(NearEnabled() ? 1 : 0, cache0.GetSize(CachePeekMode.Near));
}
}
@@ -1374,16 +1374,16 @@ namespace Apache.Ignite.Core.Tests.Cache
cache.Put(keys[0], 1);
cache.Put(keys[1], 2);
- var localSize = cache.LocalSize();
+ var localSize = cache.GetLocalSize();
cache.LocalEvict(keys.Take(2).ToArray());
- Assert.AreEqual(0, cache.LocalSize(CachePeekMode.Onheap));
- Assert.AreEqual(localSize, cache.LocalSize(CachePeekMode.All));
+ Assert.AreEqual(0, cache.GetLocalSize(CachePeekMode.Onheap));
+ Assert.AreEqual(localSize, cache.GetLocalSize(CachePeekMode.All));
cache.Put(keys[2], 3);
- Assert.AreEqual(localSize + 1, cache.LocalSize(CachePeekMode.All));
+ Assert.AreEqual(localSize + 1, cache.GetLocalSize(CachePeekMode.All));
cache.RemoveAll(keys.Take(2).ToArray());
}
@@ -1495,13 +1495,13 @@ namespace Apache.Ignite.Core.Tests.Cache
cache.LocalEvict(new[] {key});
- Assert.AreEqual(0, cache.LocalSize(CachePeekMode.Onheap));
+ Assert.AreEqual(0, cache.GetLocalSize(CachePeekMode.Onheap));
Assert.AreEqual(0, PeekInt(cache, key));
cache.LocalPromote(new[] { key });
- Assert.AreEqual(1, cache.LocalSize(CachePeekMode.Onheap));
+ Assert.AreEqual(1, cache.GetLocalSize(CachePeekMode.Onheap));
Assert.AreEqual(1, PeekInt(cache, key));
}
@@ -1523,7 +1523,7 @@ namespace Apache.Ignite.Core.Tests.Cache
cache.LocalEvict(new List<int> { -1, keys[0], keys[1] });
- Assert.AreEqual(1, cache.LocalSize(CachePeekMode.Onheap));
+ Assert.AreEqual(1, cache.GetLocalSize(CachePeekMode.Onheap));
Assert.AreEqual(0, PeekInt(cache, keys[0]));
Assert.AreEqual(0, PeekInt(cache, keys[1]));
@@ -1531,7 +1531,7 @@ namespace Apache.Ignite.Core.Tests.Cache
cache.LocalPromote(new[] {keys[0], keys[1]});
- Assert.AreEqual(3, cache.LocalSize(CachePeekMode.Onheap));
+ Assert.AreEqual(3, cache.GetLocalSize(CachePeekMode.Onheap));
Assert.AreEqual(1, PeekInt(cache, keys[0]));
Assert.AreEqual(2, PeekInt(cache, keys[1]));
@@ -1812,8 +1812,8 @@ namespace Apache.Ignite.Core.Tests.Cache
IPortableObject p = portCache.Get(new CacheTestKey(key));
Assert.IsNotNull(p);
- Assert.AreEqual(key, p.Field<int>("age"));
- Assert.AreEqual("Person-" + key, p.Field<string>("name"));
+ Assert.AreEqual(key, p.GetField<int>("age"));
+ Assert.AreEqual("Person-" + key, p.GetField<string>("name"));
}
}
@@ -1843,8 +1843,8 @@ namespace Apache.Ignite.Core.Tests.Cache
var p = fut.Get();
Assert.IsNotNull(p);
- Assert.AreEqual(key, p.Field<int>("age"));
- Assert.AreEqual("Person-" + key, p.Field<string>("name"));
+ Assert.AreEqual(key, p.GetField<int>("age"));
+ Assert.AreEqual("Person-" + key, p.GetField<string>("name"));
}
}, threads);
@@ -2206,7 +2206,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(2500, tx.Timeout.TotalMilliseconds);
Assert.AreEqual(TransactionState.Active, tx.State);
Assert.IsTrue(tx.StartTime.Ticks > 0);
- Assert.AreEqual(tx.NodeId, GetIgnite(0).Cluster.LocalNode.Id);
+ Assert.AreEqual(tx.NodeId, GetIgnite(0).GetCluster().GetLocalNode().Id);
DateTime startTime1 = tx.StartTime;
@@ -2515,7 +2515,7 @@ namespace Apache.Ignite.Core.Tests.Cache
ISet<int> parts = new HashSet<int>();
for (int i = 0; i < 1000; i++)
- parts.Add(aff.Partition(i));
+ parts.Add(aff.GetPartition(i));
if (LocalCache())
Assert.AreEqual(1, parts.Count);
@@ -2527,7 +2527,7 @@ namespace Apache.Ignite.Core.Tests.Cache
ISet<int> parts = new HashSet<int>();
for (int i = 0; i < 1000; i++)
- parts.Add(aff.Partition("key" + i));
+ parts.Add(aff.GetPartition("key" + i));
if (LocalCache())
Assert.AreEqual(1, parts.Count);
@@ -2541,7 +2541,7 @@ namespace Apache.Ignite.Core.Tests.Cache
{
ICacheAffinity aff = Affinity();
- ICollection<IClusterNode> nodes = GetIgnite(0).Cluster.Nodes();
+ ICollection<IClusterNode> nodes = GetIgnite(0).GetCluster().GetNodes();
Assert.IsTrue(nodes.Count > 0);
@@ -2593,7 +2593,7 @@ namespace Apache.Ignite.Core.Tests.Cache
{
ICacheAffinity aff = Affinity();
- ICollection<IClusterNode> nodes = GetIgnite(0).Cluster.Nodes();
+ ICollection<IClusterNode> nodes = GetIgnite(0).GetCluster().GetNodes();
Assert.IsTrue(nodes.Count > 0);
@@ -2601,11 +2601,11 @@ namespace Apache.Ignite.Core.Tests.Cache
{
IClusterNode node = nodes.First();
- int[] parts = aff.BackupPartitions(node);
+ int[] parts = aff.GetBackupPartitions(node);
Assert.AreEqual(0, parts.Length);
- parts = aff.AllPartitions(node);
+ parts = aff.GetAllPartitions(node);
Assert.AreEqual(CachePartitions(), parts.Length);
}
@@ -2616,17 +2616,17 @@ namespace Apache.Ignite.Core.Tests.Cache
IList<int> allParts = new List<int>();
foreach(IClusterNode node in nodes) {
- int[] parts = aff.PrimaryPartitions(node);
+ int[] parts = aff.GetPrimaryPartitions(node);
foreach (int part in parts)
allPrimaryParts.Add(part);
- parts = aff.BackupPartitions(node);
+ parts = aff.GetBackupPartitions(node);
foreach (int part in parts)
allBackupParts.Add(part);
- parts = aff.AllPartitions(node);
+ parts = aff.GetAllPartitions(node);
foreach (int part in parts)
allParts.Add(part);
@@ -2643,9 +2643,9 @@ namespace Apache.Ignite.Core.Tests.Cache
{
ICacheAffinity aff = Affinity();
- Assert.AreEqual(10, aff.AffinityKey<int, int>(10));
+ Assert.AreEqual(10, aff.GetAffinityKey<int, int>(10));
- Assert.AreEqual("string", aff.AffinityKey<string, string>("string"));
+ Assert.AreEqual("string", aff.GetAffinityKey<string, string>("string"));
}
[Test]
@@ -2659,7 +2659,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.IsNotNull(node);
- Assert.IsTrue(GetIgnite(0).Cluster.Nodes().Contains(node));
+ Assert.IsTrue(GetIgnite(0).GetCluster().GetNodes().Contains(node));
Assert.IsTrue(aff.IsPrimary(node, key));
@@ -2667,7 +2667,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.IsFalse(aff.IsBackup(node, key));
- int part = aff.Partition(key);
+ int part = aff.GetPartition(key);
IClusterNode partNode = aff.MapPartitionToNode(part);
@@ -2693,7 +2693,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.IsTrue(aff.IsBackup(nodes[i], key));
}
- int part = aff.Partition(key);
+ int part = aff.GetPartition(key);
IList<IClusterNode> partNodes = aff.MapPartitionToPrimaryAndBackups(part);
@@ -2738,7 +2738,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(parts.Count, map.Count);
- Assert.AreEqual(GetIgnite(0).Cluster.LocalNode, map[0]);
+ Assert.AreEqual(GetIgnite(0).GetCluster().GetLocalNode(), map[0]);
}
else
{
@@ -2780,8 +2780,8 @@ namespace Apache.Ignite.Core.Tests.Cache
const int count = 20;
var cache = Cache();
- var aff = cache.Ignite.Affinity(cache.Name);
- var node = cache.Ignite.Cluster.LocalNode;
+ var aff = cache.Ignite.GetAffinity(cache.Name);
+ var node = cache.Ignite.GetCluster().GetLocalNode();
for (int i = 0; i < count; i++)
cache.Put(i, -i - 1);
@@ -3004,7 +3004,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreSame(cacheSkipStore1, cacheSkipStore2);
// Ensure other flags are preserved.
- Assert.IsTrue(((CacheProxyImpl<int, int>)cache.WithKeepPortable<int, int>().WithSkipStore()).KeepPortable);
+ Assert.IsTrue(((CacheProxyImpl<int, int>)cache.WithKeepPortable<int, int>().WithSkipStore()).IsKeepPortable);
Assert.IsTrue(cache.WithAsync().WithSkipStore().IsAsync);
}
@@ -3019,7 +3019,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(cache.Name, m.CacheName);
- Assert.AreEqual(cache.Size(), m.Size);
+ Assert.AreEqual(cache.GetSize(), m.Size);
}
[Test]
@@ -3039,7 +3039,7 @@ namespace Apache.Ignite.Core.Tests.Cache
var randomName = "template" + Guid.NewGuid();
// Can't get non-existent cache with Cache method
- Assert.Throws<ArgumentException>(() => GetIgnite(0).Cache<int, int>(randomName));
+ Assert.Throws<ArgumentException>(() => GetIgnite(0).GetCache<int, int>(randomName));
var cache = GetIgnite(0).CreateCache<int, int>(randomName);
@@ -3050,7 +3050,7 @@ namespace Apache.Ignite.Core.Tests.Cache
// Can't create again
Assert.Throws<IgniteException>(() => GetIgnite(0).CreateCache<int, int>(randomName));
- var cache0 = GetIgnite(0).Cache<int, int>(randomName);
+ var cache0 = GetIgnite(0).GetCache<int, int>(randomName);
Assert.AreEqual(10, cache0.Get(1));
}
@@ -3062,7 +3062,7 @@ namespace Apache.Ignite.Core.Tests.Cache
var randomName = "template" + Guid.NewGuid();
// Can't get non-existent cache with Cache method
- Assert.Throws<ArgumentException>(() => GetIgnite(0).Cache<int, int>(randomName));
+ Assert.Throws<ArgumentException>(() => GetIgnite(0).GetCache<int, int>(randomName));
var cache = GetIgnite(0).GetOrCreateCache<int, int>(randomName);
@@ -3074,7 +3074,7 @@ namespace Apache.Ignite.Core.Tests.Cache
Assert.AreEqual(10, cache0.Get(1));
- var cache1 = GetIgnite(0).Cache<int, int>(randomName);
+ var cache1 = GetIgnite(0).GetCache<int, int>(randomName);
Assert.AreEqual(10, cache1.Get(1));
}
@@ -3138,8 +3138,8 @@ namespace Apache.Ignite.Core.Tests.Cache
private void CheckPersonData(IPortableObject obj, string expName, int expAge)
{
- Assert.AreEqual(expName, obj.Field<string>("name"));
- Assert.AreEqual(expAge, obj.Field<int>("age"));
+ Assert.AreEqual(expName, obj.GetField<string>("name"));
+ Assert.AreEqual(expAge, obj.GetField<int>("age"));
PortablePerson person = obj.Deserialize<PortablePerson>();
@@ -3164,18 +3164,18 @@ namespace Apache.Ignite.Core.Tests.Cache
protected static IEnumerable<int> PrimaryKeysForCache(ICache<int, int> cache, int cnt, int startFrom)
{
- IClusterNode node = cache.Ignite.Cluster.LocalNode;
+ IClusterNode node = cache.Ignite.GetCluster().GetLocalNode();
- ICacheAffinity aff = cache.Ignite.Affinity(cache.Name);
+ ICacheAffinity aff = cache.Ignite.GetAffinity(cache.Name);
return Enumerable.Range(startFrom, int.MaxValue - startFrom).Where(x => aff.IsPrimary(node, x));
}
protected static int NearKeyForCache(ICache<int, int> cache)
{
- IClusterNode node = cache.Ignite.Cluster.LocalNode;
+ IClusterNode node = cache.Ignite.GetCluster().GetLocalNode();
- ICacheAffinity aff = cache.Ignite.Affinity(cache.Name);
+ ICacheAffinity aff = cache.Ignite.GetAffinity(cache.Name);
for (int i = 0; i < 100000; i++)
{
@@ -3190,10 +3190,10 @@ namespace Apache.Ignite.Core.Tests.Cache
protected static string GetKeyAffinity(ICache<int, int> cache, int key)
{
- if (cache.Ignite.Affinity(cache.Name).IsPrimary(cache.Ignite.Cluster.LocalNode, key))
+ if (cache.Ignite.GetAffinity(cache.Name).IsPrimary(cache.Ignite.GetCluster().GetLocalNode(), key))
return "primary";
- if (cache.Ignite.Affinity(cache.Name).IsBackup(cache.Ignite.Cluster.LocalNode, key))
+ if (cache.Ignite.GetAffinity(cache.Name).IsBackup(cache.Ignite.GetCluster().GetLocalNode(), key))
return "backup";
return "near";
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAffinityTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAffinityTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAffinityTest.cs
index beb2c0f..469887d 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAffinityTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAffinityTest.cs
@@ -68,7 +68,7 @@ namespace Apache.Ignite.Core.Tests.Cache
{
IIgnite g = Ignition.GetIgnite("grid-0");
- ICacheAffinity aff = g.Affinity(null);
+ ICacheAffinity aff = g.GetAffinity(null);
IClusterNode node = aff.MapKeyToNode(new AffinityTestKey(0, 1));
@@ -84,16 +84,16 @@ namespace Apache.Ignite.Core.Tests.Cache
{
IIgnite g = Ignition.GetIgnite("grid-0");
- ICacheAffinity aff = g.Affinity(null);
+ ICacheAffinity aff = g.GetAffinity(null);
- IPortableObject affKey = g.Portables().ToPortable<IPortableObject>(new AffinityTestKey(0, 1));
+ IPortableObject affKey = g.GetPortables().ToPortable<IPortableObject>(new AffinityTestKey(0, 1));
IClusterNode node = aff.MapKeyToNode(affKey);
for (int i = 0; i < 10; i++)
{
IPortableObject otherAffKey =
- g.Portables().ToPortable<IPortableObject>(new AffinityTestKey(i, 1));
+ g.GetPortables().ToPortable<IPortableObject>(new AffinityTestKey(i, 1));
Assert.AreEqual(node.Id, aff.MapKeyToNode(otherAffKey).Id);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs
index 210d80c..abef473 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheDynamicStartTest.cs
@@ -108,17 +108,17 @@ namespace Apache.Ignite.Core.Tests.Cache
{
Assert.Throws<ArgumentException>(() =>
{
- Ignition.GetIgnite(GridData).Cache<CacheTestKey, PortablePerson>(CacheDummy);
+ Ignition.GetIgnite(GridData).GetCache<CacheTestKey, PortablePerson>(CacheDummy);
});
Assert.Throws<ArgumentException>(() =>
{
- Ignition.GetIgnite(GridDataNoCfg).Cache<CacheTestKey, PortablePerson>(CacheDummy);
+ Ignition.GetIgnite(GridDataNoCfg).GetCache<CacheTestKey, PortablePerson>(CacheDummy);
});
Assert.Throws<ArgumentException>(() =>
{
- Ignition.GetIgnite(GridClient).Cache<CacheTestKey, PortablePerson>(CacheDummy);
+ Ignition.GetIgnite(GridClient).GetCache<CacheTestKey, PortablePerson>(CacheDummy);
});
}
@@ -147,13 +147,13 @@ namespace Apache.Ignite.Core.Tests.Cache
private void Check(string cacheName)
{
ICache<DynamicTestKey, DynamicTestValue> cacheData =
- Ignition.GetIgnite(GridData).Cache<DynamicTestKey, DynamicTestValue>(cacheName);
+ Ignition.GetIgnite(GridData).GetCache<DynamicTestKey, DynamicTestValue>(cacheName);
ICache<DynamicTestKey, DynamicTestValue> cacheDataNoCfg =
- Ignition.GetIgnite(GridDataNoCfg).Cache<DynamicTestKey, DynamicTestValue>(cacheName);
+ Ignition.GetIgnite(GridDataNoCfg).GetCache<DynamicTestKey, DynamicTestValue>(cacheName);
ICache<DynamicTestKey, DynamicTestValue> cacheClient =
- Ignition.GetIgnite(GridClient).Cache<DynamicTestKey, DynamicTestValue>(cacheName);
+ Ignition.GetIgnite(GridClient).GetCache<DynamicTestKey, DynamicTestValue>(cacheName);
DynamicTestKey key1 = new DynamicTestKey(1);
DynamicTestKey key2 = new DynamicTestKey(2);
@@ -181,7 +181,7 @@ namespace Apache.Ignite.Core.Tests.Cache
for (int i = 0; i < 10000; i++)
cacheClient.Put(new DynamicTestKey(i), new DynamicTestValue(1));
- int sizeClient = cacheClient.LocalSize();
+ int sizeClient = cacheClient.GetLocalSize();
Assert.AreEqual(0, sizeClient);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheForkedTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheForkedTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheForkedTest.cs
index 2f3e0d0..46c54e6 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheForkedTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheForkedTest.cs
@@ -75,7 +75,7 @@ namespace Apache.Ignite.Core.Tests.Cache
[Test]
public void TestClearCache()
{
- _grid.Cache<object, object>(null).Clear();
+ _grid.GetCache<object, object>(null).Clear();
}
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs
index 93f5973..52a856a 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/CacheTestAsyncWrapper.cs
@@ -83,15 +83,16 @@ namespace Apache.Ignite.Core.Tests.Cache
}
/** <inheritDoc /> */
- public bool IsEmpty
+
+ public bool IsEmpty()
{
- get { return _cache.IsEmpty; }
+ return _cache.IsEmpty();
}
/** <inheritDoc /> */
- public bool KeepPortable
+ public bool IsKeepPortable
{
- get { return _cache.KeepPortable; }
+ get { return _cache.IsKeepPortable; }
}
/** <inheritDoc /> */
@@ -290,15 +291,15 @@ namespace Apache.Ignite.Core.Tests.Cache
}
/** <inheritDoc /> */
- public int LocalSize(params CachePeekMode[] modes)
+ public int GetLocalSize(params CachePeekMode[] modes)
{
- return _cache.LocalSize(modes);
+ return _cache.GetLocalSize(modes);
}
/** <inheritDoc /> */
- public int Size(params CachePeekMode[] modes)
+ public int GetSize(params CachePeekMode[] modes)
{
- _cache.Size(modes);
+ _cache.GetSize(modes);
return GetResult<int>();
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
index 85227b6..18f04ef 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Query/CacheQueriesTest.cs
@@ -112,7 +112,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
for (int j = 0; j < MaxItemCnt; j++)
cache.Remove(j);
- Assert.IsTrue(cache.IsEmpty);
+ Assert.IsTrue(cache.IsEmpty());
}
Console.WriteLine("Test finished: " + TestContext.CurrentContext.Test.Name);
@@ -135,7 +135,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
/// <returns></returns>
public ICache<int, QueryPerson> Cache(int idx)
{
- return GetIgnite(idx).Cache<int, QueryPerson>(CacheName);
+ return GetIgnite(idx).GetCache<int, QueryPerson>(CacheName);
}
/// <summary>
@@ -654,7 +654,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
var cache = Cache();
- var aff = cache.Ignite.Affinity(CacheName);
+ var aff = cache.Ignite.GetAffinity(CacheName);
var exp = PopulateCache(cache, loc, cnt, x => true); // populate outside the loop (slow)
for (var part = 0; part < aff.Partitions; part++)
@@ -662,7 +662,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
//var exp0 = new HashSet<int>(exp.Where(x => aff.Partition(x) == part)); // filter expected keys
var exp0 = new HashSet<int>();
foreach (var x in exp)
- if (aff.Partition(x) == part)
+ if (aff.GetPartition(x) == part)
exp0.Add(x);
var qry = new ScanQuery<int, TV> { Partition = part };
@@ -679,7 +679,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
//var exp0 = new HashSet<int>(exp.Where(x => aff.Partition(x) == part)); // filter expected keys
var exp0 = new HashSet<int>();
foreach (var x in exp)
- if (aff.Partition(x) == part)
+ if (aff.GetPartition(x) == part)
exp0.Add(x);
var qry = new ScanQuery<int, TV>(new ScanQueryFilter<TV>()) { Partition = part };
@@ -713,8 +713,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
{
all.Add(entry);
- Assert.AreEqual(entry.Key.ToString(), entry.Value.Field<string>("name"));
- Assert.AreEqual(entry.Key, entry.Value.Field<int>("age"));
+ Assert.AreEqual(entry.Key.ToString(), entry.Value.GetField<string>("name"));
+ Assert.AreEqual(entry.Key, entry.Value.GetField<int>("age"));
exp0.Remove(entry.Key);
}
@@ -731,8 +731,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
{
all.Add(entry);
- Assert.AreEqual(entry.Key.ToString(), entry.Value.Field<string>("name"));
- Assert.AreEqual(entry.Key, entry.Value.Field<int>("age"));
+ Assert.AreEqual(entry.Key.ToString(), entry.Value.GetField<string>("name"));
+ Assert.AreEqual(entry.Key, entry.Value.GetField<int>("age"));
exp0.Remove(entry.Key);
}
@@ -790,11 +790,11 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
return;
var sb = new StringBuilder();
- var aff = cache.Ignite.Affinity(cache.Name);
+ var aff = cache.Ignite.GetAffinity(cache.Name);
foreach (var key in exp)
{
- var part = aff.Partition(key);
+ var part = aff.GetPartition(key);
sb.AppendFormat(
"Query did not return expected key '{0}' (exists: {1}), partition '{2}', partition nodes: ",
key, cache.Get(key) != null, part);
@@ -838,8 +838,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Query
cache.Put(val, new QueryPerson(val.ToString(), val));
- if (expectedEntryFilter(val) && (!loc || cache.Ignite.Affinity(cache.Name)
- .IsPrimary(cache.Ignite.Cluster.LocalNode, val)))
+ if (expectedEntryFilter(val) && (!loc || cache.Ignite.GetAffinity(cache.Name)
+ .IsPrimary(cache.Ignite.GetCluster().GetLocalNode(), val)))
exp.Add(val);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
index 55bc76c..e0dcdaa 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Continuous/ContinuousQueryAbstractTest.cs
@@ -114,11 +114,11 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
cfg.GridName = "grid-1";
grid1 = Ignition.Start(cfg);
- cache1 = grid1.Cache<int, PortableEntry>(cacheName);
+ cache1 = grid1.GetCache<int, PortableEntry>(cacheName);
cfg.GridName = "grid-2";
grid2 = Ignition.Start(cfg);
- cache2 = grid2.Cache<int, PortableEntry>(cacheName);
+ cache2 = grid2.GetCache<int, PortableEntry>(cacheName);
}
/// <summary>
@@ -147,8 +147,8 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
cache1.Remove(PrimaryKey(cache1));
cache1.Remove(PrimaryKey(cache2));
- Assert.AreEqual(0, cache1.Size());
- Assert.AreEqual(0, cache2.Size());
+ Assert.AreEqual(0, cache1.GetSize());
+ Assert.AreEqual(0, cache2.GetSize());
Console.WriteLine("Test started: " + TestContext.CurrentContext.Test.Name);
}
@@ -923,9 +923,9 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
/// <returns></returns>
private static List<int> PrimaryKeys<T>(ICache<int, T> cache, int cnt, int startFrom = 0)
{
- IClusterNode node = cache.Ignite.Cluster.LocalNode;
+ IClusterNode node = cache.Ignite.GetCluster().GetLocalNode();
- ICacheAffinity aff = cache.Ignite.Affinity(cache.Name);
+ ICacheAffinity aff = cache.Ignite.GetAffinity(cache.Name);
List<int> keys = new List<int>(cnt);
@@ -1114,7 +1114,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Continuous
{
IPortableObject val = evt.Value;
- IPortableMetadata meta = val.Metadata();
+ IPortableMetadata meta = val.GetMetadata();
Assert.AreEqual(typeof(PortableEntry).Name, meta.TypeName);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheParallelLoadStoreTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheParallelLoadStoreTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheParallelLoadStoreTest.cs
index 33eec7b..a7d9adb 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheParallelLoadStoreTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheParallelLoadStoreTest.cs
@@ -77,7 +77,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
{
var cache = GetCache();
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
const int minId = 113;
const int expectedItemCount = CacheTestParallelLoadStore.InputDataLength - minId;
@@ -86,7 +86,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
cache.LocalLoadCache(null, minId);
- Assert.AreEqual(expectedItemCount, cache.Size());
+ Assert.AreEqual(expectedItemCount, cache.GetSize());
// check items presence; increment by 100 to speed up the test
for (var i = minId; i < expectedItemCount; i += 100)
@@ -104,7 +104,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
/// </summary>
private static ICache<int, CacheTestParallelLoadStore.Record> GetCache()
{
- return Ignition.GetIgnite().Cache<int, CacheTestParallelLoadStore.Record>(ObjectStoreCacheName);
+ return Ignition.GetIgnite().GetCache<int, CacheTestParallelLoadStore.Record>(ObjectStoreCacheName);
}
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreSessionTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreSessionTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreSessionTest.cs
index bc55901..137215e 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreSessionTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreSessionTest.cs
@@ -86,11 +86,11 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
var ignite = Ignition.GetIgnite(IgniteName);
- var cache1 = Ignition.GetIgnite(IgniteName).Cache<int, int>(Cache1);
- var cache2 = Ignition.GetIgnite(IgniteName).Cache<int, int>(Cache2);
+ var cache1 = Ignition.GetIgnite(IgniteName).GetCache<int, int>(Cache1);
+ var cache2 = Ignition.GetIgnite(IgniteName).GetCache<int, int>(Cache2);
// 1. Test rollback.
- using (var tx = ignite.Transactions.TxStart())
+ using (var tx = ignite.GetTransactions().TxStart())
{
cache1.Put(1, 1);
cache2.Put(2, 2);
@@ -107,7 +107,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
_dumps = new ConcurrentBag<ICollection<Operation>>();
// 2. Test puts.
- using (var tx = ignite.Transactions.TxStart())
+ using (var tx = ignite.GetTransactions().TxStart())
{
cache1.Put(1, 1);
cache2.Put(2, 2);
@@ -126,7 +126,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
_dumps = new ConcurrentBag<ICollection<Operation>>();
// 3. Test removes.
- using (var tx = ignite.Transactions.TxStart())
+ using (var tx = ignite.GetTransactions().TxStart())
{
cache1.Remove(1);
cache2.Remove(2);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
index 4e5e050..bfafcf4 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
@@ -162,7 +162,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
cache.Clear();
- Assert.IsTrue(cache.IsEmpty, "Cache is not empty: " + cache.Size());
+ Assert.IsTrue(cache.IsEmpty(), "Cache is not empty: " + cache.GetSize());
CacheTestStore.Reset();
@@ -174,11 +174,11 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
{
var cache = Cache();
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
cache.LoadCache(new CacheEntryFilter(), 100, 10);
- Assert.AreEqual(5, cache.Size());
+ Assert.AreEqual(5, cache.GetSize());
for (int i = 105; i < 110; i++)
Assert.AreEqual("val_" + i, cache.Get(i));
@@ -189,11 +189,11 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
{
var cache = Cache();
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
cache.LocalLoadCache(new CacheEntryFilter(), 100, 10);
- Assert.AreEqual(5, cache.Size());
+ Assert.AreEqual(5, cache.GetSize());
for (int i = 105; i < 110; i++)
Assert.AreEqual("val_" + i, cache.Get(i));
@@ -206,13 +206,13 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
var cache = Cache();
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
cache.LocalLoadCache(null, 0, 3);
- Assert.AreEqual(3, cache.Size());
+ Assert.AreEqual(3, cache.GetSize());
- var meta = cache.WithKeepPortable<Key, IPortableObject>().Get(new Key(0)).Metadata();
+ var meta = cache.WithKeepPortable<Key, IPortableObject>().Get(new Key(0)).GetMetadata();
Assert.NotNull(meta);
@@ -224,7 +224,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
{
var cache = Cache().WithAsync();
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
cache.LocalLoadCache(new CacheEntryFilter(), 100, 10);
@@ -234,7 +234,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
Assert.IsTrue(fut.IsDone);
- cache.Size();
+ cache.GetSize();
Assert.AreEqual(5, cache.GetFuture<int>().ToTask().Result);
for (int i = 105; i < 110; i++)
@@ -258,11 +258,11 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
cache.LocalEvict(new[] { 1 });
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
Assert.AreEqual("val", cache.Get(1));
- Assert.AreEqual(1, cache.Size());
+ Assert.AreEqual(1, cache.GetSize());
}
[Test]
@@ -278,15 +278,15 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
IPortableObject v = (IPortableObject)map[1];
- Assert.AreEqual(1, v.Field<int>("_idx"));
+ Assert.AreEqual(1, v.GetField<int>("_idx"));
cache.LocalEvict(new[] { 1 });
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
Assert.AreEqual(1, cache.Get(1).Index());
- Assert.AreEqual(1, cache.Size());
+ Assert.AreEqual(1, cache.GetSize());
}
[Test]
@@ -306,11 +306,11 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
cache.LocalEvict(new[] { 1 });
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
Assert.AreEqual(1, cache.Get(1).Index());
- Assert.AreEqual(1, cache.Size());
+ Assert.AreEqual(1, cache.GetSize());
}
[Test]
@@ -334,7 +334,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
cache.Clear();
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
ICollection<int> keys = new List<int>();
@@ -348,7 +348,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
for (int i = 0; i < 10; i++)
Assert.AreEqual("val_" + i, loaded[i]);
- Assert.AreEqual(10, cache.Size());
+ Assert.AreEqual(10, cache.GetSize());
}
[Test]
@@ -397,7 +397,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
{
var cache = Cache();
- using (var tx = cache.Ignite.Transactions.TxStart())
+ using (var tx = cache.Ignite.GetTransactions().TxStart())
{
CacheTestStore.ExpCommit = true;
@@ -422,11 +422,11 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
var cache = Cache();
- Assert.AreEqual(0, cache.Size());
+ Assert.AreEqual(0, cache.GetSize());
cache.LocalLoadCache(null, 0, null);
- Assert.AreEqual(1000, cache.Size());
+ Assert.AreEqual(1000, cache.GetSize());
for (int i = 0; i < 1000; i++)
Assert.AreEqual("val_" + i, cache.Get(i));
@@ -475,17 +475,17 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
private ICache<TK, TV> PortableStoreCache<TK, TV>()
{
- return Ignition.GetIgnite(GridName()).Cache<TK, TV>(PortableStoreCacheName);
+ return Ignition.GetIgnite(GridName()).GetCache<TK, TV>(PortableStoreCacheName);
}
private ICache<TK, TV> ObjectStoreCache<TK, TV>()
{
- return Ignition.GetIgnite(GridName()).Cache<TK, TV>(ObjectStoreCacheName);
+ return Ignition.GetIgnite(GridName()).GetCache<TK, TV>(ObjectStoreCacheName);
}
private ICache<int, string> CustomStoreCache()
{
- return Ignition.GetIgnite(GridName()).Cache<int, string>(CustomStoreCacheName);
+ return Ignition.GetIgnite(GridName()).GetCache<int, string>(CustomStoreCacheName);
}
private ICache<int, string> TemplateStoreCache()
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/AbstractTaskTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/AbstractTaskTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/AbstractTaskTest.cs
index f370740..12c9992 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/AbstractTaskTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/AbstractTaskTest.cs
@@ -92,7 +92,7 @@ namespace Apache.Ignite.Core.Tests.Compute
if (!_proc2.Alive)
throw new Exception("Process 2 died unexpectedly: " + _proc2.Join());
- if (Grid1.Cluster.Nodes().Count < 2)
+ if (Grid1.GetCluster().GetNodes().Count < 2)
Thread.Sleep(100);
else
break;
@@ -105,7 +105,7 @@ namespace Apache.Ignite.Core.Tests.Compute
if (!_proc3.Alive)
throw new Exception("Process 3 died unexpectedly: " + _proc3.Join());
- if (Grid1.Cluster.Nodes().Count < 3)
+ if (Grid1.GetCluster().GetNodes().Count < 3)
Thread.Sleep(100);
else
break;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ClosureTaskTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ClosureTaskTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ClosureTaskTest.cs
index 047e46b..8664413 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ClosureTaskTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ClosureTaskTest.cs
@@ -45,7 +45,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestExecuteSingle()
{
- var res = Grid1.Compute().Call(OutFunc(false));
+ var res = Grid1.GetCompute().Call(OutFunc(false));
CheckResult(res);
}
@@ -58,7 +58,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
try
{
- Grid1.Compute().Call(OutFunc(true));
+ Grid1.GetCompute().Call(OutFunc(true));
Assert.Fail();
}
@@ -79,7 +79,7 @@ namespace Apache.Ignite.Core.Tests.Compute
for (int i = 0; i < MultiCloCnt; i++)
clos.Add(OutFunc(false));
- ICollection<object> ress = Grid1.Compute().Call(clos);
+ ICollection<object> ress = Grid1.GetCompute().Call(clos);
foreach (object res in ress)
CheckResult(res);
@@ -96,7 +96,7 @@ namespace Apache.Ignite.Core.Tests.Compute
for (int i = 0; i < MultiCloCnt; i++)
clos.Add(OutFunc(false));
- ICollection<object> ress = Grid1.Compute().Call(clos, new Reducer(false));
+ ICollection<object> ress = Grid1.GetCompute().Call(clos, new Reducer(false));
foreach (object res in ress)
CheckResult(res);
@@ -115,7 +115,7 @@ namespace Apache.Ignite.Core.Tests.Compute
try
{
- Grid1.Compute().Call(clos);
+ Grid1.GetCompute().Call(clos);
Assert.Fail();
}
@@ -131,7 +131,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestBroadcastOut()
{
- ICollection<object> ress = Grid1.Compute().Broadcast(OutFunc(false));
+ ICollection<object> ress = Grid1.GetCompute().Broadcast(OutFunc(false));
foreach (object res in ress)
CheckResult(res);
@@ -145,7 +145,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
try
{
- Grid1.Compute().Broadcast(OutFunc(true));
+ Grid1.GetCompute().Broadcast(OutFunc(true));
Assert.Fail();
}
@@ -161,7 +161,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestBroadcastInOut()
{
- ICollection<object> ress = Grid1.Compute().Broadcast(Func(false), 1);
+ ICollection<object> ress = Grid1.GetCompute().Broadcast(Func(false), 1);
foreach (object res in ress)
CheckResult(res);
@@ -175,7 +175,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
try
{
- Grid1.Compute().Broadcast(Func(true), 1);
+ Grid1.GetCompute().Broadcast(Func(true), 1);
Assert.Fail();
}
@@ -191,7 +191,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestApply()
{
- object res = Grid1.Compute().Apply(Func(false), 1);
+ object res = Grid1.GetCompute().Apply(Func(false), 1);
CheckResult(res);
}
@@ -204,7 +204,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
try
{
- Grid1.Compute().Apply(Func(true), 1);
+ Grid1.GetCompute().Apply(Func(true), 1);
Assert.Fail();
}
@@ -227,7 +227,7 @@ namespace Apache.Ignite.Core.Tests.Compute
Console.WriteLine("START TASK");
- var ress = Grid1.Compute().Apply(Func(false), args);
+ var ress = Grid1.GetCompute().Apply(Func(false), args);
Console.WriteLine("END TASK.");
@@ -248,7 +248,7 @@ namespace Apache.Ignite.Core.Tests.Compute
try
{
- Grid1.Compute().Apply(Func(true), args);
+ Grid1.GetCompute().Apply(Func(true), args);
Assert.Fail();
}
@@ -270,7 +270,7 @@ namespace Apache.Ignite.Core.Tests.Compute
args.Add(1);
ICollection<object> ress =
- Grid1.Compute().Apply(Func(false), args, new Reducer(false));
+ Grid1.GetCompute().Apply(Func(false), args, new Reducer(false));
foreach (object res in ress)
CheckResult(res);
@@ -289,7 +289,7 @@ namespace Apache.Ignite.Core.Tests.Compute
try
{
- Grid1.Compute().Apply(Func(true), args, new Reducer(false));
+ Grid1.GetCompute().Apply(Func(true), args, new Reducer(false));
Assert.Fail();
}
@@ -312,7 +312,7 @@ namespace Apache.Ignite.Core.Tests.Compute
try
{
- Grid1.Compute().Apply(Func(false), args, new Reducer(true));
+ Grid1.GetCompute().Apply(Func(false), args, new Reducer(true));
Assert.Fail();
}
[2/5] ignite git commit: IGNITE-1499: Correct method naming
conventions on public API.
Posted by vo...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskResultTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskResultTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskResultTest.cs
index b67e854..e7c5ac9 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskResultTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskResultTest.cs
@@ -52,11 +52,11 @@ namespace Apache.Ignite.Core.Tests.Compute
{
TestTask<int> task = new TestTask<int>();
- int res = Grid1.Compute().Execute(task, new Tuple<bool, int>(true, 10));
+ int res = Grid1.GetCompute().Execute(task, new Tuple<bool, int>(true, 10));
Assert.AreEqual(10, res);
- res = Grid1.Compute().Execute(task, new Tuple<bool, int>(false, 11));
+ res = Grid1.GetCompute().Execute(task, new Tuple<bool, int>(false, 11));
Assert.AreEqual(11, res);
}
@@ -69,11 +69,11 @@ namespace Apache.Ignite.Core.Tests.Compute
{
TestTask<long> task = new TestTask<long>();
- long res = Grid1.Compute().Execute(task, new Tuple<bool, long>(true, 10000000000));
+ long res = Grid1.GetCompute().Execute(task, new Tuple<bool, long>(true, 10000000000));
Assert.AreEqual(10000000000, res);
- res = Grid1.Compute().Execute(task, new Tuple<bool, long>(false, 10000000001));
+ res = Grid1.GetCompute().Execute(task, new Tuple<bool, long>(false, 10000000001));
Assert.AreEqual(10000000001, res);
}
@@ -86,11 +86,11 @@ namespace Apache.Ignite.Core.Tests.Compute
{
TestTask<float> task = new TestTask<float>();
- float res = Grid1.Compute().Execute(task, new Tuple<bool, float>(true, 1.1f));
+ float res = Grid1.GetCompute().Execute(task, new Tuple<bool, float>(true, 1.1f));
Assert.AreEqual(1.1f, res);
- res = Grid1.Compute().Execute(task, new Tuple<bool, float>(false, -1.1f));
+ res = Grid1.GetCompute().Execute(task, new Tuple<bool, float>(false, -1.1f));
Assert.AreEqual(-1.1f, res);
}
@@ -105,13 +105,13 @@ namespace Apache.Ignite.Core.Tests.Compute
PortableResult val = new PortableResult(100);
- PortableResult res = Grid1.Compute().Execute(task, new Tuple<bool, PortableResult>(true, val));
+ PortableResult res = Grid1.GetCompute().Execute(task, new Tuple<bool, PortableResult>(true, val));
Assert.AreEqual(val.Val, res.Val);
val.Val = 101;
- res = Grid1.Compute().Execute(task, new Tuple<bool, PortableResult>(false, val));
+ res = Grid1.GetCompute().Execute(task, new Tuple<bool, PortableResult>(false, val));
Assert.AreEqual(val.Val, res.Val);
}
@@ -126,13 +126,13 @@ namespace Apache.Ignite.Core.Tests.Compute
SerializableResult val = new SerializableResult(100);
- SerializableResult res = Grid1.Compute().Execute(task, new Tuple<bool, SerializableResult>(true, val));
+ SerializableResult res = Grid1.GetCompute().Execute(task, new Tuple<bool, SerializableResult>(true, val));
Assert.AreEqual(val.Val, res.Val);
val.Val = 101;
- res = Grid1.Compute().Execute(task, new Tuple<bool, SerializableResult>(false, val));
+ res = Grid1.GetCompute().Execute(task, new Tuple<bool, SerializableResult>(false, val));
Assert.AreEqual(val.Val, res.Val);
}
@@ -145,12 +145,12 @@ namespace Apache.Ignite.Core.Tests.Compute
{
TestTask<byte[]> task = new TestTask<byte[]>();
- byte[] res = Grid1.Compute().Execute(task,
+ byte[] res = Grid1.GetCompute().Execute(task,
new Tuple<bool, byte[]>(true, new byte[100 * 1024]));
Assert.AreEqual(100 * 1024, res.Length);
- res = Grid1.Compute().Execute(task, new Tuple<bool, byte[]>(false, new byte[101 * 1024]));
+ res = Grid1.GetCompute().Execute(task, new Tuple<bool, byte[]>(false, new byte[101 * 1024]));
Assert.AreEqual(101 * 1024, res.Length);
}
@@ -167,7 +167,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestOutFuncResultPrimitive1()
{
- ICollection<int> res = Grid1.Compute().Broadcast(new PortableOutFunc());
+ ICollection<int> res = Grid1.GetCompute().Broadcast(new PortableOutFunc());
Assert.AreEqual(3, res.Count);
@@ -178,7 +178,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestOutFuncResultPrimitive2()
{
- ICollection<int> res = Grid1.Compute().Broadcast(new SerializableOutFunc());
+ ICollection<int> res = Grid1.GetCompute().Broadcast(new SerializableOutFunc());
Assert.AreEqual(3, res.Count);
@@ -189,7 +189,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestFuncResultPrimitive1()
{
- ICollection<int> res = Grid1.Compute().Broadcast(new PortableFunc(), 10);
+ ICollection<int> res = Grid1.GetCompute().Broadcast(new PortableFunc(), 10);
Assert.AreEqual(3, res.Count);
@@ -200,7 +200,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestFuncResultPrimitive2()
{
- ICollection<int> res = Grid1.Compute().Broadcast(new SerializableFunc(), 10);
+ ICollection<int> res = Grid1.GetCompute().Broadcast(new SerializableFunc(), 10);
Assert.AreEqual(3, res.Count);
@@ -351,11 +351,11 @@ namespace Apache.Ignite.Core.Tests.Compute
private static Guid GridId(string gridName)
{
if (gridName.Equals(Grid1Name))
- return Ignition.GetIgnite(Grid1Name).Cluster.LocalNode.Id;
+ return Ignition.GetIgnite(Grid1Name).GetCluster().GetLocalNode().Id;
if (gridName.Equals(Grid2Name))
- return Ignition.GetIgnite(Grid2Name).Cluster.LocalNode.Id;
+ return Ignition.GetIgnite(Grid2Name).GetCluster().GetLocalNode().Id;
if (gridName.Equals(Grid3Name))
- return Ignition.GetIgnite(Grid3Name).Cluster.LocalNode.Id;
+ return Ignition.GetIgnite(Grid3Name).GetCluster().GetLocalNode().Id;
Assert.Fail("Failed to find grid " + gridName);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTest.cs
index 3c1619b..245ed5f 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Dataload/DataStreamerTest.cs
@@ -56,7 +56,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
Ignition.Start(GetIgniteConfiguration(GridName + "_1"));
- _cache = _grid.Cache<int, int?>(CacheName);
+ _cache = _grid.GetCache<int, int?>(CacheName);
}
/// <summary>
@@ -92,7 +92,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
[Test]
public void TestPropertyPropagation()
{
- using (IDataStreamer<int, int> ldr = _grid.DataStreamer<int, int>(CacheName))
+ using (IDataStreamer<int, int> ldr = _grid.GetDataStreamer<int, int>(CacheName))
{
ldr.AllowOverwrite = true;
Assert.IsTrue(ldr.AllowOverwrite);
@@ -122,7 +122,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
[Test]
public void TestAddRemove()
{
- using (IDataStreamer<int, int> ldr = _grid.DataStreamer<int, int>(CacheName))
+ using (IDataStreamer<int, int> ldr = _grid.GetDataStreamer<int, int>(CacheName))
{
ldr.AllowOverwrite = true;
@@ -172,7 +172,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
[Test]
public void TestTryFlush()
{
- using (IDataStreamer<int, int> ldr = _grid.DataStreamer<int, int>(CacheName))
+ using (IDataStreamer<int, int> ldr = _grid.GetDataStreamer<int, int>(CacheName))
{
var fut = ldr.AddData(1, 1);
@@ -190,7 +190,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
[Test]
public void TestBufferSize()
{
- using (IDataStreamer<int, int> ldr = _grid.DataStreamer<int, int>(CacheName))
+ using (IDataStreamer<int, int> ldr = _grid.GetDataStreamer<int, int>(CacheName))
{
var fut = ldr.AddData(1, 1);
@@ -231,7 +231,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
[Test]
public void TestClose()
{
- using (IDataStreamer<int, int> ldr = _grid.DataStreamer<int, int>(CacheName))
+ using (IDataStreamer<int, int> ldr = _grid.GetDataStreamer<int, int>(CacheName))
{
var fut = ldr.AddData(1, 1);
@@ -249,7 +249,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
[Test]
public void TestCancel()
{
- using (IDataStreamer<int, int> ldr = _grid.DataStreamer<int, int>(CacheName))
+ using (IDataStreamer<int, int> ldr = _grid.GetDataStreamer<int, int>(CacheName))
{
var fut = ldr.AddData(1, 1);
@@ -267,7 +267,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
[Test]
public void TestFinalizer()
{
- var streamer = _grid.DataStreamer<int, int>(CacheName);
+ var streamer = _grid.GetDataStreamer<int, int>(CacheName);
var streamerRef = new WeakReference(streamer);
Assert.IsNotNull(streamerRef.Target);
@@ -287,7 +287,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
[Test]
public void TestAutoFlush()
{
- using (IDataStreamer<int, int> ldr = _grid.DataStreamer<int, int>(CacheName))
+ using (IDataStreamer<int, int> ldr = _grid.GetDataStreamer<int, int>(CacheName))
{
// Test auto flush turning on.
var fut = ldr.AddData(1, 1);
@@ -338,13 +338,13 @@ namespace Apache.Ignite.Core.Tests.Dataload
{
_cache.Clear();
- Assert.AreEqual(0, _cache.Size());
+ Assert.AreEqual(0, _cache.GetSize());
Stopwatch watch = new Stopwatch();
watch.Start();
- using (IDataStreamer<int, int> ldr = _grid.DataStreamer<int, int>(CacheName))
+ using (IDataStreamer<int, int> ldr = _grid.GetDataStreamer<int, int>(CacheName))
{
ldr.PerNodeBufferSize = 1024;
@@ -411,7 +411,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
/// </summary>
private void TestStreamReceiver(IStreamReceiver<int, int> receiver)
{
- using (var ldr = _grid.DataStreamer<int, int>(CacheName))
+ using (var ldr = _grid.GetDataStreamer<int, int>(CacheName))
{
ldr.AllowOverwrite = true;
@@ -438,9 +438,9 @@ namespace Apache.Ignite.Core.Tests.Dataload
public void TestStreamReceiverKeepPortable()
{
// ReSharper disable once LocalVariableHidesMember
- var cache = _grid.Cache<int, PortableEntry>(CacheName);
+ var cache = _grid.GetCache<int, PortableEntry>(CacheName);
- using (var ldr0 = _grid.DataStreamer<int, int>(CacheName))
+ using (var ldr0 = _grid.GetDataStreamer<int, int>(CacheName))
using (var ldr = ldr0.WithKeepPortable<int, IPortableObject>())
{
ldr.Receiver = new StreamReceiverKeepPortable();
@@ -448,7 +448,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
ldr.AllowOverwrite = true;
for (var i = 0; i < 100; i++)
- ldr.AddData(i, _grid.Portables().ToPortable<IPortableObject>(new PortableEntry {Val = i}));
+ ldr.AddData(i, _grid.GetPortables().ToPortable<IPortableObject>(new PortableEntry {Val = i}));
ldr.Flush();
@@ -517,7 +517,7 @@ namespace Apache.Ignite.Core.Tests.Dataload
/** <inheritdoc /> */
public void Receive(ICache<int, IPortableObject> cache, ICollection<ICacheEntry<int, IPortableObject>> entries)
{
- var portables = cache.Ignite.Portables();
+ var portables = cache.Ignite.GetPortables();
cache.PutAll(entries.ToDictionary(x => x.Key, x =>
portables.ToPortable<IPortableObject>(new PortableEntry
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
index 39b6b24..aa103d4 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
@@ -100,7 +100,7 @@ namespace Apache.Ignite.Core.Tests
[Test]
public void TestEnableDisable()
{
- var events = _grid1.Events();
+ var events = _grid1.GetEvents();
Assert.AreEqual(0, events.GetEnabledEvents().Length);
@@ -125,7 +125,7 @@ namespace Apache.Ignite.Core.Tests
[Test]
public void TestLocalListen()
{
- var events = _grid1.Events();
+ var events = _grid1.GetEvents();
var listener = EventsTestHelper.GetListener();
var eventType = EventType.EvtsTaskExecution;
@@ -164,7 +164,7 @@ namespace Apache.Ignite.Core.Tests
[Ignore("IGNITE-879")]
public void TestLocalListenRepeatedSubscription()
{
- var events = _grid1.Events();
+ var events = _grid1.GetEvents();
var listener = EventsTestHelper.GetListener();
var eventType = EventType.EvtsTaskExecution;
@@ -198,7 +198,7 @@ namespace Apache.Ignite.Core.Tests
[Test, TestCaseSource("TestCases")]
public void TestEventTypes(EventTestCase testCase)
{
- var events = _grid1.Events();
+ var events = _grid1.GetEvents();
events.EnableLocal(testCase.EventType);
@@ -236,7 +236,7 @@ namespace Apache.Ignite.Core.Tests
{
EventType = EventType.EvtsCache,
EventObjectType = typeof (CacheEvent),
- GenerateEvent = g => g.Cache<int, int>(null).Put(1, 1),
+ GenerateEvent = g => g.GetCache<int, int>(null).Put(1, 1),
VerifyEvents = (e, g) => VerifyCacheEvents(e, g),
EventCount = 1
};
@@ -282,7 +282,7 @@ namespace Apache.Ignite.Core.Tests
[Test]
public void TestLocalQuery()
{
- var events = _grid1.Events();
+ var events = _grid1.GetEvents();
var eventType = EventType.EvtsTaskExecution;
@@ -304,7 +304,7 @@ namespace Apache.Ignite.Core.Tests
[Test]
public void TestWaitForLocal([Values(true, false)] bool async)
{
- var events = _grid1.Events();
+ var events = _grid1.GetEvents();
var timeout = TimeSpan.FromSeconds(3);
@@ -374,11 +374,11 @@ namespace Apache.Ignite.Core.Tests
{
foreach (var g in _grids)
{
- g.Events().EnableLocal(EventType.EvtsJobExecution);
- g.Events().EnableLocal(EventType.EvtsTaskExecution);
+ g.GetEvents().EnableLocal(EventType.EvtsJobExecution);
+ g.GetEvents().EnableLocal(EventType.EvtsTaskExecution);
}
- var events = _grid1.Events();
+ var events = _grid1.GetEvents();
var expectedType = EventType.EvtJobStarted;
@@ -399,7 +399,7 @@ namespace Apache.Ignite.Core.Tests
CheckSend(3, typeof(JobEvent), expectedType);
- _grid3.Events().DisableLocal(EventType.EvtsJobExecution);
+ _grid3.GetEvents().DisableLocal(EventType.EvtsJobExecution);
CheckSend(2, typeof(JobEvent), expectedType);
@@ -433,9 +433,9 @@ namespace Apache.Ignite.Core.Tests
public void TestRemoteQuery([Values(true, false)] bool async)
{
foreach (var g in _grids)
- g.Events().EnableLocal(EventType.EvtsJobExecution);
+ g.GetEvents().EnableLocal(EventType.EvtsJobExecution);
- var events = _grid1.Events();
+ var events = _grid1.GetEvents();
var eventFilter = new RemoteEventFilter(EventType.EvtJobStarted);
@@ -469,8 +469,8 @@ namespace Apache.Ignite.Core.Tests
public void TestSerialization()
{
var grid = (Ignite) _grid1;
- var comp = (Impl.Compute.Compute) grid.Cluster.ForLocal().Compute();
- var locNode = grid.Cluster.LocalNode;
+ var comp = (Impl.Compute.Compute) grid.GetCluster().ForLocal().GetCompute();
+ var locNode = grid.GetCluster().GetLocalNode();
var expectedGuid = Guid.Parse("00000000-0000-0001-0000-000000000002");
var expectedGridGuid = new IgniteGuid(expectedGuid, 3);
@@ -540,7 +540,7 @@ namespace Apache.Ignite.Core.Tests
var discoEvent = EventReader.Read<DiscoveryEvent>(reader);
CheckEventBase(discoEvent);
Assert.AreEqual(grid.TopologyVersion, discoEvent.TopologyVersion);
- Assert.AreEqual(grid.Nodes(), discoEvent.TopologyNodes);
+ Assert.AreEqual(grid.GetNodes(), discoEvent.TopologyNodes);
var jobEvent = EventReader.Read<JobEvent>(reader);
CheckEventBase(jobEvent);
@@ -571,7 +571,7 @@ namespace Apache.Ignite.Core.Tests
/// <param name="evt">The evt.</param>
private void CheckEventBase(IEvent evt)
{
- var locNode = _grid1.Cluster.LocalNode;
+ var locNode = _grid1.GetCluster().GetLocalNode();
Assert.AreEqual(locNode, evt.Node);
Assert.AreEqual("msg", evt.Message);
@@ -637,7 +637,7 @@ namespace Apache.Ignite.Core.Tests
/// </summary>
private void GenerateTaskEvent(IIgnite grid = null)
{
- (grid ?? _grid1).Compute().Broadcast(new ComputeAction());
+ (grid ?? _grid1).GetCompute().Broadcast(new ComputeAction());
}
/// <summary>
@@ -658,7 +658,7 @@ namespace Apache.Ignite.Core.Tests
/// </summary>
private static void GenerateCacheQueryEvent(IIgnite g)
{
- var cache = g.Cache<int, int>(null);
+ var cache = g.GetCache<int, int>(null);
cache.Clear();
@@ -679,8 +679,8 @@ namespace Apache.Ignite.Core.Tests
Assert.AreEqual(null, cacheEvent.CacheName);
Assert.AreEqual(null, cacheEvent.ClosureClassName);
Assert.AreEqual(null, cacheEvent.TaskName);
- Assert.AreEqual(grid.Cluster.LocalNode, cacheEvent.EventNode);
- Assert.AreEqual(grid.Cluster.LocalNode, cacheEvent.Node);
+ Assert.AreEqual(grid.GetCluster().GetLocalNode(), cacheEvent.EventNode);
+ Assert.AreEqual(grid.GetCluster().GetLocalNode(), cacheEvent.Node);
Assert.AreEqual(false, cacheEvent.HasOldValue);
Assert.AreEqual(null, cacheEvent.OldValue);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/ExceptionsTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/ExceptionsTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/ExceptionsTest.cs
index d90067f..7a5a725 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/ExceptionsTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/ExceptionsTest.cs
@@ -62,7 +62,7 @@ namespace Apache.Ignite.Core.Tests
try
{
- grid.Cache<object, object>("invalidCacheName");
+ grid.GetCache<object, object>("invalidCacheName");
Assert.Fail();
}
@@ -73,7 +73,7 @@ namespace Apache.Ignite.Core.Tests
try
{
- grid.Cluster.ForRemotes().Metrics();
+ grid.GetCluster().ForRemotes().GetMetrics();
Assert.Fail();
}
@@ -86,7 +86,7 @@ namespace Apache.Ignite.Core.Tests
try
{
- grid.Cache<object, object>("cache1");
+ grid.GetCache<object, object>("cache1");
Assert.Fail();
}
@@ -118,7 +118,7 @@ namespace Apache.Ignite.Core.Tests
public void TestPartialUpdateExceptionPortable()
{
// User type
- TestPartialUpdateException(false, (x, g) => g.Portables().ToPortable<IPortableObject>(new PortableEntry(x)));
+ TestPartialUpdateException(false, (x, g) => g.GetPortables().ToPortable<IPortableObject>(new PortableEntry(x)));
}
/// <summary>
@@ -205,7 +205,7 @@ namespace Apache.Ignite.Core.Tests
[Category(TestUtils.CategoryIntensive)]
public void TestPartialUpdateExceptionAsyncPortable()
{
- TestPartialUpdateException(true, (x, g) => g.Portables().ToPortable<IPortableObject>(new PortableEntry(x)));
+ TestPartialUpdateException(true, (x, g) => g.GetPortables().ToPortable<IPortableObject>(new PortableEntry(x)));
}
/// <summary>
@@ -215,7 +215,7 @@ namespace Apache.Ignite.Core.Tests
{
using (var grid = StartGrid())
{
- var cache = grid.Cache<TK, int>("partitioned_atomic").WithNoRetries();
+ var cache = grid.GetCache<TK, int>("partitioned_atomic").WithNoRetries();
if (async)
cache = cache.WithAsync();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
index e4530cb..abb296c 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/ExecutableTest.cs
@@ -175,10 +175,10 @@ namespace Apache.Ignite.Core.Tests
Assert.IsTrue(_grid.WaitTopology(2, 30000));
- var minMem = _grid.Cluster.ForRemotes().Compute().ExecuteJavaTask<long>(MinMemTask, null);
+ var minMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MinMemTask, null);
Assert.AreEqual((long) 506*1024*1024, minMem);
- var maxMem = _grid.Cluster.ForRemotes().Compute().ExecuteJavaTask<long>(MaxMemTask, null);
+ var maxMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MaxMemTask, null);
AssertJvmMaxMemory((long) 607*1024*1024, maxMem);
}
@@ -197,10 +197,10 @@ namespace Apache.Ignite.Core.Tests
Assert.IsTrue(_grid.WaitTopology(2, 30000));
- var minMem = _grid.Cluster.ForRemotes().Compute().ExecuteJavaTask<long>(MinMemTask, null);
+ var minMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MinMemTask, null);
Assert.AreEqual((long) 615*1024*1024, minMem);
- var maxMem = _grid.Cluster.ForRemotes().Compute().ExecuteJavaTask<long>(MaxMemTask, null);
+ var maxMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MaxMemTask, null);
AssertJvmMaxMemory((long) 863*1024*1024, maxMem);
}
@@ -219,10 +219,10 @@ namespace Apache.Ignite.Core.Tests
Assert.IsTrue(_grid.WaitTopology(2, 30000));
- var minMem = _grid.Cluster.ForRemotes().Compute().ExecuteJavaTask<long>(MinMemTask, null);
+ var minMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MinMemTask, null);
Assert.AreEqual((long) 601*1024*1024, minMem);
- var maxMem = _grid.Cluster.ForRemotes().Compute().ExecuteJavaTask<long>(MaxMemTask, null);
+ var maxMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MaxMemTask, null);
AssertJvmMaxMemory((long) 702*1024*1024, maxMem);
proc.Kill();
@@ -236,10 +236,10 @@ namespace Apache.Ignite.Core.Tests
Assert.IsTrue(_grid.WaitTopology(2, 30000));
- minMem = _grid.Cluster.ForRemotes().Compute().ExecuteJavaTask<long>(MinMemTask, null);
+ minMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MinMemTask, null);
Assert.AreEqual((long) 605*1024*1024, minMem);
- maxMem = _grid.Cluster.ForRemotes().Compute().ExecuteJavaTask<long>(MaxMemTask, null);
+ maxMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MaxMemTask, null);
AssertJvmMaxMemory((long) 706*1024*1024, maxMem);
}
@@ -261,10 +261,10 @@ namespace Apache.Ignite.Core.Tests
Assert.IsTrue(_grid.WaitTopology(2, 30000));
// Raw JVM options (Xms/Xmx) should override custom options
- var minMem = _grid.Cluster.ForRemotes().Compute().ExecuteJavaTask<long>(MinMemTask, null);
+ var minMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MinMemTask, null);
Assert.AreEqual((long) 555*1024*1024, minMem);
- var maxMem = _grid.Cluster.ForRemotes().Compute().ExecuteJavaTask<long>(MaxMemTask, null);
+ var maxMem = _grid.GetCluster().ForRemotes().GetCompute().ExecuteJavaTask<long>(MaxMemTask, null);
AssertJvmMaxMemory((long) 666*1024*1024, maxMem);
}
@@ -274,7 +274,7 @@ namespace Apache.Ignite.Core.Tests
/// <returns>Configuration.</returns>
private RemoteConfiguration RemoteConfig()
{
- return _grid.Cluster.ForRemotes().Compute().Call(new RemoteConfigurationClosure());
+ return _grid.GetCluster().ForRemotes().GetCompute().Call(new RemoteConfigurationClosure());
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/FutureTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/FutureTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/FutureTest.cs
index c2815db..993c604 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/FutureTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/FutureTest.cs
@@ -57,9 +57,9 @@ namespace Apache.Ignite.Core.Tests
}
});
- _cache = grid.Cache<object, object>(null).WithAsync();
+ _cache = grid.GetCache<object, object>(null).WithAsync();
- _compute = grid.Compute().WithAsync();
+ _compute = grid.GetCompute().WithAsync();
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/IgniteStartStopTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/IgniteStartStopTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/IgniteStartStopTest.cs
index 2db1781..bd776ce 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/IgniteStartStopTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/IgniteStartStopTest.cs
@@ -64,7 +64,7 @@ namespace Apache.Ignite.Core.Tests
Assert.IsNotNull(grid);
- Assert.AreEqual(1, grid.Cluster.Nodes().Count);
+ Assert.AreEqual(1, grid.GetCluster().GetNodes().Count);
}
/// <summary>
@@ -83,7 +83,7 @@ namespace Apache.Ignite.Core.Tests
Assert.IsNotNull(grid);
- Assert.AreEqual(1, grid.Cluster.Nodes().Count);
+ Assert.AreEqual(1, grid.GetCluster().GetNodes().Count);
}
/// <summary>
@@ -235,13 +235,13 @@ namespace Apache.Ignite.Core.Tests
var grid = Ignition.Start(cfg);
- Assert.IsNotNull(grid.Cache<int, int>("cache1"));
+ Assert.IsNotNull(grid.GetCache<int, int>("cache1"));
grid.Dispose();
try
{
- grid.Cache<int, int>("cache1");
+ grid.GetCache<int, int>("cache1");
Assert.Fail();
}
@@ -334,18 +334,18 @@ namespace Apache.Ignite.Core.Tests
private static void UseIgnite(IIgnite ignite)
{
// Create objects holding references to java objects.
- var comp = ignite.Compute();
+ var comp = ignite.GetCompute();
// ReSharper disable once RedundantAssignment
comp = comp.WithKeepPortable();
- var prj = ignite.Cluster.ForOldest();
+ var prj = ignite.GetCluster().ForOldest();
- Assert.IsTrue(prj.Nodes().Count > 0);
+ Assert.IsTrue(prj.GetNodes().Count > 0);
- Assert.IsNotNull(prj.Compute());
+ Assert.IsNotNull(prj.GetCompute());
- var cache = ignite.Cache<int, int>("cache1");
+ var cache = ignite.GetCache<int, int>("cache1");
Assert.IsNotNull(cache);
@@ -388,9 +388,9 @@ namespace Apache.Ignite.Core.Tests
while (!token.IsCancellationRequested)
{
- var listenId = grid.Message().RemoteListen(filter);
+ var listenId = grid.GetMessaging().RemoteListen(filter);
- grid.Message().StopRemoteListen(listenId);
+ grid.GetMessaging().StopRemoteListen(listenId);
}
// ReSharper disable once FunctionNeverReturns
});
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/LifecycleTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/LifecycleTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/LifecycleTest.cs
index 3c38ef9..84f446c 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/LifecycleTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/LifecycleTest.cs
@@ -128,7 +128,7 @@ namespace Apache.Ignite.Core.Tests
CheckEvent(AfterStartEvts[3], grid, grid, 0, null);
// 2. Test Java start events.
- IList<int> res = grid.Compute().ExecuteJavaTask<IList<int>>(
+ IList<int> res = grid.GetCompute().ExecuteJavaTask<IList<int>>(
"org.apache.ignite.platform.lifecycle.PlatformJavaLifecycleTask", null);
Assert.AreEqual(2, res.Count);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/MessagingTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/MessagingTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/MessagingTest.cs
index abb8e2f..95e48d3 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/MessagingTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/MessagingTest.cs
@@ -94,7 +94,7 @@ namespace Apache.Ignite.Core.Tests
[SuppressMessage("ReSharper", "AccessToModifiedClosure")]
public void TestLocalListen(object topic)
{
- var messaging = _grid1.Message();
+ var messaging = _grid1.GetMessaging();
var listener = MessagingTestHelper.GetListener();
messaging.LocalListen(listener, topic);
@@ -161,9 +161,9 @@ namespace Apache.Ignite.Core.Tests
return true;
});
- _grid3.Message().LocalListen(grid3Listener, topic);
+ _grid3.GetMessaging().LocalListen(grid3Listener, topic);
- var clusterMessaging = _grid1.Cluster.ForNodes(_grid1.Cluster.LocalNode, _grid2.Cluster.LocalNode).Message();
+ var clusterMessaging = _grid1.GetCluster().ForNodes(_grid1.GetCluster().GetLocalNode(), _grid2.GetCluster().GetLocalNode()).GetMessaging();
var clusterListener = MessagingTestHelper.GetListener();
clusterMessaging.LocalListen(clusterListener, topic);
@@ -174,7 +174,7 @@ namespace Apache.Ignite.Core.Tests
Assert.IsFalse(grid3GotMessage, "Grid3 should not get messages");
clusterMessaging.StopLocalListen(clusterListener, topic);
- _grid3.Message().StopLocalListen(grid3Listener, topic);
+ _grid3.GetMessaging().StopLocalListen(grid3Listener, topic);
}
/// <summary>
@@ -188,7 +188,7 @@ namespace Apache.Ignite.Core.Tests
const int threadCnt = 20;
const int runSeconds = 20;
- var messaging = _grid1.Message();
+ var messaging = _grid1.GetMessaging();
var senders = Task.Factory.StartNew(() => TestUtils.RunMultiThreaded(() =>
{
@@ -287,7 +287,7 @@ namespace Apache.Ignite.Core.Tests
/// </summary>
public void TestRemoteListen(object topic, bool async = false)
{
- var messaging = async ? _grid1.Message().WithAsync() : _grid1.Message();
+ var messaging = async ? _grid1.GetMessaging().WithAsync() : _grid1.GetMessaging();
var listener = MessagingTestHelper.GetListener();
var listenId = messaging.RemoteListen(listener, topic);
@@ -345,7 +345,7 @@ namespace Apache.Ignite.Core.Tests
/// </summary>
private void TestRemoteListenProjection(object topic)
{
- var clusterMessaging = _grid1.Cluster.ForNodes(_grid1.Cluster.LocalNode, _grid2.Cluster.LocalNode).Message();
+ var clusterMessaging = _grid1.GetCluster().ForNodes(_grid1.GetCluster().GetLocalNode(), _grid2.GetCluster().GetLocalNode()).GetMessaging();
var clusterListener = MessagingTestHelper.GetListener();
var listenId = clusterMessaging.RemoteListen(clusterListener, topic);
@@ -366,7 +366,7 @@ namespace Apache.Ignite.Core.Tests
const int threadCnt = 20;
const int runSeconds = 20;
- var messaging = _grid1.Message();
+ var messaging = _grid1.GetMessaging();
var senders = Task.Factory.StartNew(() => TestUtils.RunMultiThreaded(() =>
{
@@ -428,12 +428,12 @@ namespace Apache.Ignite.Core.Tests
else
{
grid = grid ?? _grid1;
- msg = grid.Message();
- cluster = grid.Cluster.ForLocal();
+ msg = grid.GetMessaging();
+ cluster = grid.GetCluster().ForLocal();
}
// Messages will repeat due to multiple nodes listening
- var expectedRepeat = repeatMultiplier * (remoteListen ? cluster.Nodes().Count : 1);
+ var expectedRepeat = repeatMultiplier * (remoteListen ? cluster.GetNodes().Count : 1);
var messages = Enumerable.Range(1, 10).Select(x => NextMessage()).OrderBy(x => x).ToList();
@@ -468,7 +468,7 @@ namespace Apache.Ignite.Core.Tests
// this will result in an exception in case of a message
MessagingTestHelper.ClearReceived(0);
- (grid ?? _grid1).Message().Send(NextMessage(), topic);
+ (grid ?? _grid1).GetMessaging().Send(NextMessage(), topic);
Thread.Sleep(MessagingTestHelper.MessageTimeout);
@@ -559,7 +559,7 @@ namespace Apache.Ignite.Core.Tests
Assert.AreEqual(expectedMessages, resultFunc(ReceivedMessages));
// check that all messages came from local node.
- var localNodeId = cluster.Ignite.Cluster.LocalNode.Id;
+ var localNodeId = cluster.Ignite.GetCluster().GetLocalNode().Id;
Assert.AreEqual(localNodeId, LastNodeIds.Distinct().Single());
AssertFailures();
[5/5] ignite git commit: IGNITE-1499: Correct method naming
conventions on public API.
Posted by vo...@apache.org.
IGNITE-1499: Correct method naming conventions on public API.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c5fd4a5b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c5fd4a5b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c5fd4a5b
Branch: refs/heads/ignite-1282
Commit: c5fd4a5b19e06241bd15e749a4b8fcf156c82f45
Parents: 837de67
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Thu Sep 17 16:27:40 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Sep 17 16:27:40 2015 +0300
----------------------------------------------------------------------
.../dotnet/Apache.Ignite.Core/Cache/ICache.cs | 10 +-
.../Apache.Ignite.Core/Cache/ICacheAffinity.cs | 17 +-
.../Query/Continuous/IContinuousQueryHandle.cs | 6 -
.../Apache.Ignite.Core/Cluster/ICluster.cs | 7 +-
.../Apache.Ignite.Core/Cluster/IClusterGroup.cs | 28 +-
.../Cluster/IClusterMetrics.cs | 2 +-
.../Apache.Ignite.Core/Cluster/IClusterNode.cs | 49 +-
.../Apache.Ignite.Core/Compute/ICompute.cs | 7 +-
.../main/dotnet/Apache.Ignite.Core/IIgnite.cs | 48 +-
.../Impl/Cache/CacheAffinityImpl.cs | 10 +-
.../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs | 17 +-
.../Impl/Cache/CacheProxyImpl.cs | 17 +-
.../Continuous/ContinuousQueryHandleImpl.cs | 6 -
.../Impl/Cluster/ClusterGroupImpl.cs | 22 +-
.../Impl/Cluster/ClusterNodeImpl.cs | 6 +-
.../Impl/Compute/ComputeImpl.cs | 4 +-
.../Impl/Compute/ComputeJobHolder.cs | 2 +-
.../dotnet/Apache.Ignite.Core/Impl/Ignite.cs | 100 +---
.../Apache.Ignite.Core/Impl/IgniteProxy.cs | 126 ++--
.../Portable/Metadata/PortableMetadataImpl.cs | 2 +-
.../Impl/Portable/PortableBuilderImpl.cs | 2 +-
.../Impl/Portable/PortableUserObject.cs | 8 +-
.../Impl/Portable/PortableUtils.cs | 8 +-
.../Impl/Portable/PortablesImpl.cs | 10 +-
.../Portable/IPortableBuilder.cs | 3 +-
.../Portable/IPortableIdMapper.cs | 4 +-
.../Portable/IPortableMetadata.cs | 17 +-
.../Portable/IPortableNameMapper.cs | 4 +-
.../Portable/IPortableObject.cs | 30 +-
.../Apache.Ignite.Core/Portable/IPortables.cs | 6 +-
.../Cache/CacheAbstractTest.cs | 156 ++---
.../Cache/CacheAffinityTest.cs | 8 +-
.../Cache/CacheDynamicStartTest.cs | 14 +-
.../Cache/CacheForkedTest.cs | 2 +-
.../Cache/CacheTestAsyncWrapper.cs | 17 +-
.../Cache/Query/CacheQueriesTest.cs | 26 +-
.../Continuous/ContinuousQueryAbstractTest.cs | 14 +-
.../Cache/Store/CacheParallelLoadStoreTest.cs | 6 +-
.../Cache/Store/CacheStoreSessionTest.cs | 10 +-
.../Cache/Store/CacheStoreTest.cs | 50 +-
.../Compute/AbstractTaskTest.cs | 4 +-
.../Compute/ClosureTaskTest.cs | 32 +-
.../Compute/ComputeApiTest.cs | 576 +++++++++----------
.../Compute/ComputeMultithreadedTest.cs | 14 +-
.../Compute/FailoverTaskSelfTest.cs | 6 +-
.../Compute/IgniteExceptionTaskSelfTest.cs | 6 +-
.../Compute/PortableTaskTest.cs | 14 +-
.../Compute/ResourceTaskTest.cs | 16 +-
.../Compute/TaskAdapterTest.cs | 14 +-
.../Compute/TaskResultTest.cs | 38 +-
.../Dataload/DataStreamerTest.cs | 32 +-
.../Apache.Ignite.Core.Tests/EventsTest.cs | 42 +-
.../Apache.Ignite.Core.Tests/ExceptionsTest.cs | 12 +-
.../Apache.Ignite.Core.Tests/ExecutableTest.cs | 22 +-
.../Apache.Ignite.Core.Tests/FutureTest.cs | 4 +-
.../IgniteStartStopTest.cs | 22 +-
.../Apache.Ignite.Core.Tests/LifecycleTest.cs | 2 +-
.../Apache.Ignite.Core.Tests/MessagingTest.cs | 26 +-
.../Portable/PortableApiSelfTest.cs | 550 +++++++++---------
.../Portable/PortableSelfTest.cs | 32 +-
.../PortableConfigurationTest.cs | 2 +-
.../SerializationTest.cs | 8 +-
.../Services/ServicesTest.cs | 50 +-
.../Services/ServicesTestAsync.cs | 2 +-
.../Apache.Ignite.Core.Tests/TestUtils.cs | 2 +-
65 files changed, 1147 insertions(+), 1262 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/ICache.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/ICache.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/ICache.cs
index 3ee812a..5116839 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/ICache.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/ICache.cs
@@ -29,7 +29,7 @@ namespace Apache.Ignite.Core.Cache
/// <summary>
/// Main entry point for Ignite cache APIs. You can get a named cache by calling
- /// <see cref="IIgnite.Cache{K, V}(string)"/> method.
+ /// <see cref="IIgnite.GetCache{TK,TV}"/> method.
/// <para />
/// Cache API supports distributed transactions. All <c>Get(...)</c>, <c>Put(...)</c>, <c>Replace(...)</c>,
/// and <c>Remove(...)</c> operations are transactional and will participate in an ongoing transaction,
@@ -68,12 +68,12 @@ namespace Apache.Ignite.Core.Cache
/// <para />
/// Semantically equals to <c>ICache.Size(CachePeekMode.PRIMARY) == 0</c>.
/// </summary>
- bool IsEmpty { get; }
+ bool IsEmpty();
/// <summary>
/// Gets a value indicating whether to keep values in portable form.
/// </summary>
- bool KeepPortable { get; }
+ bool IsKeepPortable { get; }
/// <summary>
/// Get another cache instance with read-through and write-through behavior disabled.
@@ -384,7 +384,7 @@ namespace Apache.Ignite.Core.Cache
/// </summary>
/// <param name="modes">Optional peek modes. If not provided, then total cache size is returned.</param>
/// <returns>Cache size on this node.</returns>
- int LocalSize(params CachePeekMode[] modes);
+ int GetLocalSize(params CachePeekMode[] modes);
/// <summary>
/// Gets the number of all entries cached across all nodes.
@@ -394,7 +394,7 @@ namespace Apache.Ignite.Core.Cache
/// <param name="modes">Optional peek modes. If not provided, then total cache size is returned.</param>
/// <returns>Cache size across all nodes.</returns>
[AsyncSupported]
- int Size(params CachePeekMode[] modes);
+ int GetSize(params CachePeekMode[] modes);
/// <summary>
/// This method unswaps cache entries by given keys, if any, from swap storage into memory.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/ICacheAffinity.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/ICacheAffinity.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/ICacheAffinity.cs
index 03a4e50..64f34d7 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/ICacheAffinity.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/ICacheAffinity.cs
@@ -23,7 +23,7 @@ namespace Apache.Ignite.Core.Cache
/// <summary>
/// Provides affinity information to detect which node is primary and which nodes are
/// backups for a partitioned cache. You can get an instance of this interface by calling
- /// <see cref="IIgnite.Affinity(string)"/> method.
+ /// <see cref="IIgnite.GetAffinity"/> method.
/// <para />
/// Mapping of a key to a node is a three-step operation. First step will get an affinity key for
/// given key using <c>CacheAffinityKeyMapper</c>. If mapper is not specified, the original key
@@ -43,17 +43,14 @@ namespace Apache.Ignite.Core.Cache
/// Gets number of partitions in cache according to configured affinity function.
/// </summary>
/// <returns>Number of cache partitions.</returns>
- int Partitions
- {
- get;
- }
+ int Partitions { get; }
/// <summary>
/// Gets partition id for the given key.
/// </summary>
/// <param name="key">Key to get partition id for.</param>
/// <returns>Partition id.</returns>
- int Partition<TK>(TK key);
+ int GetPartition<TK>(TK key);
/// <summary>
/// Returns 'true' if given node is the primary node for given key.
@@ -85,7 +82,7 @@ namespace Apache.Ignite.Core.Cache
/// </summary>
/// <param name="n">Node.</param>
/// <returns>Partition ids for which given projection has primary ownership.</returns>
- int[] PrimaryPartitions(IClusterNode n);
+ int[] GetPrimaryPartitions(IClusterNode n);
/// <summary>
/// Gets partition ids for which nodes of the given projection has backup
@@ -93,7 +90,7 @@ namespace Apache.Ignite.Core.Cache
/// </summary>
/// <param name="n">Node.</param>
/// <returns>Partition ids for which given projection has backup ownership.</returns>
- int[] BackupPartitions(IClusterNode n);
+ int[] GetBackupPartitions(IClusterNode n);
/// <summary>
/// Gets partition ids for which nodes of the given projection has ownership
@@ -101,14 +98,14 @@ namespace Apache.Ignite.Core.Cache
/// </summary>
/// <param name="n">Node.</param>
/// <returns>Partition ids for which given projection has ownership.</returns>
- int[] AllPartitions(IClusterNode n);
+ int[] GetAllPartitions(IClusterNode n);
/// <summary>
/// Maps passed in key to a key which will be used for node affinity.
/// </summary>
/// <param name="key">Key to map.</param>
/// <returns>Key to be used for node-to-affinity mapping (may be the same key as passed in).</returns>
- TR AffinityKey<TK, TR>(TK key);
+ TR GetAffinityKey<TK, TR>(TK key);
/// <summary>
/// This method provides ability to detect which keys are mapped to which nodes.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/IContinuousQueryHandle.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/IContinuousQueryHandle.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/IContinuousQueryHandle.cs
index 0a6f154..03f8e05 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/IContinuousQueryHandle.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cache/Query/Continuous/IContinuousQueryHandle.cs
@@ -37,12 +37,6 @@ namespace Apache.Ignite.Core.Cache.Query.Continuous
{
/// <summary>
/// Gets the cursor for initial query.
- /// </summary>
- [Obsolete("GetInitialQueryCursor() method should be used instead.")]
- IQueryCursor<T> InitialQueryCursor { get; }
-
- /// <summary>
- /// Gets the cursor for initial query.
/// Can be called only once, throws exception on consequent calls.
/// </summary>
/// <returns>Initial query cursor.</returns>
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/ICluster.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/ICluster.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/ICluster.cs
index 405375e..02d9a78 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/ICluster.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/ICluster.cs
@@ -38,10 +38,7 @@ namespace Apache.Ignite.Core.Cluster
/// Gets local Ignite node.
/// </summary>
/// <returns>Local Ignite node.</returns>
- IClusterNode LocalNode
- {
- get;
- }
+ IClusterNode GetLocalNode();
/// <summary>
/// Pings a remote node.
@@ -70,7 +67,7 @@ namespace Apache.Ignite.Core.Cluster
/// <exception cref="IgniteException">If underlying SPI implementation does not support
/// topology history. Currently only <code>org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi</code>
/// supports topology history.</exception>
- ICollection<IClusterNode> Topology(long ver);
+ ICollection<IClusterNode> GetTopology(long ver);
/// <summary>
/// Resets local I/O, job, and task execution metrics.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterGroup.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterGroup.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterGroup.cs
index 21d6931..433ba40 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterGroup.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterGroup.cs
@@ -47,18 +47,16 @@ namespace Apache.Ignite.Core.Cluster
/// var workerNodes = g.ForAttribute("group", "worker");
/// </code>
/// Grid projection provides functionality for executing tasks and closures over
- /// nodes in this projection using <see cref="IClusterGroup.Compute()"/>.
+ /// nodes in this projection using <see cref="GetCompute"/>.
/// <para/>
/// All members are thread-safe and may be used concurrently from multiple threads.
/// </summary>
- public interface IClusterGroup {
+ public interface IClusterGroup
+ {
/// <summary>
- /// Instance of grid.
+ /// Instance of Ignite.
/// </summary>
- IIgnite Ignite
- {
- get;
- }
+ IIgnite Ignite { get; }
/// <summary>
/// Gets compute functionality over this grid projection. All operations
@@ -66,7 +64,7 @@ namespace Apache.Ignite.Core.Cluster
/// this projection.
/// </summary>
/// <returns>Compute instance over this grid projection.</returns>
- ICompute Compute();
+ ICompute GetCompute();
/// <summary>
/// Creates a grid projection over a given set of nodes.
@@ -183,7 +181,7 @@ namespace Apache.Ignite.Core.Cluster
/// Gets read-only collections of nodes in this projection.
/// </summary>
/// <returns>All nodes in this projection.</returns>
- ICollection<IClusterNode> Nodes();
+ ICollection<IClusterNode> GetNodes();
/// <summary>
/// Gets a node for given ID from this grid projection.
@@ -191,39 +189,39 @@ namespace Apache.Ignite.Core.Cluster
/// <param name="id">Node ID.</param>
/// <returns>Node with given ID from this projection or null if such node does not
/// exist in this projection.</returns>
- IClusterNode Node(Guid id);
+ IClusterNode GetNode(Guid id);
/// <summary>
/// Gets first node from the list of nodes in this projection.
/// </summary>
/// <returns>Node.</returns>
- IClusterNode Node();
+ IClusterNode GetNode();
/// <summary>
/// Gets a metrics snapshot for this projection
/// </summary>
/// <returns>Grid projection metrics snapshot.</returns>
- IClusterMetrics Metrics();
+ IClusterMetrics GetMetrics();
/// <summary>
/// Gets messaging facade over nodes within this cluster group. All operations on the returned
/// <see cref="IMessaging"/>> instance will only include nodes from current cluster group.
/// </summary>
/// <returns>Messaging instance over this cluster group.</returns>
- IMessaging Message();
+ IMessaging GetMessaging();
/// <summary>
/// Gets events facade over nodes within this cluster group. All operations on the returned
/// <see cref="IEvents"/>> instance will only include nodes from current cluster group.
/// </summary>
/// <returns>Events instance over this cluster group.</returns>
- IEvents Events();
+ IEvents GetEvents();
/// <summary>
/// Gets services facade over nodes within this cluster group. All operations on the returned
/// <see cref="IServices"/>> instance will only include nodes from current cluster group.
/// </summary>
/// <returns>Services instance over this cluster group.</returns>
- IServices Services();
+ IServices GetServices();
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterMetrics.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterMetrics.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterMetrics.cs
index 24f0249..4ea690c 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterMetrics.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterMetrics.cs
@@ -26,7 +26,7 @@ namespace Apache.Ignite.Core.Cluster
/// in combination with fail-over SPI could check if other nodes don't have
/// any active or waiting jobs and fail-over some jobs to those nodes.
/// <para />
- /// Node metrics for any node can be accessed via <see cref="IClusterNode.Metrics()"/>
+ /// Node metrics for any node can be accessed via <see cref="IClusterNode.GetMetrics"/>
/// method. Keep in mind that there will be a certain network delay (usually
/// equal to heartbeat delay) for the accuracy of node metrics. However, when accessing
/// metrics on local node the metrics are always accurate and up to date.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterNode.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterNode.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterNode.cs
index dfdccef..11b4c4a 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterNode.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Cluster/IClusterNode.cs
@@ -21,9 +21,9 @@ namespace Apache.Ignite.Core.Cluster
using System.Collections.Generic;
/// <summary>
- /// Interface representing a single cluster node. Use <see cref="IClusterNode.Attribute{T}(string)"/> or
- /// <see cref="IClusterNode.Metrics()"/> to get static and dynamic information about remote nodes.
- /// You can get a list of all nodes in grid by calling <see cref="IClusterGroup.Nodes()"/>
+ /// Interface representing a single cluster node. Use <see cref="GetAttribute{T}"/> or
+ /// <see cref="GetMetrics"/> to get static and dynamic information about remote nodes.
+ /// You can get a list of all nodes in grid by calling <see cref="IClusterGroup.GetNodes"/>
/// on <see cref="IIgnite"/> instance.
/// <para />
/// You can use Ignite node attributes to provide static information about a node.
@@ -32,14 +32,12 @@ namespace Apache.Ignite.Core.Cluster
/// <para/>
/// All members are thread-safe and may be used concurrently from multiple threads.
/// </summary>
- public interface IClusterNode {
+ public interface IClusterNode
+ {
/// <summary>
/// Globally unique node ID. A new ID is generated every time a node restarts.
/// </summary>
- Guid Id
- {
- get;
- }
+ Guid Id { get; }
/// <summary>
/// Gets node's attribute. Attributes are assigned to nodes at startup.
@@ -48,8 +46,8 @@ namespace Apache.Ignite.Core.Cluster
/// </summary>
/// <param name="name">Attribute name.</param>
/// <returns>Attribute value.</returns>
- T Attribute<T>(string name);
-
+ T GetAttribute<T>(string name);
+
/// <summary>
/// Try getting node's attribute. Attributes are assigned to nodes at startup.
/// <para />
@@ -66,25 +64,19 @@ namespace Apache.Ignite.Core.Cluster
/// Note that attributes cannot be changed at runtime.
/// </summary>
/// <returns>All node attributes.</returns>
- IDictionary<string, object> Attributes();
+ IDictionary<string, object> GetAttributes();
/// <summary>
/// Collection of addresses this node is known by.
/// </summary>
/// <returns>Collection of addresses.</returns>
- ICollection<string> Addresses
- {
- get;
- }
+ ICollection<string> Addresses { get; }
/// <summary>
/// Collection of host names this node is known by.
/// </summary>
/// <returns>Collection of host names.</returns>
- ICollection<string> HostNames
- {
- get;
- }
+ ICollection<string> HostNames { get; }
/// <summary>
/// Node order within grid topology. Discovery SPIs that support node ordering will
@@ -92,19 +84,13 @@ namespace Apache.Ignite.Core.Cluster
/// for new nodes will come in proper order. All other SPIs not supporting ordering
/// may choose to return node startup time here.
/// </summary>
- long Order
- {
- get;
- }
+ long Order { get; }
/// <summary>
/// Tests whether or not this node is a local node.
/// </summary>
- bool IsLocal
- {
- get;
- }
-
+ bool IsLocal { get; }
+
/// <summary>
/// Tests whether or not this node is a daemon.
/// <p/>
@@ -118,10 +104,7 @@ namespace Apache.Ignite.Core.Cluster
/// <p/>
/// Application code should never use daemon nodes.
/// </summary>
- bool IsDaemon
- {
- get;
- }
+ bool IsDaemon { get; }
/// <summary>
/// Gets metrics snapshot for this node. Note that node metrics are constantly updated
@@ -133,6 +116,6 @@ namespace Apache.Ignite.Core.Cluster
/// update will happen every <code>2</code> seconds.
/// </summary>
/// <returns>Runtime metrics snapshot for this node.</returns>
- IClusterMetrics Metrics();
+ IClusterMetrics GetMetrics();
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Compute/ICompute.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Compute/ICompute.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Compute/ICompute.cs
index bbb496f..c124f84 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Compute/ICompute.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Compute/ICompute.cs
@@ -25,7 +25,7 @@ namespace Apache.Ignite.Core.Compute
/// <summary>
/// Defines Ignite functionality for executing tasks and closures over nodes
/// in the <see cref="IClusterGroup"/>. Instance of <see cref="ICompute"/>
- /// is obtained from grid projection using <see cref="IClusterGroup.Compute()"/> method.
+ /// is obtained from grid projection using <see cref="IClusterGroup.GetCompute"/> method.
/// <para />
/// Note that if attempt is made to execute a computation over an empty projection (i.e. projection that does
/// not have any alive nodes), <c>ClusterGroupEmptyException</c> will be thrown out of result future.
@@ -50,10 +50,7 @@ namespace Apache.Ignite.Core.Compute
/// <summary>
/// Grid projection to which this compute instance belongs.
/// </summary>
- IClusterGroup ClusterGroup
- {
- get;
- }
+ IClusterGroup ClusterGroup { get; }
/// <summary>
/// Sets no-failover flag for the next executed task on this projection in the current thread.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/IIgnite.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/IIgnite.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/IIgnite.cs
index b691254..a9fae89 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/IIgnite.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/IIgnite.cs
@@ -54,7 +54,7 @@ namespace Apache.Ignite.Core
/// <summary>
/// Gets an instance of <see cref="ICluster" /> interface.
/// </summary>
- ICluster Cluster { get; }
+ ICluster GetCluster();
/// <summary>
/// Gets compute functionality over this grid projection. All operations
@@ -62,15 +62,7 @@ namespace Apache.Ignite.Core
/// this projection.
/// </summary>
/// <returns>Compute instance over this grid projection.</returns>
- ICompute Compute();
-
- /// <summary>
- /// Gets compute functionality over specified grid projection. All operations
- /// on the returned ICompute instance will only include nodes from
- /// that projection.
- /// </summary>
- /// <returns>Compute instance over specified grid projection.</returns>
- ICompute Compute(IClusterGroup clusterGroup);
+ ICompute GetCompute();
/// <summary>
/// Gets the cache instance for the given name to work with keys and values of specified types.
@@ -78,13 +70,13 @@ namespace Apache.Ignite.Core
/// You can get instances of ICache of the same name, but with different key/value types.
/// These will use the same named cache, but only allow working with entries of specified types.
/// Attempt to retrieve an entry of incompatible type will result in <see cref="InvalidCastException"/>.
- /// Use <see cref="Cache{Object, Object}"/> in order to work with entries of arbitrary types.
+ /// Use <see cref="GetCache{TK,TV}"/> in order to work with entries of arbitrary types.
/// </summary>
/// <param name="name">Cache name.</param>
/// <returns>Cache instance for given name.</returns>
/// <typeparam name="TK">Cache key type.</typeparam>
/// <typeparam name="TV">Cache value type.</typeparam>
- ICache<TK, TV> Cache<TK, TV>(string name);
+ ICache<TK, TV> GetCache<TK, TV>(string name);
/// <summary>
/// Gets existing cache with the given name or creates new one using template configuration.
@@ -111,58 +103,42 @@ namespace Apache.Ignite.Core
/// </summary>
/// <param name="cacheName">Cache name (<c>null</c> for default cache).</param>
/// <returns>Data streamer.</returns>
- IDataStreamer<TK, TV> DataStreamer<TK, TV>(string cacheName);
+ IDataStreamer<TK, TV> GetDataStreamer<TK, TV>(string cacheName);
/// <summary>
/// Gets an instance of <see cref="IPortables"/> interface.
/// </summary>
/// <returns>Instance of <see cref="IPortables"/> interface</returns>
- IPortables Portables();
+ IPortables GetPortables();
/// <summary>
/// Gets affinity service to provide information about data partitioning and distribution.
/// </summary>
/// <param name="name">Cache name.</param>
/// <returns>Cache data affinity service.</returns>
- ICacheAffinity Affinity(string name);
+ ICacheAffinity GetAffinity(string name);
/// <summary>
- /// Gets Ignite transactions facade.
+ /// Gets Ignite transactions facade.
/// </summary>
- ITransactions Transactions { get; }
+ ITransactions GetTransactions();
/// <summary>
/// Gets messaging facade over all cluster nodes.
/// </summary>
/// <returns>Messaging instance over all cluster nodes.</returns>
- IMessaging Message();
-
- /// <summary>
- /// Gets messaging facade over nodes within the cluster group. All operations on the returned
- /// <see cref="IMessaging"/>> instance will only include nodes from the specified cluster group.
- /// </summary>
- /// <param name="clusterGroup">Cluster group.</param>
- /// <returns>Messaging instance over given cluster group.</returns>
- IMessaging Message(IClusterGroup clusterGroup);
+ IMessaging GetMessaging();
/// <summary>
/// Gets events facade over all cluster nodes.
/// </summary>
/// <returns>Events facade over all cluster nodes.</returns>
- IEvents Events();
-
- /// <summary>
- /// Gets events facade over nodes within the cluster group. All operations on the returned
- /// <see cref="IEvents"/>> instance will only include nodes from the specified cluster group.
- /// </summary>
- /// <param name="clusterGroup">Cluster group.</param>
- /// <returns>Events instance over given cluster group.</returns>
- IEvents Events(IClusterGroup clusterGroup);
+ IEvents GetEvents();
/// <summary>
/// Gets services facade over all cluster nodes.
/// </summary>
/// <returns>Services facade over all cluster nodes.</returns>
- IServices Services();
+ IServices GetServices();
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheAffinityImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheAffinityImpl.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheAffinityImpl.cs
index 6d577ce..37bf73a 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheAffinityImpl.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheAffinityImpl.cs
@@ -105,7 +105,7 @@ namespace Apache.Ignite.Core.Impl.Cache
}
/** <inheritDoc /> */
- public int Partition<TK>(TK key)
+ public int GetPartition<TK>(TK key)
{
IgniteArgumentCheck.NotNull(key, "key");
@@ -143,7 +143,7 @@ namespace Apache.Ignite.Core.Impl.Cache
}
/** <inheritDoc /> */
- public int[] PrimaryPartitions(IClusterNode n)
+ public int[] GetPrimaryPartitions(IClusterNode n)
{
IgniteArgumentCheck.NotNull(n, "n");
@@ -151,7 +151,7 @@ namespace Apache.Ignite.Core.Impl.Cache
}
/** <inheritDoc /> */
- public int[] BackupPartitions(IClusterNode n)
+ public int[] GetBackupPartitions(IClusterNode n)
{
IgniteArgumentCheck.NotNull(n, "n");
@@ -159,7 +159,7 @@ namespace Apache.Ignite.Core.Impl.Cache
}
/** <inheritDoc /> */
- public int[] AllPartitions(IClusterNode n)
+ public int[] GetAllPartitions(IClusterNode n)
{
IgniteArgumentCheck.NotNull(n, "n");
@@ -167,7 +167,7 @@ namespace Apache.Ignite.Core.Impl.Cache
}
/** <inheritDoc /> */
- public TR AffinityKey<TK, TR>(TK key)
+ public TR GetAffinityKey<TK, TR>(TK key)
{
IgniteArgumentCheck.NotNull(key, "key");
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
index cdc9bcd..b42e03c 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheImpl.cs
@@ -149,9 +149,10 @@ namespace Apache.Ignite.Core.Impl.Cache
}
/** <inheritDoc /> */
- public bool IsEmpty
+
+ public bool IsEmpty()
{
- get { return Size() == 0; }
+ return GetSize() == 0;
}
/** <inheritDoc /> */
@@ -230,7 +231,7 @@ namespace Apache.Ignite.Core.Impl.Cache
}
/** <inheritDoc /> */
- public bool KeepPortable
+ public bool IsKeepPortable
{
get { return _flagKeepPortable; }
}
@@ -257,7 +258,7 @@ namespace Apache.Ignite.Core.Impl.Cache
if (p != null)
{
var p0 = new CacheEntryFilterHolder(p, (k, v) => p.Invoke(new CacheEntry<TK, TV>((TK)k, (TV)v)),
- Marshaller, KeepPortable);
+ Marshaller, IsKeepPortable);
writer.WriteObject(p0);
writer.WriteLong(p0.Handle);
}
@@ -486,13 +487,13 @@ namespace Apache.Ignite.Core.Impl.Cache
}
/** <inheritDoc /> */
- public int LocalSize(params CachePeekMode[] modes)
+ public int GetLocalSize(params CachePeekMode[] modes)
{
return Size0(true, modes);
}
/** <inheritDoc /> */
- public int Size(params CachePeekMode[] modes)
+ public int GetSize(params CachePeekMode[] modes)
{
return Size0(false, modes);
}
@@ -672,7 +673,7 @@ namespace Apache.Ignite.Core.Impl.Cache
{
var writer = Marshaller.StartMarshal(stream);
- qry.Write(writer, KeepPortable);
+ qry.Write(writer, IsKeepPortable);
FinishMarshal(writer);
@@ -737,7 +738,7 @@ namespace Apache.Ignite.Core.Impl.Cache
{
writer.WriteInt((int) initialQry.OpId);
- initialQry.Write(writer, KeepPortable);
+ initialQry.Write(writer, IsKeepPortable);
}
else
writer.WriteInt(-1); // no initial query
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheProxyImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheProxyImpl.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheProxyImpl.cs
index 5c6ee07..bfd7866 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheProxyImpl.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/CacheProxyImpl.cs
@@ -116,15 +116,16 @@ namespace Apache.Ignite.Core.Impl.Cache
}
/** <inheritDoc /> */
- public bool IsEmpty
+
+ public bool IsEmpty()
{
- get { return _cache.IsEmpty; }
+ return _cache.IsEmpty();
}
/** <inheritDoc /> */
- public bool KeepPortable
+ public bool IsKeepPortable
{
- get { return _cache.KeepPortable; }
+ get { return _cache.IsKeepPortable; }
}
/// <summary>
@@ -368,15 +369,15 @@ namespace Apache.Ignite.Core.Impl.Cache
}
/** <inheritDoc /> */
- public int LocalSize(params CachePeekMode[] modes)
+ public int GetLocalSize(params CachePeekMode[] modes)
{
- return _cache.LocalSize(modes);
+ return _cache.GetLocalSize(modes);
}
/** <inheritDoc /> */
- public int Size(params CachePeekMode[] modes)
+ public int GetSize(params CachePeekMode[] modes)
{
- var result = _cache.Size(modes);
+ var result = _cache.GetSize(modes);
ClearLastAsyncOp();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs
index 7a1b544..d8d014b 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cache/Query/Continuous/ContinuousQueryHandleImpl.cs
@@ -166,12 +166,6 @@ namespace Apache.Ignite.Core.Impl.Cache.Query.Continuous
}
/** <inheritdoc /> */
- public IQueryCursor<ICacheEntry<TK, TV>> InitialQueryCursor
- {
- get { return GetInitialQueryCursor(); }
- }
-
- /** <inheritdoc /> */
public IQueryCursor<ICacheEntry<TK, TV>> GetInitialQueryCursor()
{
lock (this)
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cluster/ClusterGroupImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cluster/ClusterGroupImpl.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cluster/ClusterGroupImpl.cs
index d26f52e..382ab1e 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cluster/ClusterGroupImpl.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cluster/ClusterGroupImpl.cs
@@ -158,7 +158,7 @@ namespace Apache.Ignite.Core.Impl.Cluster
}
/** <inheritDoc /> */
- public ICompute Compute()
+ public ICompute GetCompute()
{
return _comp.Value;
}
@@ -315,25 +315,25 @@ namespace Apache.Ignite.Core.Impl.Cluster
}
/** <inheritDoc /> */
- public ICollection<IClusterNode> Nodes()
+ public ICollection<IClusterNode> GetNodes()
{
return RefreshNodes();
}
/** <inheritDoc /> */
- public IClusterNode Node(Guid id)
+ public IClusterNode GetNode(Guid id)
{
- return Nodes().FirstOrDefault(node => node.Id == id);
+ return GetNodes().FirstOrDefault(node => node.Id == id);
}
/** <inheritDoc /> */
- public IClusterNode Node()
+ public IClusterNode GetNode()
{
- return Nodes().FirstOrDefault();
+ return GetNodes().FirstOrDefault();
}
/** <inheritDoc /> */
- public IClusterMetrics Metrics()
+ public IClusterMetrics GetMetrics()
{
if (_pred == null)
{
@@ -346,7 +346,7 @@ namespace Apache.Ignite.Core.Impl.Cluster
}
return DoOutInOp(OpMetricsFiltered, writer =>
{
- WriteEnumerable(writer, Nodes().Select(node => node.Id));
+ WriteEnumerable(writer, GetNodes().Select(node => node.Id));
}, stream =>
{
IPortableRawReader reader = Marshaller.StartUnmarshal(stream, false);
@@ -356,19 +356,19 @@ namespace Apache.Ignite.Core.Impl.Cluster
}
/** <inheritDoc /> */
- public IMessaging Message()
+ public IMessaging GetMessaging()
{
return _msg.Value;
}
/** <inheritDoc /> */
- public IEvents Events()
+ public IEvents GetEvents()
{
return _events.Value;
}
/** <inheritDoc /> */
- public IServices Services()
+ public IServices GetServices()
{
return _services.Value;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cluster/ClusterNodeImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cluster/ClusterNodeImpl.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cluster/ClusterNodeImpl.cs
index 59373a2..da49feb 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cluster/ClusterNodeImpl.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Cluster/ClusterNodeImpl.cs
@@ -81,7 +81,7 @@ namespace Apache.Ignite.Core.Impl.Cluster
}
/** <inheritDoc /> */
- public T Attribute<T>(string name)
+ public T GetAttribute<T>(string name)
{
IgniteArgumentCheck.NotNull(name, "name");
@@ -107,7 +107,7 @@ namespace Apache.Ignite.Core.Impl.Cluster
}
/** <inheritDoc /> */
- public IDictionary<string, object> Attributes()
+ public IDictionary<string, object> GetAttributes()
{
return _attrs;
}
@@ -158,7 +158,7 @@ namespace Apache.Ignite.Core.Impl.Cluster
}
/** <inheritDoc /> */
- public IClusterMetrics Metrics()
+ public IClusterMetrics GetMetrics()
{
var ignite = (Ignite)_igniteRef.Target;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeImpl.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeImpl.cs
index 45c847a..f0ff968 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeImpl.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeImpl.cs
@@ -128,7 +128,7 @@ namespace Apache.Ignite.Core.Impl.Compute
{
IgniteArgumentCheck.NotNullOrEmpty(taskName, "taskName");
- ICollection<IClusterNode> nodes = _prj.Predicate == null ? null : _prj.Nodes();
+ ICollection<IClusterNode> nodes = _prj.Predicate == null ? null : _prj.GetNodes();
try
{
@@ -154,7 +154,7 @@ namespace Apache.Ignite.Core.Impl.Compute
{
IgniteArgumentCheck.NotNullOrEmpty(taskName, "taskName");
- ICollection<IClusterNode> nodes = _prj.Predicate == null ? null : _prj.Nodes();
+ ICollection<IClusterNode> nodes = _prj.Predicate == null ? null : _prj.GetNodes();
try
{
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJobHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJobHolder.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJobHolder.cs
index 4e63282..a0de895 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJobHolder.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Compute/ComputeJobHolder.cs
@@ -87,7 +87,7 @@ namespace Apache.Ignite.Core.Impl.Compute
success ? res : null,
success ? null : res as Exception,
_job,
- _ignite.LocalNode.Id,
+ _ignite.GetLocalNode().Id,
cancel
);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Ignite.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Ignite.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Ignite.cs
index c5025b2..5f764c1 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Ignite.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Ignite.cs
@@ -21,6 +21,7 @@ namespace Apache.Ignite.Core.Impl
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
+ using System.Linq;
using Apache.Ignite.Core.Cache;
using Apache.Ignite.Core.Cluster;
using Apache.Ignite.Core.Compute;
@@ -121,7 +122,7 @@ namespace Apache.Ignite.Core.Impl
// Grid is not completely started here, can't initialize interop transactions right away.
_transactions = new Lazy<TransactionsImpl>(
- () => new TransactionsImpl(UU.ProcessorTransactions(proc), marsh, LocalNode.Id));
+ () => new TransactionsImpl(UU.ProcessorTransactions(proc), marsh, GetLocalNode().Id));
}
/// <summary>
@@ -149,9 +150,10 @@ namespace Apache.Ignite.Core.Impl
}
/** <inheritdoc /> */
- public ICluster Cluster
+
+ public ICluster GetCluster()
{
- get { return this; }
+ return this;
}
/** <inheritdoc /> */
@@ -163,21 +165,13 @@ namespace Apache.Ignite.Core.Impl
/** <inheritdoc /> */
public IClusterGroup ForLocal()
{
- return _prj.ForNodes(LocalNode);
+ return _prj.ForNodes(GetLocalNode());
}
/** <inheritdoc /> */
- public ICompute Compute()
+ public ICompute GetCompute()
{
- return _prj.Compute();
- }
-
- /** <inheritdoc /> */
- public ICompute Compute(IClusterGroup clusterGroup)
- {
- IgniteArgumentCheck.NotNull(clusterGroup, "clusterGroup");
-
- return clusterGroup.Compute();
+ return _prj.GetCompute();
}
/** <inheritdoc /> */
@@ -281,27 +275,27 @@ namespace Apache.Ignite.Core.Impl
}
/** <inheritdoc /> */
- public ICollection<IClusterNode> Nodes()
+ public ICollection<IClusterNode> GetNodes()
{
- return _prj.Nodes();
+ return _prj.GetNodes();
}
/** <inheritdoc /> */
- public IClusterNode Node(Guid id)
+ public IClusterNode GetNode(Guid id)
{
- return _prj.Node(id);
+ return _prj.GetNode(id);
}
/** <inheritdoc /> */
- public IClusterNode Node()
+ public IClusterNode GetNode()
{
- return _prj.Node();
+ return _prj.GetNode();
}
/** <inheritdoc /> */
- public IClusterMetrics Metrics()
+ public IClusterMetrics GetMetrics()
{
- return _prj.Metrics();
+ return _prj.GetMetrics();
}
/** <inheritdoc /> */
@@ -325,7 +319,7 @@ namespace Apache.Ignite.Core.Impl
}
/** <inheritdoc /> */
- public ICache<TK, TV> Cache<TK, TV>(string name)
+ public ICache<TK, TV> GetCache<TK, TV>(string name)
{
return Cache<TK, TV>(UU.ProcessorCache(_proc, name));
}
@@ -358,25 +352,9 @@ namespace Apache.Ignite.Core.Impl
}
/** <inheritdoc /> */
- public IClusterNode LocalNode
+ public IClusterNode GetLocalNode()
{
- get
- {
- if (_locNode == null)
- {
- foreach (IClusterNode node in Nodes())
- {
- if (node.IsLocal)
- {
- _locNode = node;
-
- break;
- }
- }
- }
-
- return _locNode;
- }
+ return _locNode ?? (_locNode = GetNodes().FirstOrDefault(x => x.IsLocal));
}
/** <inheritdoc /> */
@@ -392,7 +370,7 @@ namespace Apache.Ignite.Core.Impl
}
/** <inheritdoc /> */
- public ICollection<IClusterNode> Topology(long ver)
+ public ICollection<IClusterNode> GetTopology(long ver)
{
return _prj.Topology(ver);
}
@@ -404,63 +382,47 @@ namespace Apache.Ignite.Core.Impl
}
/** <inheritdoc /> */
- public IDataStreamer<TK, TV> DataStreamer<TK, TV>(string cacheName)
+ public IDataStreamer<TK, TV> GetDataStreamer<TK, TV>(string cacheName)
{
return new DataStreamerImpl<TK, TV>(UU.ProcessorDataStreamer(_proc, cacheName, false),
_marsh, cacheName, false);
}
/** <inheritdoc /> */
- public IPortables Portables()
+ public IPortables GetPortables()
{
return _portables;
}
/** <inheritdoc /> */
- public ICacheAffinity Affinity(string cacheName)
+ public ICacheAffinity GetAffinity(string cacheName)
{
return new CacheAffinityImpl(UU.ProcessorAffinity(_proc, cacheName), _marsh, false, this);
}
/** <inheritdoc /> */
- public ITransactions Transactions
- {
- get { return _transactions.Value; }
- }
- /** <inheritdoc /> */
- public IMessaging Message()
+ public ITransactions GetTransactions()
{
- return _prj.Message();
+ return _transactions.Value;
}
/** <inheritdoc /> */
- public IMessaging Message(IClusterGroup clusterGroup)
+ public IMessaging GetMessaging()
{
- IgniteArgumentCheck.NotNull(clusterGroup, "clusterGroup");
-
- return clusterGroup.Message();
+ return _prj.GetMessaging();
}
/** <inheritdoc /> */
- public IEvents Events()
+ public IEvents GetEvents()
{
- return _prj.Events();
- }
-
- /** <inheritdoc /> */
- public IEvents Events(IClusterGroup clusterGroup)
- {
- if (clusterGroup == null)
- throw new ArgumentNullException("clusterGroup");
-
- return clusterGroup.Events();
+ return _prj.GetEvents();
}
/** <inheritdoc /> */
- public IServices Services()
+ public IServices GetServices()
{
- return _prj.Services();
+ return _prj.GetServices();
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/IgniteProxy.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/IgniteProxy.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/IgniteProxy.cs
index f180830..2e01a5b 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/IgniteProxy.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/IgniteProxy.cs
@@ -65,9 +65,10 @@ namespace Apache.Ignite.Core.Impl
}
/** <inheritdoc /> */
- public ICluster Cluster
+
+ public ICluster GetCluster()
{
- get { return this; }
+ return this;
}
/** <inheritdoc /> */
@@ -79,139 +80,133 @@ namespace Apache.Ignite.Core.Impl
/** <inheritdoc /> */
public IClusterGroup ForLocal()
{
- return _ignite.Cluster.ForLocal();
+ return _ignite.GetCluster().ForLocal();
}
/** <inheritdoc /> */
- public ICompute Compute()
+ public ICompute GetCompute()
{
- return _ignite.Compute();
- }
-
- /** <inheritdoc /> */
- public ICompute Compute(IClusterGroup clusterGroup)
- {
- return clusterGroup.Compute();
+ return _ignite.GetCompute();
}
/** <inheritdoc /> */
public IClusterGroup ForNodes(IEnumerable<IClusterNode> nodes)
{
- return _ignite.Cluster.ForNodes(nodes);
+ return _ignite.GetCluster().ForNodes(nodes);
}
/** <inheritdoc /> */
public IClusterGroup ForNodes(params IClusterNode[] nodes)
{
- return _ignite.Cluster.ForNodes(nodes);
+ return _ignite.GetCluster().ForNodes(nodes);
}
/** <inheritdoc /> */
public IClusterGroup ForNodeIds(IEnumerable<Guid> ids)
{
- return _ignite.Cluster.ForNodeIds(ids);
+ return _ignite.GetCluster().ForNodeIds(ids);
}
/** <inheritdoc /> */
public IClusterGroup ForNodeIds(ICollection<Guid> ids)
{
- return _ignite.Cluster.ForNodeIds(ids);
+ return _ignite.GetCluster().ForNodeIds(ids);
}
/** <inheritdoc /> */
public IClusterGroup ForNodeIds(params Guid[] ids)
{
- return _ignite.Cluster.ForNodeIds(ids);
+ return _ignite.GetCluster().ForNodeIds(ids);
}
/** <inheritdoc /> */
public IClusterGroup ForPredicate(Func<IClusterNode, bool> p)
{
- return _ignite.Cluster.ForPredicate(p);
+ return _ignite.GetCluster().ForPredicate(p);
}
/** <inheritdoc /> */
public IClusterGroup ForAttribute(string name, string val)
{
- return _ignite.Cluster.ForAttribute(name, val);
+ return _ignite.GetCluster().ForAttribute(name, val);
}
/** <inheritdoc /> */
public IClusterGroup ForCacheNodes(string name)
{
- return _ignite.Cluster.ForCacheNodes(name);
+ return _ignite.GetCluster().ForCacheNodes(name);
}
/** <inheritdoc /> */
public IClusterGroup ForDataNodes(string name)
{
- return _ignite.Cluster.ForDataNodes(name);
+ return _ignite.GetCluster().ForDataNodes(name);
}
/** <inheritdoc /> */
public IClusterGroup ForClientNodes(string name)
{
- return _ignite.Cluster.ForClientNodes(name);
+ return _ignite.GetCluster().ForClientNodes(name);
}
/** <inheritdoc /> */
public IClusterGroup ForRemotes()
{
- return _ignite.Cluster.ForRemotes();
+ return _ignite.GetCluster().ForRemotes();
}
/** <inheritdoc /> */
public IClusterGroup ForHost(IClusterNode node)
{
- return _ignite.Cluster.ForHost(node);
+ return _ignite.GetCluster().ForHost(node);
}
/** <inheritdoc /> */
public IClusterGroup ForRandom()
{
- return _ignite.Cluster.ForRandom();
+ return _ignite.GetCluster().ForRandom();
}
/** <inheritdoc /> */
public IClusterGroup ForOldest()
{
- return _ignite.Cluster.ForOldest();
+ return _ignite.GetCluster().ForOldest();
}
/** <inheritdoc /> */
public IClusterGroup ForYoungest()
{
- return _ignite.Cluster.ForYoungest();
+ return _ignite.GetCluster().ForYoungest();
}
/** <inheritdoc /> */
public IClusterGroup ForDotNet()
{
- return _ignite.Cluster.ForDotNet();
+ return _ignite.GetCluster().ForDotNet();
}
/** <inheritdoc /> */
- public ICollection<IClusterNode> Nodes()
+ public ICollection<IClusterNode> GetNodes()
{
- return _ignite.Cluster.Nodes();
+ return _ignite.GetCluster().GetNodes();
}
/** <inheritdoc /> */
- public IClusterNode Node(Guid id)
+ public IClusterNode GetNode(Guid id)
{
- return _ignite.Cluster.Node(id);
+ return _ignite.GetCluster().GetNode(id);
}
/** <inheritdoc /> */
- public IClusterNode Node()
+ public IClusterNode GetNode()
{
- return _ignite.Cluster.Node();
+ return _ignite.GetCluster().GetNode();
}
/** <inheritdoc /> */
- public IClusterMetrics Metrics()
+ public IClusterMetrics GetMetrics()
{
- return _ignite.Cluster.Metrics();
+ return _ignite.GetCluster().GetMetrics();
}
/** <inheritdoc /> */
@@ -221,9 +216,9 @@ namespace Apache.Ignite.Core.Impl
}
/** <inheritdoc /> */
- public ICache<TK, TV> Cache<TK, TV>(string name)
+ public ICache<TK, TV> GetCache<TK, TV>(string name)
{
- return _ignite.Cache<TK, TV>(name);
+ return _ignite.GetCache<TK, TV>(name);
}
/** <inheritdoc /> */
@@ -239,90 +234,77 @@ namespace Apache.Ignite.Core.Impl
}
/** <inheritdoc /> */
- public IClusterNode LocalNode
+
+ public IClusterNode GetLocalNode()
{
- get
- {
- return _ignite.Cluster.LocalNode;
- }
+ return _ignite.GetCluster().GetLocalNode();
}
/** <inheritdoc /> */
public bool PingNode(Guid nodeId)
{
- return _ignite.Cluster.PingNode(nodeId);
+ return _ignite.GetCluster().PingNode(nodeId);
}
/** <inheritdoc /> */
public long TopologyVersion
{
- get { return _ignite.Cluster.TopologyVersion; }
+ get { return _ignite.GetCluster().TopologyVersion; }
}
/** <inheritdoc /> */
- public ICollection<IClusterNode> Topology(long ver)
+ public ICollection<IClusterNode> GetTopology(long ver)
{
- return _ignite.Cluster.Topology(ver);
+ return _ignite.GetCluster().GetTopology(ver);
}
/** <inheritdoc /> */
public void ResetMetrics()
{
- _ignite.Cluster.ResetMetrics();
- }
-
- /** <inheritdoc /> */
- public IDataStreamer<TK, TV> DataStreamer<TK, TV>(string cacheName)
- {
- return _ignite.DataStreamer<TK, TV>(cacheName);
+ _ignite.GetCluster().ResetMetrics();
}
/** <inheritdoc /> */
- public IPortables Portables()
+ public IDataStreamer<TK, TV> GetDataStreamer<TK, TV>(string cacheName)
{
- return _ignite.Portables();
+ return _ignite.GetDataStreamer<TK, TV>(cacheName);
}
/** <inheritdoc /> */
- public ICacheAffinity Affinity(string name)
+ public IPortables GetPortables()
{
- return _ignite.Affinity(name);
+ return _ignite.GetPortables();
}
/** <inheritdoc /> */
- public ITransactions Transactions
+ public ICacheAffinity GetAffinity(string name)
{
- get { return _ignite.Transactions; }
+ return _ignite.GetAffinity(name);
}
/** <inheritdoc /> */
- public IMessaging Message()
- {
- return _ignite.Message();
- }
- /** <inheritdoc /> */
- public IMessaging Message(IClusterGroup clusterGroup)
+ public ITransactions GetTransactions()
{
- return _ignite.Message(clusterGroup);
+ return _ignite.GetTransactions();
}
/** <inheritdoc /> */
- public IEvents Events()
+ public IMessaging GetMessaging()
{
- return _ignite.Events();
+ return _ignite.GetMessaging();
}
/** <inheritdoc /> */
- public IEvents Events(IClusterGroup clusterGroup)
+ public IEvents GetEvents()
{
- return _ignite.Events(clusterGroup);
+ return _ignite.GetEvents();
}
/** <inheritdoc /> */
- public IServices Services()
+ public IServices GetServices()
{
- return _ignite.Services();
+ return _ignite.GetServices();
}
/** <inheritdoc /> */
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/Metadata/PortableMetadataImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/Metadata/PortableMetadataImpl.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/Metadata/PortableMetadataImpl.cs
index 88b40ad..06578c0 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/Metadata/PortableMetadataImpl.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/Metadata/PortableMetadataImpl.cs
@@ -169,7 +169,7 @@ namespace Apache.Ignite.Core.Impl.Portable.Metadata
/// <returns>
/// Field type.
/// </returns>
- public string FieldTypeName(string fieldName)
+ public string GetFieldTypeName(string fieldName)
{
if (_fields != null)
{
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableBuilderImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableBuilderImpl.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableBuilderImpl.cs
index 037ac85..dc0f570 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableBuilderImpl.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableBuilderImpl.cs
@@ -139,7 +139,7 @@ namespace Apache.Ignite.Core.Impl.Portable
}
/** <inheritDoc /> */
- public IPortableBuilder HashCode(int hashCode)
+ public IPortableBuilder SetHashCode(int hashCode)
{
_hashCode = hashCode;
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUserObject.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUserObject.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUserObject.cs
index 3ca8a5f..66e70ee 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUserObject.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUserObject.cs
@@ -72,13 +72,13 @@ namespace Apache.Ignite.Core.Impl.Portable
}
/** <inheritdoc /> */
- public int TypeId()
+ public int TypeId
{
- return _typeId;
+ get { return _typeId; }
}
/** <inheritdoc /> */
- public T Field<T>(string fieldName)
+ public T GetField<T>(string fieldName)
{
return Field<T>(fieldName, null);
}
@@ -118,7 +118,7 @@ namespace Apache.Ignite.Core.Impl.Portable
}
/** <inheritdoc /> */
- public IPortableMetadata Metadata()
+ public IPortableMetadata GetMetadata()
{
return _marsh.Metadata(_typeId);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs
index a0b110d..f926adc 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortableUtils.cs
@@ -1626,7 +1626,7 @@ namespace Apache.Ignite.Core.Impl.Portable
try
{
if (converter != null)
- typeName = converter.TypeName(typeName);
+ typeName = converter.GetTypeName(typeName);
}
catch (Exception e)
{
@@ -1654,7 +1654,7 @@ namespace Apache.Ignite.Core.Impl.Portable
try
{
if (converter != null)
- fieldName = converter.FieldName(fieldName);
+ fieldName = converter.GetFieldName(fieldName);
}
catch (Exception e)
{
@@ -1700,7 +1700,7 @@ namespace Apache.Ignite.Core.Impl.Portable
{
try
{
- id = idMapper.TypeId(typeName);
+ id = idMapper.GetTypeId(typeName);
}
catch (Exception e)
{
@@ -1736,7 +1736,7 @@ namespace Apache.Ignite.Core.Impl.Portable
{
try
{
- id = idMapper.FieldId(typeId, fieldName);
+ id = idMapper.GetFieldId(typeId, fieldName);
}
catch (Exception e)
{
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortablesImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortablesImpl.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortablesImpl.cs
index 066f46b..f769e3f 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortablesImpl.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Impl/Portable/PortablesImpl.cs
@@ -70,7 +70,7 @@ namespace Apache.Ignite.Core.Impl.Portable
}
/** <inheritDoc /> */
- public IPortableBuilder Builder(Type type)
+ public IPortableBuilder GetBuilder(Type type)
{
IgniteArgumentCheck.NotNull(type, "type");
@@ -84,7 +84,7 @@ namespace Apache.Ignite.Core.Impl.Portable
}
/** <inheritDoc /> */
- public IPortableBuilder Builder(string typeName)
+ public IPortableBuilder GetBuilder(string typeName)
{
IgniteArgumentCheck.NotNullOrEmpty(typeName, "typeName");
@@ -94,7 +94,7 @@ namespace Apache.Ignite.Core.Impl.Portable
}
/** <inheritDoc /> */
- public IPortableBuilder Builder(IPortableObject obj)
+ public IPortableBuilder GetBuilder(IPortableObject obj)
{
IgniteArgumentCheck.NotNull(obj, "obj");
@@ -103,7 +103,7 @@ namespace Apache.Ignite.Core.Impl.Portable
if (obj0 == null)
throw new ArgumentException("Unsupported object type: " + obj.GetType());
- IPortableTypeDescriptor desc = _marsh.Descriptor(true, obj0.TypeId());
+ IPortableTypeDescriptor desc = _marsh.Descriptor(true, obj0.TypeId);
return Builder0(null, obj0, desc);
}
@@ -154,7 +154,7 @@ namespace Apache.Ignite.Core.Impl.Portable
/// <returns></returns>
internal PortableBuilderImpl ChildBuilder(PortableBuilderImpl parent, PortableUserObject obj)
{
- IPortableTypeDescriptor desc = _marsh.Descriptor(true, obj.TypeId());
+ IPortableTypeDescriptor desc = _marsh.Descriptor(true, obj.TypeId);
return Builder0(null, obj, desc);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableBuilder.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableBuilder.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableBuilder.cs
index ae3ab6a..4f65840 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableBuilder.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableBuilder.cs
@@ -66,8 +66,7 @@ namespace Apache.Ignite.Core.Portable
/// </summary>
/// <param name="hashCode">Hash code.</param>
/// <returns>Current builder instance.</returns>
- [SuppressMessage("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId = "0#")]
- IPortableBuilder HashCode(int hashCode);
+ IPortableBuilder SetHashCode(int hashCode);
/// <summary>
/// Build the object.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableIdMapper.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableIdMapper.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableIdMapper.cs
index 08c05b5..0c18eb9 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableIdMapper.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableIdMapper.cs
@@ -27,7 +27,7 @@ namespace Apache.Ignite.Core.Portable
/// </summary>
/// <param name="typeName">Full type name.</param>
/// <returns>ID of the class or 0 in case hash code is to be used.</returns>
- int TypeId(string typeName);
+ int GetTypeId(string typeName);
/// <summary>
/// Gets field ID for the given field of the given class.
@@ -35,6 +35,6 @@ namespace Apache.Ignite.Core.Portable
/// <param name="typeId">Type ID.</param>
/// <param name="fieldName">Field name.</param>
/// <returns>ID of the field or null in case hash code is to be used.</returns>
- int FieldId(int typeId, string fieldName);
+ int GetFieldId(int typeId, string fieldName);
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableMetadata.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableMetadata.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableMetadata.cs
index fa0e4f6..5bfa340 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableMetadata.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableMetadata.cs
@@ -28,34 +28,25 @@ namespace Apache.Ignite.Core.Portable
/// Gets type name.
/// </summary>
/// <returns>Type name.</returns>
- string TypeName
- {
- get;
- }
+ string TypeName { get; }
/// <summary>
/// Gets field names for that type.
/// </summary>
/// <returns>Field names.</returns>
- ICollection<string> Fields
- {
- get;
- }
+ ICollection<string> Fields { get; }
/// <summary>
/// Gets field type for the given field name.
/// </summary>
/// <param name="fieldName">Field name.</param>
/// <returns>Field type.</returns>
- string FieldTypeName(string fieldName);
+ string GetFieldTypeName(string fieldName);
/// <summary>
/// Gets optional affinity key field name.
/// </summary>
/// <returns>Affinity key field name or null in case it is not provided.</returns>
- string AffinityKeyFieldName
- {
- get;
- }
+ string AffinityKeyFieldName { get; }
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableNameMapper.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableNameMapper.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableNameMapper.cs
index 5da824f..96a9d38 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableNameMapper.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableNameMapper.cs
@@ -27,13 +27,13 @@ namespace Apache.Ignite.Core.Portable
/// </summary>
/// <param name="name">The name.</param>
/// <returns>Type name.</returns>
- string TypeName(string name);
+ string GetTypeName(string name);
/// <summary>
/// Gets the field name.
/// </summary>
/// <param name="name">The name.</param>
/// <returns>Field name.</returns>
- string FieldName(string name);
+ string GetFieldName(string name);
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableObject.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableObject.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableObject.cs
index 1cedf37..3da8dec 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableObject.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortableObject.cs
@@ -22,23 +22,35 @@ namespace Apache.Ignite.Core.Portable
/// </summary>
public interface IPortableObject
{
- /// <summary>Gets portable object type ID.</summary>
- /// <returns>Type ID.</returns>
- int TypeId();
+ /// <summary>
+ /// Gets portable object type ID.
+ /// </summary>
+ /// <value>
+ /// Type ID.
+ /// </value>
+ int TypeId { get; }
/// <summary>
/// Gets object metadata.
/// </summary>
/// <returns>Metadata.</returns>
- IPortableMetadata Metadata();
+ IPortableMetadata GetMetadata();
- /// <summary>Gets field value.</summary>
+ /// <summary>
+ /// Gets field value.
+ /// </summary>
/// <param name="fieldName">Field name.</param>
- /// <returns>Field value.</returns>
- TF Field<TF>(string fieldName);
+ /// <returns>
+ /// Field value.
+ /// </returns>
+ TF GetField<TF>(string fieldName);
- /// <summary>Gets fully deserialized instance of portable object.</summary>
- /// <returns>Fully deserialized instance of portable object.</returns>
+ /// <summary>
+ /// Gets fully deserialized instance of portable object.
+ /// </summary>
+ /// <returns>
+ /// Fully deserialized instance of portable object.
+ /// </returns>
T Deserialize<T>();
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortables.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortables.cs b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortables.cs
index 905eda1..b1e77a6 100644
--- a/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortables.cs
+++ b/modules/platform/src/main/dotnet/Apache.Ignite.Core/Portable/IPortables.cs
@@ -69,7 +69,7 @@ namespace Apache.Ignite.Core.Portable
/// </summary>
/// <param name="type"></param>
/// <returns>Builder.</returns>
- IPortableBuilder Builder(Type type);
+ IPortableBuilder GetBuilder(Type type);
/// <summary>
/// Create builder for the given portable object type name. Note that this
@@ -77,14 +77,14 @@ namespace Apache.Ignite.Core.Portable
/// </summary>
/// <param name="typeName">Type name.</param>
/// <returns>Builder.</returns>
- IPortableBuilder Builder(string typeName);
+ IPortableBuilder GetBuilder(string typeName);
/// <summary>
/// Create builder over existing portable object.
/// </summary>
/// <param name="obj"></param>
/// <returns>Builder.</returns>
- IPortableBuilder Builder(IPortableObject obj);
+ IPortableBuilder GetBuilder(IPortableObject obj);
/// <summary>
/// Gets type id for the given type name.
[3/5] ignite git commit: IGNITE-1499: Correct method naming
conventions on public API.
Posted by vo...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs
index 75fc712..039813b 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeApiTest.cs
@@ -152,7 +152,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestProjection()
{
- IClusterGroup prj = _grid1.Cluster;
+ IClusterGroup prj = _grid1.GetCluster();
Assert.NotNull(prj);
@@ -165,7 +165,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestCacheDefaultName()
{
- var cache = _grid1.Cache<int, int>(null);
+ var cache = _grid1.GetCache<int, int>(null);
Assert.IsNotNull(cache);
@@ -182,7 +182,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
Assert.Catch(typeof(ArgumentException), () =>
{
- _grid1.Cache<int, int>("bad_name");
+ _grid1.GetCache<int, int>("bad_name");
});
}
@@ -192,7 +192,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestNodeContent()
{
- ICollection<IClusterNode> nodes = _grid1.Cluster.Nodes();
+ ICollection<IClusterNode> nodes = _grid1.GetCluster().GetNodes();
foreach (IClusterNode node in nodes)
{
@@ -200,9 +200,9 @@ namespace Apache.Ignite.Core.Tests.Compute
Assert.IsTrue(node.Addresses.Count > 0);
Assert.Throws<NotSupportedException>(() => node.Addresses.Add("addr"));
- Assert.NotNull(node.Attributes());
- Assert.IsTrue(node.Attributes().Count > 0);
- Assert.Throws<NotSupportedException>(() => node.Attributes().Add("key", "val"));
+ Assert.NotNull(node.GetAttributes());
+ Assert.IsTrue(node.GetAttributes().Count > 0);
+ Assert.Throws<NotSupportedException>(() => node.GetAttributes().Add("key", "val"));
Assert.NotNull(node.HostNames);
Assert.Throws<NotSupportedException>(() => node.HostNames.Add("h"));
@@ -211,7 +211,7 @@ namespace Apache.Ignite.Core.Tests.Compute
Assert.IsTrue(node.Order > 0);
- Assert.NotNull(node.Metrics());
+ Assert.NotNull(node.GetMetrics());
}
}
@@ -221,17 +221,17 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestClusterMetrics()
{
- var cluster = _grid1.Cluster;
+ var cluster = _grid1.GetCluster();
- IClusterMetrics metrics = cluster.Metrics();
+ IClusterMetrics metrics = cluster.GetMetrics();
Assert.IsNotNull(metrics);
- Assert.AreEqual(cluster.Nodes().Count, metrics.TotalNodes);
+ Assert.AreEqual(cluster.GetNodes().Count, metrics.TotalNodes);
Thread.Sleep(2000);
- IClusterMetrics newMetrics = cluster.Metrics();
+ IClusterMetrics newMetrics = cluster.GetMetrics();
Assert.IsFalse(metrics == newMetrics);
Assert.IsTrue(metrics.LastUpdateTime < newMetrics.LastUpdateTime);
@@ -243,17 +243,17 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestNodeMetrics()
{
- var node = _grid1.Cluster.Node();
+ var node = _grid1.GetCluster().GetNode();
- IClusterMetrics metrics = node.Metrics();
+ IClusterMetrics metrics = node.GetMetrics();
Assert.IsNotNull(metrics);
- Assert.IsTrue(metrics == node.Metrics());
+ Assert.IsTrue(metrics == node.GetMetrics());
Thread.Sleep(2000);
- IClusterMetrics newMetrics = node.Metrics();
+ IClusterMetrics newMetrics = node.GetMetrics();
Assert.IsFalse(metrics == newMetrics);
Assert.IsTrue(metrics.LastUpdateTime < newMetrics.LastUpdateTime);
@@ -265,15 +265,15 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestResetMetrics()
{
- var cluster = _grid1.Cluster;
+ var cluster = _grid1.GetCluster();
Thread.Sleep(2000);
- var metrics1 = cluster.Metrics();
+ var metrics1 = cluster.GetMetrics();
cluster.ResetMetrics();
- var metrics2 = cluster.Metrics();
+ var metrics2 = cluster.GetMetrics();
Assert.IsNotNull(metrics1);
Assert.IsNotNull(metrics2);
@@ -285,9 +285,9 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestPingNode()
{
- var cluster = _grid1.Cluster;
+ var cluster = _grid1.GetCluster();
- Assert.IsTrue(cluster.Nodes().Select(node => node.Id).All(cluster.PingNode));
+ Assert.IsTrue(cluster.GetNodes().Select(node => node.Id).All(cluster.PingNode));
Assert.IsFalse(cluster.PingNode(Guid.NewGuid()));
}
@@ -298,17 +298,17 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestTopologyVersion()
{
- var cluster = _grid1.Cluster;
+ var cluster = _grid1.GetCluster();
var topVer = cluster.TopologyVersion;
Ignition.Stop(_grid3.Name, true);
- Assert.AreEqual(topVer + 1, _grid1.Cluster.TopologyVersion);
+ Assert.AreEqual(topVer + 1, _grid1.GetCluster().TopologyVersion);
_grid3 = Ignition.Start(Configuration("config\\compute\\compute-grid3.xml"));
- Assert.AreEqual(topVer + 2, _grid1.Cluster.TopologyVersion);
+ Assert.AreEqual(topVer + 2, _grid1.GetCluster().TopologyVersion);
}
/// <summary>
@@ -317,18 +317,18 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestTopology()
{
- var cluster = _grid1.Cluster;
+ var cluster = _grid1.GetCluster();
- Assert.AreEqual(1, cluster.Topology(1).Count);
+ Assert.AreEqual(1, cluster.GetTopology(1).Count);
- Assert.AreEqual(null, cluster.Topology(int.MaxValue));
+ Assert.AreEqual(null, cluster.GetTopology(int.MaxValue));
// Check that Nodes and Topology return the same for current version
var topVer = cluster.TopologyVersion;
- var top = cluster.Topology(topVer);
+ var top = cluster.GetTopology(topVer);
- var nodes = cluster.Nodes();
+ var nodes = cluster.GetNodes();
Assert.AreEqual(top.Count, nodes.Count);
@@ -339,7 +339,7 @@ namespace Apache.Ignite.Core.Tests.Compute
try
{
- top = cluster.Topology(topVer);
+ top = cluster.GetTopology(topVer);
Assert.AreEqual(top.Count, nodes.Count);
@@ -357,31 +357,31 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestNodes()
{
- Assert.IsNotNull(_grid1.Cluster.Node());
+ Assert.IsNotNull(_grid1.GetCluster().GetNode());
- ICollection<IClusterNode> nodes = _grid1.Cluster.Nodes();
+ ICollection<IClusterNode> nodes = _grid1.GetCluster().GetNodes();
Assert.IsTrue(nodes.Count == 3);
// Check subsequent call on the same topology.
- nodes = _grid1.Cluster.Nodes();
+ nodes = _grid1.GetCluster().GetNodes();
Assert.IsTrue(nodes.Count == 3);
Assert.IsTrue(Ignition.Stop(_grid2.Name, true));
// Check subsequent calls on updating topologies.
- nodes = _grid1.Cluster.Nodes();
+ nodes = _grid1.GetCluster().GetNodes();
Assert.IsTrue(nodes.Count == 2);
- nodes = _grid1.Cluster.Nodes();
+ nodes = _grid1.GetCluster().GetNodes();
Assert.IsTrue(nodes.Count == 2);
_grid2 = Ignition.Start(Configuration("config\\compute\\compute-grid2.xml"));
- nodes = _grid1.Cluster.Nodes();
+ nodes = _grid1.GetCluster().GetNodes();
Assert.IsTrue(nodes.Count == 3);
}
@@ -392,46 +392,46 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestForNodes()
{
- ICollection<IClusterNode> nodes = _grid1.Cluster.Nodes();
+ ICollection<IClusterNode> nodes = _grid1.GetCluster().GetNodes();
IClusterNode first = nodes.ElementAt(0);
IClusterNode second = nodes.ElementAt(1);
- IClusterGroup singleNodePrj = _grid1.Cluster.ForNodeIds(first.Id);
- Assert.AreEqual(1, singleNodePrj.Nodes().Count);
- Assert.AreEqual(first.Id, singleNodePrj.Nodes().First().Id);
-
- singleNodePrj = _grid1.Cluster.ForNodeIds(new List<Guid> { first.Id });
- Assert.AreEqual(1, singleNodePrj.Nodes().Count);
- Assert.AreEqual(first.Id, singleNodePrj.Nodes().First().Id);
-
- singleNodePrj = _grid1.Cluster.ForNodes(first);
- Assert.AreEqual(1, singleNodePrj.Nodes().Count);
- Assert.AreEqual(first.Id, singleNodePrj.Nodes().First().Id);
-
- singleNodePrj = _grid1.Cluster.ForNodes(new List<IClusterNode> { first });
- Assert.AreEqual(1, singleNodePrj.Nodes().Count);
- Assert.AreEqual(first.Id, singleNodePrj.Nodes().First().Id);
-
- IClusterGroup multiNodePrj = _grid1.Cluster.ForNodeIds(first.Id, second.Id);
- Assert.AreEqual(2, multiNodePrj.Nodes().Count);
- Assert.IsTrue(multiNodePrj.Nodes().Contains(first));
- Assert.IsTrue(multiNodePrj.Nodes().Contains(second));
-
- multiNodePrj = _grid1.Cluster.ForNodeIds(new[] {first, second}.Select(x => x.Id));
- Assert.AreEqual(2, multiNodePrj.Nodes().Count);
- Assert.IsTrue(multiNodePrj.Nodes().Contains(first));
- Assert.IsTrue(multiNodePrj.Nodes().Contains(second));
-
- multiNodePrj = _grid1.Cluster.ForNodes(first, second);
- Assert.AreEqual(2, multiNodePrj.Nodes().Count);
- Assert.IsTrue(multiNodePrj.Nodes().Contains(first));
- Assert.IsTrue(multiNodePrj.Nodes().Contains(second));
-
- multiNodePrj = _grid1.Cluster.ForNodes(new List<IClusterNode> { first, second });
- Assert.AreEqual(2, multiNodePrj.Nodes().Count);
- Assert.IsTrue(multiNodePrj.Nodes().Contains(first));
- Assert.IsTrue(multiNodePrj.Nodes().Contains(second));
+ IClusterGroup singleNodePrj = _grid1.GetCluster().ForNodeIds(first.Id);
+ Assert.AreEqual(1, singleNodePrj.GetNodes().Count);
+ Assert.AreEqual(first.Id, singleNodePrj.GetNodes().First().Id);
+
+ singleNodePrj = _grid1.GetCluster().ForNodeIds(new List<Guid> { first.Id });
+ Assert.AreEqual(1, singleNodePrj.GetNodes().Count);
+ Assert.AreEqual(first.Id, singleNodePrj.GetNodes().First().Id);
+
+ singleNodePrj = _grid1.GetCluster().ForNodes(first);
+ Assert.AreEqual(1, singleNodePrj.GetNodes().Count);
+ Assert.AreEqual(first.Id, singleNodePrj.GetNodes().First().Id);
+
+ singleNodePrj = _grid1.GetCluster().ForNodes(new List<IClusterNode> { first });
+ Assert.AreEqual(1, singleNodePrj.GetNodes().Count);
+ Assert.AreEqual(first.Id, singleNodePrj.GetNodes().First().Id);
+
+ IClusterGroup multiNodePrj = _grid1.GetCluster().ForNodeIds(first.Id, second.Id);
+ Assert.AreEqual(2, multiNodePrj.GetNodes().Count);
+ Assert.IsTrue(multiNodePrj.GetNodes().Contains(first));
+ Assert.IsTrue(multiNodePrj.GetNodes().Contains(second));
+
+ multiNodePrj = _grid1.GetCluster().ForNodeIds(new[] {first, second}.Select(x => x.Id));
+ Assert.AreEqual(2, multiNodePrj.GetNodes().Count);
+ Assert.IsTrue(multiNodePrj.GetNodes().Contains(first));
+ Assert.IsTrue(multiNodePrj.GetNodes().Contains(second));
+
+ multiNodePrj = _grid1.GetCluster().ForNodes(first, second);
+ Assert.AreEqual(2, multiNodePrj.GetNodes().Count);
+ Assert.IsTrue(multiNodePrj.GetNodes().Contains(first));
+ Assert.IsTrue(multiNodePrj.GetNodes().Contains(second));
+
+ multiNodePrj = _grid1.GetCluster().ForNodes(new List<IClusterNode> { first, second });
+ Assert.AreEqual(2, multiNodePrj.GetNodes().Count);
+ Assert.IsTrue(multiNodePrj.GetNodes().Contains(first));
+ Assert.IsTrue(multiNodePrj.GetNodes().Contains(second));
}
/// <summary>
@@ -440,7 +440,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestForNodesLaziness()
{
- var nodes = _grid1.Cluster.Nodes().Take(2).ToArray();
+ var nodes = _grid1.GetCluster().GetNodes().Take(2).ToArray();
var callCount = 0;
@@ -456,12 +456,12 @@ namespace Apache.Ignite.Core.Tests.Compute
return node.Id;
};
- var projection = _grid1.Cluster.ForNodes(nodes.Select(nodeSelector));
- Assert.AreEqual(2, projection.Nodes().Count);
+ var projection = _grid1.GetCluster().ForNodes(nodes.Select(nodeSelector));
+ Assert.AreEqual(2, projection.GetNodes().Count);
Assert.AreEqual(2, callCount);
- projection = _grid1.Cluster.ForNodeIds(nodes.Select(idSelector));
- Assert.AreEqual(2, projection.Nodes().Count);
+ projection = _grid1.GetCluster().ForNodeIds(nodes.Select(idSelector));
+ Assert.AreEqual(2, projection.GetNodes().Count);
Assert.AreEqual(4, callCount);
}
@@ -471,10 +471,10 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestForLocal()
{
- IClusterGroup prj = _grid1.Cluster.ForLocal();
+ IClusterGroup prj = _grid1.GetCluster().ForLocal();
- Assert.AreEqual(1, prj.Nodes().Count);
- Assert.AreEqual(_grid1.Cluster.LocalNode, prj.Nodes().First());
+ Assert.AreEqual(1, prj.GetNodes().Count);
+ Assert.AreEqual(_grid1.GetCluster().GetLocalNode(), prj.GetNodes().First());
}
/// <summary>
@@ -483,13 +483,13 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestForRemotes()
{
- ICollection<IClusterNode> nodes = _grid1.Cluster.Nodes();
+ ICollection<IClusterNode> nodes = _grid1.GetCluster().GetNodes();
- IClusterGroup prj = _grid1.Cluster.ForRemotes();
+ IClusterGroup prj = _grid1.GetCluster().ForRemotes();
- Assert.AreEqual(2, prj.Nodes().Count);
- Assert.IsTrue(nodes.Contains(prj.Nodes().ElementAt(0)));
- Assert.IsTrue(nodes.Contains(prj.Nodes().ElementAt(1)));
+ Assert.AreEqual(2, prj.GetNodes().Count);
+ Assert.IsTrue(nodes.Contains(prj.GetNodes().ElementAt(0)));
+ Assert.IsTrue(nodes.Contains(prj.GetNodes().ElementAt(1)));
}
/// <summary>
@@ -498,14 +498,14 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestForHost()
{
- ICollection<IClusterNode> nodes = _grid1.Cluster.Nodes();
+ ICollection<IClusterNode> nodes = _grid1.GetCluster().GetNodes();
- IClusterGroup prj = _grid1.Cluster.ForHost(nodes.First());
+ IClusterGroup prj = _grid1.GetCluster().ForHost(nodes.First());
- Assert.AreEqual(3, prj.Nodes().Count);
- Assert.IsTrue(nodes.Contains(prj.Nodes().ElementAt(0)));
- Assert.IsTrue(nodes.Contains(prj.Nodes().ElementAt(1)));
- Assert.IsTrue(nodes.Contains(prj.Nodes().ElementAt(2)));
+ Assert.AreEqual(3, prj.GetNodes().Count);
+ Assert.IsTrue(nodes.Contains(prj.GetNodes().ElementAt(0)));
+ Assert.IsTrue(nodes.Contains(prj.GetNodes().ElementAt(1)));
+ Assert.IsTrue(nodes.Contains(prj.GetNodes().ElementAt(2)));
}
/// <summary>
@@ -514,19 +514,19 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestForOldestYoungestRandom()
{
- ICollection<IClusterNode> nodes = _grid1.Cluster.Nodes();
+ ICollection<IClusterNode> nodes = _grid1.GetCluster().GetNodes();
- IClusterGroup prj = _grid1.Cluster.ForYoungest();
- Assert.AreEqual(1, prj.Nodes().Count);
- Assert.IsTrue(nodes.Contains(prj.Node()));
+ IClusterGroup prj = _grid1.GetCluster().ForYoungest();
+ Assert.AreEqual(1, prj.GetNodes().Count);
+ Assert.IsTrue(nodes.Contains(prj.GetNode()));
- prj = _grid1.Cluster.ForOldest();
- Assert.AreEqual(1, prj.Nodes().Count);
- Assert.IsTrue(nodes.Contains(prj.Node()));
+ prj = _grid1.GetCluster().ForOldest();
+ Assert.AreEqual(1, prj.GetNodes().Count);
+ Assert.IsTrue(nodes.Contains(prj.GetNode()));
- prj = _grid1.Cluster.ForRandom();
- Assert.AreEqual(1, prj.Nodes().Count);
- Assert.IsTrue(nodes.Contains(prj.Node()));
+ prj = _grid1.GetCluster().ForRandom();
+ Assert.AreEqual(1, prj.GetNodes().Count);
+ Assert.IsTrue(nodes.Contains(prj.GetNode()));
}
/// <summary>
@@ -535,12 +535,12 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestForAttribute()
{
- ICollection<IClusterNode> nodes = _grid1.Cluster.Nodes();
+ ICollection<IClusterNode> nodes = _grid1.GetCluster().GetNodes();
- IClusterGroup prj = _grid1.Cluster.ForAttribute("my_attr", "value1");
- Assert.AreEqual(1, prj.Nodes().Count);
- Assert.IsTrue(nodes.Contains(prj.Node()));
- Assert.AreEqual("value1", prj.Nodes().First().Attribute<string>("my_attr"));
+ IClusterGroup prj = _grid1.GetCluster().ForAttribute("my_attr", "value1");
+ Assert.AreEqual(1, prj.GetNodes().Count);
+ Assert.IsTrue(nodes.Contains(prj.GetNode()));
+ Assert.AreEqual("value1", prj.GetNodes().First().GetAttribute<string>("my_attr"));
}
/// <summary>
@@ -549,28 +549,28 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestForCacheNodes()
{
- ICollection<IClusterNode> nodes = _grid1.Cluster.Nodes();
+ ICollection<IClusterNode> nodes = _grid1.GetCluster().GetNodes();
// Cache nodes.
- IClusterGroup prjCache = _grid1.Cluster.ForCacheNodes("cache1");
+ IClusterGroup prjCache = _grid1.GetCluster().ForCacheNodes("cache1");
- Assert.AreEqual(2, prjCache.Nodes().Count);
+ Assert.AreEqual(2, prjCache.GetNodes().Count);
- Assert.IsTrue(nodes.Contains(prjCache.Nodes().ElementAt(0)));
- Assert.IsTrue(nodes.Contains(prjCache.Nodes().ElementAt(1)));
+ Assert.IsTrue(nodes.Contains(prjCache.GetNodes().ElementAt(0)));
+ Assert.IsTrue(nodes.Contains(prjCache.GetNodes().ElementAt(1)));
// Data nodes.
- IClusterGroup prjData = _grid1.Cluster.ForDataNodes("cache1");
+ IClusterGroup prjData = _grid1.GetCluster().ForDataNodes("cache1");
- Assert.AreEqual(2, prjData.Nodes().Count);
+ Assert.AreEqual(2, prjData.GetNodes().Count);
- Assert.IsTrue(prjCache.Nodes().Contains(prjData.Nodes().ElementAt(0)));
- Assert.IsTrue(prjCache.Nodes().Contains(prjData.Nodes().ElementAt(1)));
+ Assert.IsTrue(prjCache.GetNodes().Contains(prjData.GetNodes().ElementAt(0)));
+ Assert.IsTrue(prjCache.GetNodes().Contains(prjData.GetNodes().ElementAt(1)));
// Client nodes.
- IClusterGroup prjClient = _grid1.Cluster.ForClientNodes("cache1");
+ IClusterGroup prjClient = _grid1.GetCluster().ForClientNodes("cache1");
- Assert.AreEqual(0, prjClient.Nodes().Count);
+ Assert.AreEqual(0, prjClient.GetNodes().Count);
}
/// <summary>
@@ -579,15 +579,15 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestForPredicate()
{
- IClusterGroup prj1 = _grid1.Cluster.ForPredicate(new NotAttributePredicate("value1").Apply);
- Assert.AreEqual(2, prj1.Nodes().Count);
+ IClusterGroup prj1 = _grid1.GetCluster().ForPredicate(new NotAttributePredicate("value1").Apply);
+ Assert.AreEqual(2, prj1.GetNodes().Count);
IClusterGroup prj2 = prj1.ForPredicate(new NotAttributePredicate("value2").Apply);
- Assert.AreEqual(1, prj2.Nodes().Count);
+ Assert.AreEqual(1, prj2.GetNodes().Count);
string val;
- prj2.Nodes().First().TryGetAttribute("my_attr", out val);
+ prj2.GetNodes().First().TryGetAttribute("my_attr", out val);
Assert.IsTrue(val == null || (!val.Equals("value1") && !val.Equals("value2")));
}
@@ -628,119 +628,119 @@ namespace Apache.Ignite.Core.Tests.Compute
{
decimal val;
- Assert.AreEqual(val = decimal.Zero, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
-
- Assert.AreEqual(val = new decimal(0, 0, 1, false, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, 1, true, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, 1, false, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, 1, true, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, 1, false, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, 1, true, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, int.MinValue, false, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, int.MinValue, true, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, int.MinValue, false, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, int.MinValue, true, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, int.MinValue, false, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, int.MinValue, true, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, int.MaxValue, false, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, int.MaxValue, true, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, int.MaxValue, false, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, int.MaxValue, true, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, int.MaxValue, false, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 0, int.MaxValue, true, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
-
- Assert.AreEqual(val = new decimal(0, 1, 0, false, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 1, 0, true, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 1, 0, false, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 1, 0, true, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 1, 0, false, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, 1, 0, true, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, int.MinValue, 0, false, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, int.MinValue, 0, true, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, int.MinValue, 0, false, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, int.MinValue, 0, true, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, int.MinValue, 0, false, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, int.MinValue, 0, true, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, int.MaxValue, 0, false, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, int.MaxValue, 0, true, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, int.MaxValue, 0, false, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, int.MaxValue, 0, true, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, int.MaxValue, 0, false, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(0, int.MaxValue, 0, true, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
-
- Assert.AreEqual(val = new decimal(1, 0, 0, false, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(1, 0, 0, true, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(1, 0, 0, false, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(1, 0, 0, true, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(1, 0, 0, false, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(1, 0, 0, true, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(int.MinValue, 0, 0, false, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(int.MinValue, 0, 0, true, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(int.MinValue, 0, 0, false, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(int.MinValue, 0, 0, true, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(int.MinValue, 0, 0, false, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(int.MinValue, 0, 0, true, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(int.MaxValue, 0, 0, false, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(int.MaxValue, 0, 0, true, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(int.MaxValue, 0, 0, false, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(int.MaxValue, 0, 0, true, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(int.MaxValue, 0, 0, false, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(int.MaxValue, 0, 0, true, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
-
- Assert.AreEqual(val = new decimal(1, 1, 1, false, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(1, 1, 1, true, 0), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(1, 1, 1, false, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(1, 1, 1, true, 0) - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(1, 1, 1, false, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = new decimal(1, 1, 1, true, 0) + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
-
- Assert.AreEqual(val = decimal.Parse("65536"), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-65536"), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("65536") - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-65536") - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("65536") + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-65536") + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
-
- Assert.AreEqual(val = decimal.Parse("4294967296"), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-4294967296"), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("4294967296") - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-4294967296") - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("4294967296") + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-4294967296") + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
-
- Assert.AreEqual(val = decimal.Parse("281474976710656"), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-281474976710656"), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("281474976710656") - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-281474976710656") - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("281474976710656") + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-281474976710656") + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
-
- Assert.AreEqual(val = decimal.Parse("18446744073709551616"), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-18446744073709551616"), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("18446744073709551616") - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-18446744073709551616") - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("18446744073709551616") + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-18446744073709551616") + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
-
- Assert.AreEqual(val = decimal.Parse("1208925819614629174706176"), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-1208925819614629174706176"), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("1208925819614629174706176") - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-1208925819614629174706176") - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("1208925819614629174706176") + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-1208925819614629174706176") + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
-
- Assert.AreEqual(val = decimal.MaxValue, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.MinValue, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.MaxValue - 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.MinValue + 1, _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
-
- Assert.AreEqual(val = decimal.Parse("11,12"), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
- Assert.AreEqual(val = decimal.Parse("-11,12"), _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Zero, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+
+ Assert.AreEqual(val = new decimal(0, 0, 1, false, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, 1, true, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, 1, false, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, 1, true, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, 1, false, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, 1, true, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, int.MinValue, false, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, int.MinValue, true, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, int.MinValue, false, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, int.MinValue, true, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, int.MinValue, false, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, int.MinValue, true, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, int.MaxValue, false, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, int.MaxValue, true, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, int.MaxValue, false, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, int.MaxValue, true, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, int.MaxValue, false, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 0, int.MaxValue, true, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+
+ Assert.AreEqual(val = new decimal(0, 1, 0, false, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 1, 0, true, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 1, 0, false, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 1, 0, true, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 1, 0, false, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, 1, 0, true, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, int.MinValue, 0, false, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, int.MinValue, 0, true, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, int.MinValue, 0, false, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, int.MinValue, 0, true, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, int.MinValue, 0, false, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, int.MinValue, 0, true, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, int.MaxValue, 0, false, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, int.MaxValue, 0, true, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, int.MaxValue, 0, false, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, int.MaxValue, 0, true, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, int.MaxValue, 0, false, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(0, int.MaxValue, 0, true, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+
+ Assert.AreEqual(val = new decimal(1, 0, 0, false, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(1, 0, 0, true, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(1, 0, 0, false, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(1, 0, 0, true, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(1, 0, 0, false, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(1, 0, 0, true, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(int.MinValue, 0, 0, false, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(int.MinValue, 0, 0, true, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(int.MinValue, 0, 0, false, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(int.MinValue, 0, 0, true, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(int.MinValue, 0, 0, false, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(int.MinValue, 0, 0, true, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(int.MaxValue, 0, 0, false, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(int.MaxValue, 0, 0, true, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(int.MaxValue, 0, 0, false, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(int.MaxValue, 0, 0, true, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(int.MaxValue, 0, 0, false, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(int.MaxValue, 0, 0, true, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+
+ Assert.AreEqual(val = new decimal(1, 1, 1, false, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(1, 1, 1, true, 0), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(1, 1, 1, false, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(1, 1, 1, true, 0) - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(1, 1, 1, false, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = new decimal(1, 1, 1, true, 0) + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+
+ Assert.AreEqual(val = decimal.Parse("65536"), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-65536"), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("65536") - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-65536") - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("65536") + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-65536") + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+
+ Assert.AreEqual(val = decimal.Parse("4294967296"), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-4294967296"), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("4294967296") - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-4294967296") - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("4294967296") + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-4294967296") + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+
+ Assert.AreEqual(val = decimal.Parse("281474976710656"), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-281474976710656"), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("281474976710656") - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-281474976710656") - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("281474976710656") + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-281474976710656") + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+
+ Assert.AreEqual(val = decimal.Parse("18446744073709551616"), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-18446744073709551616"), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("18446744073709551616") - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-18446744073709551616") - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("18446744073709551616") + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-18446744073709551616") + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+
+ Assert.AreEqual(val = decimal.Parse("1208925819614629174706176"), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-1208925819614629174706176"), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("1208925819614629174706176") - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-1208925819614629174706176") - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("1208925819614629174706176") + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-1208925819614629174706176") + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+
+ Assert.AreEqual(val = decimal.MaxValue, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.MinValue, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.MaxValue - 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.MinValue + 1, _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+
+ Assert.AreEqual(val = decimal.Parse("11,12"), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
+ Assert.AreEqual(val = decimal.Parse("-11,12"), _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { val, val.ToString() }));
// Test echo with overflow.
try
{
- _grid1.Compute().ExecuteJavaTask<object>(DecimalTask, new object[] { null, decimal.MaxValue.ToString() + 1 });
+ _grid1.GetCompute().ExecuteJavaTask<object>(DecimalTask, new object[] { null, decimal.MaxValue.ToString() + 1 });
Assert.Fail();
}
@@ -756,7 +756,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestEchoTaskNull()
{
- Assert.IsNull(_grid1.Compute().ExecuteJavaTask<object>(EchoTask, EchoTypeNull));
+ Assert.IsNull(_grid1.GetCompute().ExecuteJavaTask<object>(EchoTask, EchoTypeNull));
}
/// <summary>
@@ -765,14 +765,14 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestEchoTaskPrimitives()
{
- Assert.AreEqual(1, _grid1.Compute().ExecuteJavaTask<byte>(EchoTask, EchoTypeByte));
- Assert.AreEqual(true, _grid1.Compute().ExecuteJavaTask<bool>(EchoTask, EchoTypeBool));
- Assert.AreEqual(1, _grid1.Compute().ExecuteJavaTask<short>(EchoTask, EchoTypeShort));
- Assert.AreEqual((char)1, _grid1.Compute().ExecuteJavaTask<char>(EchoTask, EchoTypeChar));
- Assert.AreEqual(1, _grid1.Compute().ExecuteJavaTask<int>(EchoTask, EchoTypeInt));
- Assert.AreEqual(1, _grid1.Compute().ExecuteJavaTask<long>(EchoTask, EchoTypeLong));
- Assert.AreEqual((float)1, _grid1.Compute().ExecuteJavaTask<float>(EchoTask, EchoTypeFloat));
- Assert.AreEqual((double)1, _grid1.Compute().ExecuteJavaTask<double>(EchoTask, EchoTypeDouble));
+ Assert.AreEqual(1, _grid1.GetCompute().ExecuteJavaTask<byte>(EchoTask, EchoTypeByte));
+ Assert.AreEqual(true, _grid1.GetCompute().ExecuteJavaTask<bool>(EchoTask, EchoTypeBool));
+ Assert.AreEqual(1, _grid1.GetCompute().ExecuteJavaTask<short>(EchoTask, EchoTypeShort));
+ Assert.AreEqual((char)1, _grid1.GetCompute().ExecuteJavaTask<char>(EchoTask, EchoTypeChar));
+ Assert.AreEqual(1, _grid1.GetCompute().ExecuteJavaTask<int>(EchoTask, EchoTypeInt));
+ Assert.AreEqual(1, _grid1.GetCompute().ExecuteJavaTask<long>(EchoTask, EchoTypeLong));
+ Assert.AreEqual((float)1, _grid1.GetCompute().ExecuteJavaTask<float>(EchoTask, EchoTypeFloat));
+ Assert.AreEqual((double)1, _grid1.GetCompute().ExecuteJavaTask<double>(EchoTask, EchoTypeDouble));
}
/// <summary>
@@ -781,17 +781,17 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestEchoTaskCompound()
{
- int[] res1 = _grid1.Compute().ExecuteJavaTask<int[]>(EchoTask, EchoTypeArray);
+ int[] res1 = _grid1.GetCompute().ExecuteJavaTask<int[]>(EchoTask, EchoTypeArray);
Assert.AreEqual(1, res1.Length);
Assert.AreEqual(1, res1[0]);
- IList<int> res2 = _grid1.Compute().ExecuteJavaTask<IList<int>>(EchoTask, EchoTypeCollection);
+ IList<int> res2 = _grid1.GetCompute().ExecuteJavaTask<IList<int>>(EchoTask, EchoTypeCollection);
Assert.AreEqual(1, res2.Count);
Assert.AreEqual(1, res2[0]);
- IDictionary<int, int> res3 = _grid1.Compute().ExecuteJavaTask<IDictionary<int, int>>(EchoTask, EchoTypeMap);
+ IDictionary<int, int> res3 = _grid1.GetCompute().ExecuteJavaTask<IDictionary<int, int>>(EchoTask, EchoTypeMap);
Assert.AreEqual(1, res3.Count);
Assert.AreEqual(1, res3[1]);
@@ -803,7 +803,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestEchoTaskPortable()
{
- PlatformComputePortable res = _grid1.Compute().ExecuteJavaTask<PlatformComputePortable>(EchoTask, EchoTypePortable);
+ PlatformComputePortable res = _grid1.GetCompute().ExecuteJavaTask<PlatformComputePortable>(EchoTask, EchoTypePortable);
Assert.AreEqual(1, res.Field);
}
@@ -814,13 +814,13 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestEchoTaskPortableNoClass()
{
- ICompute compute = _grid1.Compute();
+ ICompute compute = _grid1.GetCompute();
compute.WithKeepPortable();
IPortableObject res = compute.ExecuteJavaTask<IPortableObject>(EchoTask, EchoTypePortableJava);
- Assert.AreEqual(1, res.Field<int>("field"));
+ Assert.AreEqual(1, res.GetField<int>("field"));
// This call must fail because "keepPortable" flag is reset.
Assert.Catch(typeof(PortableException), () =>
@@ -835,7 +835,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestEchoTaskObjectArray()
{
- var res = _grid1.Compute().ExecuteJavaTask<string[]>(EchoTask, EchoTypeObjArray);
+ var res = _grid1.GetCompute().ExecuteJavaTask<string[]>(EchoTask, EchoTypeObjArray);
Assert.AreEqual(new[] {"foo", "bar", "baz"}, res);
}
@@ -846,7 +846,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestEchoTaskPortableArray()
{
- var res = _grid1.Compute().ExecuteJavaTask<PlatformComputePortable[]>(EchoTask, EchoTypePortableArray);
+ var res = _grid1.GetCompute().ExecuteJavaTask<PlatformComputePortable[]>(EchoTask, EchoTypePortableArray);
Assert.AreEqual(3, res.Length);
@@ -860,7 +860,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestEchoTaskEnum()
{
- var res = _grid1.Compute().ExecuteJavaTask<InteropComputeEnum>(EchoTask, EchoTypeEnum);
+ var res = _grid1.GetCompute().ExecuteJavaTask<InteropComputeEnum>(EchoTask, EchoTypeEnum);
Assert.AreEqual(InteropComputeEnum.Bar, res);
}
@@ -871,7 +871,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestEchoTaskEnumArray()
{
- var res = _grid1.Compute().ExecuteJavaTask<InteropComputeEnum[]>(EchoTask, EchoTypeEnumArray);
+ var res = _grid1.GetCompute().ExecuteJavaTask<InteropComputeEnum[]>(EchoTask, EchoTypeEnumArray);
Assert.AreEqual(new[]
{
@@ -887,7 +887,7 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestPortableArgTask()
{
- ICompute compute = _grid1.Compute();
+ ICompute compute = _grid1.GetCompute();
compute.WithKeepPortable();
@@ -906,18 +906,18 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestBroadcastTask()
{
- ICollection<Guid> res = _grid1.Compute().ExecuteJavaTask<ICollection<Guid>>(BroadcastTask, null);
+ ICollection<Guid> res = _grid1.GetCompute().ExecuteJavaTask<ICollection<Guid>>(BroadcastTask, null);
Assert.AreEqual(3, res.Count);
- Assert.AreEqual(1, _grid1.Cluster.ForNodeIds(res.ElementAt(0)).Nodes().Count);
- Assert.AreEqual(1, _grid1.Cluster.ForNodeIds(res.ElementAt(1)).Nodes().Count);
- Assert.AreEqual(1, _grid1.Cluster.ForNodeIds(res.ElementAt(2)).Nodes().Count);
+ Assert.AreEqual(1, _grid1.GetCluster().ForNodeIds(res.ElementAt(0)).GetNodes().Count);
+ Assert.AreEqual(1, _grid1.GetCluster().ForNodeIds(res.ElementAt(1)).GetNodes().Count);
+ Assert.AreEqual(1, _grid1.GetCluster().ForNodeIds(res.ElementAt(2)).GetNodes().Count);
- var prj = _grid1.Cluster.ForPredicate(node => res.Take(2).Contains(node.Id));
+ var prj = _grid1.GetCluster().ForPredicate(node => res.Take(2).Contains(node.Id));
- Assert.AreEqual(2, prj.Nodes().Count);
+ Assert.AreEqual(2, prj.GetNodes().Count);
- ICollection<Guid> filteredRes = prj.Compute().ExecuteJavaTask<ICollection<Guid>>(BroadcastTask, null);
+ ICollection<Guid> filteredRes = prj.GetCompute().ExecuteJavaTask<ICollection<Guid>>(BroadcastTask, null);
Assert.AreEqual(2, filteredRes.Count);
Assert.IsTrue(filteredRes.Contains(res.ElementAt(0)));
@@ -930,20 +930,20 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestBroadcastTaskAsync()
{
- var gridCompute = _grid1.Compute().WithAsync();
+ var gridCompute = _grid1.GetCompute().WithAsync();
Assert.IsNull(gridCompute.ExecuteJavaTask<ICollection<Guid>>(BroadcastTask, null));
ICollection<Guid> res = gridCompute.GetFuture<ICollection<Guid>>().Get();
Assert.AreEqual(3, res.Count);
- Assert.AreEqual(1, _grid1.Cluster.ForNodeIds(res.ElementAt(0)).Nodes().Count);
- Assert.AreEqual(1, _grid1.Cluster.ForNodeIds(res.ElementAt(1)).Nodes().Count);
- Assert.AreEqual(1, _grid1.Cluster.ForNodeIds(res.ElementAt(2)).Nodes().Count);
+ Assert.AreEqual(1, _grid1.GetCluster().ForNodeIds(res.ElementAt(0)).GetNodes().Count);
+ Assert.AreEqual(1, _grid1.GetCluster().ForNodeIds(res.ElementAt(1)).GetNodes().Count);
+ Assert.AreEqual(1, _grid1.GetCluster().ForNodeIds(res.ElementAt(2)).GetNodes().Count);
- var prj = _grid1.Cluster.ForPredicate(node => res.Take(2).Contains(node.Id));
+ var prj = _grid1.GetCluster().ForPredicate(node => res.Take(2).Contains(node.Id));
- Assert.AreEqual(2, prj.Nodes().Count);
+ Assert.AreEqual(2, prj.GetNodes().Count);
- var compute = prj.Compute().WithAsync();
+ var compute = prj.GetCompute().WithAsync();
Assert.IsNull(compute.ExecuteJavaTask<ICollection<Guid>>(BroadcastTask, null));
ICollection<Guid> filteredRes = compute.GetFuture<ICollection<Guid>>().Get();
@@ -960,9 +960,9 @@ namespace Apache.Ignite.Core.Tests.Compute
{
ComputeAction.InvokeCount = 0;
- _grid1.Compute().Broadcast(new ComputeAction());
+ _grid1.GetCompute().Broadcast(new ComputeAction());
- Assert.AreEqual(_grid1.Cluster.Nodes().Count, ComputeAction.InvokeCount);
+ Assert.AreEqual(_grid1.GetCluster().GetNodes().Count, ComputeAction.InvokeCount);
}
/// <summary>
@@ -973,7 +973,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
ComputeAction.InvokeCount = 0;
- _grid1.Compute().Run(new ComputeAction());
+ _grid1.GetCompute().Run(new ComputeAction());
Assert.AreEqual(1, ComputeAction.InvokeCount);
}
@@ -988,7 +988,7 @@ namespace Apache.Ignite.Core.Tests.Compute
var actions = Enumerable.Range(0, 10).Select(x => new ComputeAction());
- _grid1.Compute().Run(actions);
+ _grid1.GetCompute().Run(actions);
Assert.AreEqual(10, ComputeAction.InvokeCount);
}
@@ -1002,17 +1002,17 @@ namespace Apache.Ignite.Core.Tests.Compute
const string cacheName = null;
// Test keys for non-client nodes
- var nodes = new[] {_grid1, _grid2}.Select(x => x.Cluster.LocalNode);
+ var nodes = new[] {_grid1, _grid2}.Select(x => x.GetCluster().GetLocalNode());
- var aff = _grid1.Affinity(cacheName);
+ var aff = _grid1.GetAffinity(cacheName);
foreach (var node in nodes)
{
var primaryKey = Enumerable.Range(1, int.MaxValue).First(x => aff.IsPrimary(node, x));
- var affinityKey = _grid1.Affinity(cacheName).AffinityKey<int, int>(primaryKey);
+ var affinityKey = _grid1.GetAffinity(cacheName).GetAffinityKey<int, int>(primaryKey);
- _grid1.Compute().AffinityRun(cacheName, affinityKey, new ComputeAction());
+ _grid1.GetCompute().AffinityRun(cacheName, affinityKey, new ComputeAction());
Assert.AreEqual(node.Id, ComputeAction.LastNodeId);
}
@@ -1027,17 +1027,17 @@ namespace Apache.Ignite.Core.Tests.Compute
const string cacheName = null;
// Test keys for non-client nodes
- var nodes = new[] { _grid1, _grid2 }.Select(x => x.Cluster.LocalNode);
+ var nodes = new[] { _grid1, _grid2 }.Select(x => x.GetCluster().GetLocalNode());
- var aff = _grid1.Affinity(cacheName);
+ var aff = _grid1.GetAffinity(cacheName);
foreach (var node in nodes)
{
var primaryKey = Enumerable.Range(1, int.MaxValue).First(x => aff.IsPrimary(node, x));
- var affinityKey = _grid1.Affinity(cacheName).AffinityKey<int, int>(primaryKey);
+ var affinityKey = _grid1.GetAffinity(cacheName).GetAffinityKey<int, int>(primaryKey);
- var result = _grid1.Compute().AffinityCall(cacheName, affinityKey, new ComputeFunc());
+ var result = _grid1.GetCompute().AffinityCall(cacheName, affinityKey, new ComputeFunc());
Assert.AreEqual(result, ComputeFunc.InvokeCount);
@@ -1051,12 +1051,12 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestWithNoFailover()
{
- ICollection<Guid> res = _grid1.Compute().WithNoFailover().ExecuteJavaTask<ICollection<Guid>>(BroadcastTask, null);
+ ICollection<Guid> res = _grid1.GetCompute().WithNoFailover().ExecuteJavaTask<ICollection<Guid>>(BroadcastTask, null);
Assert.AreEqual(3, res.Count);
- Assert.AreEqual(1, _grid1.Cluster.ForNodeIds(res.ElementAt(0)).Nodes().Count);
- Assert.AreEqual(1, _grid1.Cluster.ForNodeIds(res.ElementAt(1)).Nodes().Count);
- Assert.AreEqual(1, _grid1.Cluster.ForNodeIds(res.ElementAt(2)).Nodes().Count);
+ Assert.AreEqual(1, _grid1.GetCluster().ForNodeIds(res.ElementAt(0)).GetNodes().Count);
+ Assert.AreEqual(1, _grid1.GetCluster().ForNodeIds(res.ElementAt(1)).GetNodes().Count);
+ Assert.AreEqual(1, _grid1.GetCluster().ForNodeIds(res.ElementAt(2)).GetNodes().Count);
}
/// <summary>
@@ -1065,12 +1065,12 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestWithTimeout()
{
- ICollection<Guid> res = _grid1.Compute().WithTimeout(1000).ExecuteJavaTask<ICollection<Guid>>(BroadcastTask, null);
+ ICollection<Guid> res = _grid1.GetCompute().WithTimeout(1000).ExecuteJavaTask<ICollection<Guid>>(BroadcastTask, null);
Assert.AreEqual(3, res.Count);
- Assert.AreEqual(1, _grid1.Cluster.ForNodeIds(res.ElementAt(0)).Nodes().Count);
- Assert.AreEqual(1, _grid1.Cluster.ForNodeIds(res.ElementAt(1)).Nodes().Count);
- Assert.AreEqual(1, _grid1.Cluster.ForNodeIds(res.ElementAt(2)).Nodes().Count);
+ Assert.AreEqual(1, _grid1.GetCluster().ForNodeIds(res.ElementAt(0)).GetNodes().Count);
+ Assert.AreEqual(1, _grid1.GetCluster().ForNodeIds(res.ElementAt(1)).GetNodes().Count);
+ Assert.AreEqual(1, _grid1.GetCluster().ForNodeIds(res.ElementAt(2)).GetNodes().Count);
}
/// <summary>
@@ -1079,10 +1079,10 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestNetTaskSimple()
{
- int res = _grid1.Compute().Execute<NetSimpleJobArgument, NetSimpleJobResult, NetSimpleTaskResult>(
+ int res = _grid1.GetCompute().Execute<NetSimpleJobArgument, NetSimpleJobResult, NetSimpleTaskResult>(
typeof(NetSimpleTask), new NetSimpleJobArgument(1)).Res;
- Assert.AreEqual(_grid1.Compute().ClusterGroup.Nodes().Count, res);
+ Assert.AreEqual(_grid1.GetCompute().ClusterGroup.GetNodes().Count, res);
}
/// <summary>
@@ -1228,7 +1228,7 @@ namespace Apache.Ignite.Core.Tests.Compute
public void Invoke()
{
Interlocked.Increment(ref InvokeCount);
- LastNodeId = _grid.Cluster.LocalNode.Id;
+ LastNodeId = _grid.GetCluster().GetLocalNode().Id;
}
}
@@ -1255,7 +1255,7 @@ namespace Apache.Ignite.Core.Tests.Compute
int IComputeFunc<int>.Invoke()
{
InvokeCount++;
- LastNodeId = _grid.Cluster.LocalNode.Id;
+ LastNodeId = _grid.GetCluster().GetLocalNode().Id;
return InvokeCount;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeMultithreadedTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeMultithreadedTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeMultithreadedTest.cs
index 36a0505..5b6874f 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeMultithreadedTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ComputeMultithreadedTest.cs
@@ -75,7 +75,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
Assert.AreEqual(_actions.Count, 6);
- var compute = Grid1.Compute();
+ var compute = Grid1.GetCompute();
TestUtils.RunMultiThreaded(() =>
{
@@ -91,7 +91,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
Assert.AreEqual(_actions.Count, 6);
- TestUtils.RunMultiThreaded(() => _actions[0](Grid1.Compute()), 4, 20);
+ TestUtils.RunMultiThreaded(() => _actions[0](Grid1.GetCompute()), 4, 20);
}
/// <summary>
@@ -102,7 +102,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
Assert.AreEqual(_actions.Count, 6);
- TestUtils.RunMultiThreaded(() => _actions[1](Grid1.Compute()), 4, 20);
+ TestUtils.RunMultiThreaded(() => _actions[1](Grid1.GetCompute()), 4, 20);
}
/// <summary>
@@ -113,7 +113,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
Assert.AreEqual(_actions.Count, 6);
- TestUtils.RunMultiThreaded(() => _actions[2](Grid1.Compute()), 4, 20);
+ TestUtils.RunMultiThreaded(() => _actions[2](Grid1.GetCompute()), 4, 20);
}
/// <summary>
@@ -124,7 +124,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
Assert.AreEqual(_actions.Count, 6);
- TestUtils.RunMultiThreaded(() => _actions[3](Grid1.Compute()), 4, 20);
+ TestUtils.RunMultiThreaded(() => _actions[3](Grid1.GetCompute()), 4, 20);
}
/// <summary>
///
@@ -134,7 +134,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
Assert.AreEqual(_actions.Count, 6);
- TestUtils.RunMultiThreaded(() => _actions[4](Grid1.Compute()), 4, 20);
+ TestUtils.RunMultiThreaded(() => _actions[4](Grid1.GetCompute()), 4, 20);
}
/// <summary>
@@ -145,7 +145,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
Assert.AreEqual(_actions.Count, 6);
- TestUtils.RunMultiThreaded(() => _actions[5](Grid1.Compute()), 4, 20);
+ TestUtils.RunMultiThreaded(() => _actions[5](Grid1.GetCompute()), 4, 20);
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/FailoverTaskSelfTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/FailoverTaskSelfTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/FailoverTaskSelfTest.cs
index 6240bb9..e46ec64 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/FailoverTaskSelfTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/FailoverTaskSelfTest.cs
@@ -55,7 +55,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
for (int i = 0; i < 20; i++)
{
- int res = Grid1.Compute().Call(new TestClosure());
+ int res = Grid1.GetCompute().Call(new TestClosure());
Assert.AreEqual(2, res);
@@ -86,14 +86,14 @@ namespace Apache.Ignite.Core.Tests.Compute
/// </summary>
private void TestTaskAdapterFailoverException(bool serializable)
{
- int res = Grid1.Compute().Execute(new TestTask(),
+ int res = Grid1.GetCompute().Execute(new TestTask(),
new Tuple<bool, bool>(serializable, true));
Assert.AreEqual(2, res);
Cleanup();
- res = Grid1.Compute().Execute(new TestTask(),
+ res = Grid1.GetCompute().Execute(new TestTask(),
new Tuple<bool, bool>(serializable, false));
Assert.AreEqual(2, res);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/IgniteExceptionTaskSelfTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/IgniteExceptionTaskSelfTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/IgniteExceptionTaskSelfTest.cs
index 9918dce..62f860d 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/IgniteExceptionTaskSelfTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/IgniteExceptionTaskSelfTest.cs
@@ -308,7 +308,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
JobErrs.Clear();
- object res = Grid1.Compute().Execute(new Task());
+ object res = Grid1.GetCompute().Execute(new Task());
return res is GoodTaskResult ? ((GoodTaskResult)res).Res : ((BadTaskResult)res).Res;
}
@@ -325,7 +325,7 @@ namespace Apache.Ignite.Core.Tests.Compute
try
{
- Grid1.Compute().Execute(new Task());
+ Grid1.GetCompute().Execute(new Task());
Assert.Fail();
}
@@ -429,7 +429,7 @@ namespace Apache.Ignite.Core.Tests.Compute
var jobs = new Dictionary<IComputeJob<object>, IClusterNode>();
foreach (IClusterNode node in subgrid)
- jobs.Add(new GoodJob(!_grid.Cluster.LocalNode.Id.Equals(node.Id)), node);
+ jobs.Add(new GoodJob(!_grid.GetCluster().GetLocalNode().Id.Equals(node.Id)), node);
return jobs;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/PortableTaskTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/PortableTaskTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/PortableTaskTest.cs
index b3bd1b1..736aa61 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/PortableTaskTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/PortableTaskTest.cs
@@ -50,11 +50,11 @@ namespace Apache.Ignite.Core.Tests.Compute
TestTask task = new TestTask(Grid1, taskArg);
- IPortableObject res = Grid1.Compute().Execute(task, taskArg);
+ IPortableObject res = Grid1.GetCompute().Execute(task, taskArg);
Assert.NotNull(res);
- Assert.AreEqual(400, res.Field<int>("val"));
+ Assert.AreEqual(400, res.GetField<int>("val"));
PortableTaskResult resObj = res.Deserialize<PortableTaskResult>();
@@ -63,7 +63,7 @@ namespace Apache.Ignite.Core.Tests.Compute
private static IPortableObject ToPortable(IIgnite grid, object obj)
{
- var cache = grid.Cache<object, object>(Cache1Name).WithKeepPortable<object, object>();
+ var cache = grid.GetCache<object, object>(Cache1Name).WithKeepPortable<object, object>();
cache.Put(1, obj);
@@ -113,7 +113,7 @@ namespace Apache.Ignite.Core.Tests.Compute
foreach (IClusterNode node in subgrid)
{
- if (!Grid3Name.Equals(node.Attribute<string>("org.apache.ignite.ignite.name"))) // Grid3 does not have cache.
+ if (!Grid3Name.Equals(node.GetAttribute<string>("org.apache.ignite.ignite.name"))) // Grid3 does not have cache.
{
PortableJob job = new PortableJob();
@@ -132,7 +132,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
Assert.IsNotNull(taskArg);
- Assert.AreEqual(100, taskArg.Field<int>("val"));
+ Assert.AreEqual(100, taskArg.GetField<int>("val"));
PortableTaskArgument taskArgObj = taskArg.Deserialize<PortableTaskArgument>();
@@ -152,7 +152,7 @@ namespace Apache.Ignite.Core.Tests.Compute
Assert.NotNull(jobRes);
- Assert.AreEqual(300, jobRes.Field<int>("val"));
+ Assert.AreEqual(300, jobRes.GetField<int>("val"));
PortableJobResult jobResObj = jobRes.Deserialize<PortableJobResult>();
@@ -235,7 +235,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
Assert.IsNotNull(Arg);
- Assert.AreEqual(200, Arg.Field<int>("val"));
+ Assert.AreEqual(200, Arg.GetField<int>("val"));
PortableJobArgument argObj = Arg.Deserialize<PortableJobArgument>();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ResourceTaskTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ResourceTaskTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ResourceTaskTest.cs
index 4cc5982..55bb9d0 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ResourceTaskTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/ResourceTaskTest.cs
@@ -48,9 +48,9 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestTaskInjection()
{
- int res = Grid1.Compute().Execute(new InjectionTask(), 0);
+ int res = Grid1.GetCompute().Execute(new InjectionTask(), 0);
- Assert.AreEqual(Grid1.Cluster.Nodes().Count, res);
+ Assert.AreEqual(Grid1.GetCluster().GetNodes().Count, res);
}
/// <summary>
@@ -59,9 +59,9 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestClosureInjection()
{
- var res = Grid1.Compute().Broadcast(new InjectionClosure(), 1);
+ var res = Grid1.GetCompute().Broadcast(new InjectionClosure(), 1);
- Assert.AreEqual(Grid1.Cluster.Nodes().Count, res.Sum());
+ Assert.AreEqual(Grid1.GetCluster().GetNodes().Count, res.Sum());
}
/// <summary>
@@ -70,9 +70,9 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestReducerInjection()
{
- int res = Grid1.Compute().Apply(new InjectionClosure(), new List<int> { 1, 1, 1 }, new InjectionReducer());
+ int res = Grid1.GetCompute().Apply(new InjectionClosure(), new List<int> { 1, 1, 1 }, new InjectionReducer());
- Assert.AreEqual(Grid1.Cluster.Nodes().Count, res);
+ Assert.AreEqual(Grid1.GetCluster().GetNodes().Count, res);
}
/// <summary>
@@ -81,9 +81,9 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestNoResultCache()
{
- int res = Grid1.Compute().Execute(new NoResultCacheTask(), 0);
+ int res = Grid1.GetCompute().Execute(new NoResultCacheTask(), 0);
- Assert.AreEqual(Grid1.Cluster.Nodes().Count, res);
+ Assert.AreEqual(Grid1.GetCluster().GetNodes().Count, res);
}
/// <summary>
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5fd4a5b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskAdapterTest.cs
----------------------------------------------------------------------
diff --git a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskAdapterTest.cs b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskAdapterTest.cs
index cf8c663..f7fb422 100644
--- a/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskAdapterTest.cs
+++ b/modules/platform/src/test/dotnet/Apache.Ignite.Core.Tests/Compute/TaskAdapterTest.cs
@@ -46,13 +46,13 @@ namespace Apache.Ignite.Core.Tests.Compute
[Test]
public void TestTaskAdapter()
{
- Assert.AreEqual(3, Grid1.Cluster.Nodes().Count);
+ Assert.AreEqual(3, Grid1.GetCluster().GetNodes().Count);
HashSet<Guid> allNodes = new HashSet<Guid>();
for (int i = 0; i < 20 && allNodes.Count < 3; i++)
{
- HashSet<Guid> res = Grid1.Compute().Execute(new TestSplitTask(), 1);
+ HashSet<Guid> res = Grid1.GetCompute().Execute(new TestSplitTask(), 1);
Assert.AreEqual(1, res.Count);
@@ -61,11 +61,11 @@ namespace Apache.Ignite.Core.Tests.Compute
Assert.AreEqual(3, allNodes.Count);
- HashSet<Guid> res2 = Grid1.Compute().Execute<int, Guid, HashSet<Guid>>(typeof(TestSplitTask), 3);
+ HashSet<Guid> res2 = Grid1.GetCompute().Execute<int, Guid, HashSet<Guid>>(typeof(TestSplitTask), 3);
Assert.IsTrue(res2.Count > 0);
- Grid1.Compute().Execute(new TestSplitTask(), 100);
+ Grid1.GetCompute().Execute(new TestSplitTask(), 100);
Assert.AreEqual(3, allNodes.Count);
}
@@ -78,7 +78,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
for (int i = 0; i < 10; i++)
{
- bool res = Grid1.Compute().Execute(new TestJobAdapterTask(), true);
+ bool res = Grid1.GetCompute().Execute(new TestJobAdapterTask(), true);
Assert.IsTrue(res);
}
@@ -92,7 +92,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
for (int i = 0; i < 10; i++)
{
- bool res = Grid1.Compute().Execute(new TestJobAdapterTask(), false);
+ bool res = Grid1.GetCompute().Execute(new TestJobAdapterTask(), false);
Assert.IsTrue(res);
}
@@ -188,7 +188,7 @@ namespace Apache.Ignite.Core.Tests.Compute
{
Assert.NotNull(_grid);
- return _grid.Cluster.LocalNode.Id;
+ return _grid.GetCluster().GetLocalNode().Id;
}
/** <inheritDoc /> */