iota-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tonyfaust...@apache.org
Subject [5/8] incubator-iota git commit: Implemented FeyGenericActor define INFO for monitoring
Date Mon, 11 Jul 2016 18:50:35 GMT
Implemented FeyGenericActor define INFO for monitoring

- INFO for stop
- INFO for start


Project: http://git-wip-us.apache.org/repos/asf/incubator-iota/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-iota/commit/788b90a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-iota/tree/788b90a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-iota/diff/788b90a1

Branch: refs/heads/master
Commit: 788b90a1cc7dd11c8c74960892bb15a79136dc28
Parents: 9897669
Author: Barbara Gomes <barbaramaltagomes@gmail.com>
Authored: Fri Jul 8 16:24:41 2016 -0700
Committer: Barbara Gomes <barbaramaltagomes@gmail.com>
Committed: Mon Jul 11 10:52:02 2016 -0700

----------------------------------------------------------------------
 .../org/apache/iota/fey/FeyGenericActor.scala     | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/788b90a1/fey-core/src/main/scala/org/apache/iota/fey/FeyGenericActor.scala
----------------------------------------------------------------------
diff --git a/fey-core/src/main/scala/org/apache/iota/fey/FeyGenericActor.scala b/fey-core/src/main/scala/org/apache/iota/fey/FeyGenericActor.scala
index 0e26252..9c6f5c5 100644
--- a/fey-core/src/main/scala/org/apache/iota/fey/FeyGenericActor.scala
+++ b/fey-core/src/main/scala/org/apache/iota/fey/FeyGenericActor.scala
@@ -82,13 +82,13 @@ abstract class FeyGenericActor(val params: Map[String,String] = Map.empty,
   }
 
   override final def preStart() = {
-    SYSTEM_ACTORS.monitoring  ! Monitor.START(Utils.getTimestamp)
+    SYSTEM_ACTORS.monitoring  ! Monitor.START(Utils.getTimestamp, startMonitorInfo)
     onStart()
     startScheduler()
   }
 
   override final def postStop() = {
-    SYSTEM_ACTORS.monitoring  ! Monitor.STOP(Utils.getTimestamp)
+    SYSTEM_ACTORS.monitoring  ! Monitor.STOP(Utils.getTimestamp, stopMonitorInfo)
     log.info(s"STOPPED actor ${self.path.name}")
     stopScheduler()
     onStop()
@@ -195,6 +195,20 @@ abstract class FeyGenericActor(val params: Map[String,String] = Map.empty,
     * @return
     */
   def customReceive: Receive
+
+
+  /**
+    * Used to set a info message when sending Stop monitor events
+    * @return String info
+    */
+  def stopMonitorInfo:String = "Stopped"
+
+  /**
+    * Used to set a info message when sending Start monitor events
+    * @return String info
+    */
+  def startMonitorInfo:String = "Started"
+
 }
 
 object FeyGenericActor {


Mime
View raw message