ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [25/51] [abbrv] incubator-ignite git commit: #ignite-106: Rename var grid$ to ignite$ in scala examples.
Date Wed, 04 Feb 2015 12:34:20 GMT
#ignite-106: Rename var grid$ to ignite$ in scala examples.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5e889cd2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5e889cd2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5e889cd2

Branch: refs/heads/ignite-164
Commit: 5e889cd26a3840a232f39594a501b860b9c57c35
Parents: dea2596
Author: ivasilinets <vasilinetc.ira@gmail.com>
Authored: Wed Feb 4 01:38:27 2015 +0300
Committer: ivasilinets <vasilinetc.ira@gmail.com>
Committed: Wed Feb 4 01:38:27 2015 +0300

----------------------------------------------------------------------
 .../scalar/examples/ScalarJvmCloudExample.scala |  2 +-
 .../scala/org/apache/ignite/scalar/scalar.scala |  4 +--
 .../scalar/tests/ScalarProjectionSpec.scala     | 36 ++++++++++----------
 3 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5e889cd2/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarJvmCloudExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarJvmCloudExample.scala
b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarJvmCloudExample.scala
index 2d73edc..9635660 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarJvmCloudExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarJvmCloudExample.scala
@@ -81,7 +81,7 @@ object ScalarJvmCloudExample {
                 null,
                 Array[JComponent](
                     new JLabel("Ignite JVM cloud started."),
-                    new JLabel("Number of nodes in the cluster: " + scalar.grid$(NODES(1)).get.cluster().nodes().size()),
+                    new JLabel("Number of nodes in the cluster: " + scalar.ignite$(NODES(1)).get.cluster().nodes().size()),
                     new JLabel("Click OK to stop.")
                 ),
                 "Ignite",

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5e889cd2/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala
----------------------------------------------------------------------
diff --git a/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala b/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala
index f7687ce..4054952 100644
--- a/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala
+++ b/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala
@@ -285,7 +285,7 @@ object scalar extends ScalarConversions {
      * @param cacheName Name of the cache to get.
      */
     @inline def cache$[K, V](@Nullable gridName: String, @Nullable cacheName: String): Option[GridCache[K,
V]] =
-        grid$(gridName) match {
+        ignite$(gridName) match {
             case Some(g) => Option(g.cache(cacheName))
             case None => None
         }
@@ -322,7 +322,7 @@ object scalar extends ScalarConversions {
      *
      * @param name Grid name.
      */
-    @inline def grid$(@Nullable name: String): Option[Ignite] =
+    @inline def ignite$(@Nullable name: String): Option[Ignite] =
         try {
             Option(Ignition.ignite(name))
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5e889cd2/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarProjectionSpec.scala
----------------------------------------------------------------------
diff --git a/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarProjectionSpec.scala
b/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarProjectionSpec.scala
index 51bb50a..a035550 100644
--- a/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarProjectionSpec.scala
+++ b/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarProjectionSpec.scala
@@ -72,78 +72,78 @@ class ScalarProjectionSpec extends FlatSpec with ShouldMatchers with BeforeAndAf
 
     it should "return all nodes" in scalar(gridConfig("node-scalar", true)) {
         assertResult(3) {
-            grid$("node-scalar").get.cluster().nodes().size
+            ignite$("node-scalar").get.cluster().nodes().size
         }
     }
 
     it should "return shown nodes" in  scalar(gridConfig("node-scalar", true)) {
-        assert(grid$("node-scalar").get.nodes$((node: ClusterNode) => node.attribute[Boolean]("shown")).size
== 2)
+        assert(ignite$("node-scalar").get.nodes$((node: ClusterNode) => node.attribute[Boolean]("shown")).size
== 2)
     }
 
     it should "return all remote nodes" in scalar(gridConfig("node-scalar", true)) {
         assertResult(2) {
-            grid$("node-scalar").get.remoteNodes$().size
+            ignite$("node-scalar").get.remoteNodes$().size
         }
     }
 
     it should "return shown remote nodes" in  scalar(gridConfig("node-scalar", true)) {
-        assert(grid$("node-scalar").get.remoteNodes$((node: ClusterNode) =>
+        assert(ignite$("node-scalar").get.remoteNodes$((node: ClusterNode) =>
             node.attribute[Boolean]("shown")).size == 1)
     }
 
     it should "correctly send messages" in scalar(gridConfig("node-scalar", true)) {
 
-        grid$("node-1").get.message().remoteListen(null, new MessagingListenActor[Any]()
{
+        ignite$("node-1").get.message().remoteListen(null, new MessagingListenActor[Any]()
{
             def receive(nodeId: UUID, msg: Any) {
                 println("node-1 received " + msg)
             }
         })
 
-        grid$("node-2").get.message().remoteListen(null, new MessagingListenActor[Any]()
{
+        ignite$("node-2").get.message().remoteListen(null, new MessagingListenActor[Any]()
{
             def receive(nodeId: UUID, msg: Any) {
                 println("node-2 received " + msg)
             }
         })
 
-        grid$("node-scalar").get !< ("Message", null)
-        grid$("node-scalar").get !< (Seq("Message1", "Message2"), null)
+        ignite$("node-scalar").get !< ("Message", null)
+        ignite$("node-scalar").get !< (Seq("Message1", "Message2"), null)
     }
 
     it should "correctly make calls" in scalar(gridConfig("node-scalar", true)) {
-        println("CALL RESULT: " + grid$("node-scalar").get #< (() => "Message", null))
+        println("CALL RESULT: " + ignite$("node-scalar").get #< (() => "Message", null))
 
-        println("ASYNC CALL RESULT: " + grid$("node-scalar").get.callAsync$[String](() =>
"Message", null).get)
+        println("ASYNC CALL RESULT: " + ignite$("node-scalar").get.callAsync$[String](()
=> "Message", null).get)
 
         val call1: () => String = () => "Message1"
         val call2: () => String = () => "Message2"
 
-        println("MULTIPLE CALL RESULT: " + grid$("node-scalar").get #< (Seq(call1, call2),
null))
+        println("MULTIPLE CALL RESULT: " + ignite$("node-scalar").get #< (Seq(call1, call2),
null))
 
         println("MULTIPLE ASYNC CALL RESULT: " +
-            (grid$("node-scalar").get #? (Seq(call1, call2), null)).get)
+            (ignite$("node-scalar").get #? (Seq(call1, call2), null)).get)
     }
 
     it should "correctly make runs" in scalar(gridConfig("node-scalar", true)) {
-        grid$("node-scalar").get *< (() => println("RUN RESULT: Message"), null)
+        ignite$("node-scalar").get *< (() => println("RUN RESULT: Message"), null)
 
-        (grid$("node-scalar").get *? (() => println("ASYNC RUN RESULT: Message"), null)).get
+        (ignite$("node-scalar").get *? (() => println("ASYNC RUN RESULT: Message"), null)).get
 
         val run1: () => Unit = () => println("RUN 1 RESULT: Message1")
         val run2: () => Unit = () => println("RUN 2 RESULT: Message2")
 
-        grid$("node-scalar").get *< (Seq(run1, run2), null)
+        ignite$("node-scalar").get *< (Seq(run1, run2), null)
 
         val runAsync1: () => Unit = () => println("ASYNC RUN 1 RESULT: Message1")
         val runAsync2: () => Unit = () => println("ASYNC RUN 2 RESULT: Message2")
 
-        (grid$("node-scalar").get *? (Seq(runAsync1, runAsync2), null)).get
+        (ignite$("node-scalar").get *? (Seq(runAsync1, runAsync2), null)).get
     }
 
     it should "correctly reduce" in scalar(gridConfig("node-scalar", true)) {
         val call1: () => Int = () => 15
         val call2: () => Int = () => 82
 
-        assert(grid$("node-scalar").get @< (Seq(call1, call2), (n: Seq[Int]) => n.sum,
null) == 97)
-        assert(grid$("node-scalar").get.reduceAsync$(Seq(call1, call2), (n: Seq[Int]) =>
n.sum, null).get == 97)
+        assert(ignite$("node-scalar").get @< (Seq(call1, call2), (n: Seq[Int]) => n.sum,
null) == 97)
+        assert(ignite$("node-scalar").get.reduceAsync$(Seq(call1, call2), (n: Seq[Int]) =>
n.sum, null).get == 97)
     }
 }


Mime
View raw message