[Reconnoiter-devel] [reconnoiter commit] Reconnoiter branch, master, updated. 0d98102c9b5f193cad2d082eb882d85193da1734

git at labs.omniti.com git at labs.omniti.com
Mon May 14 12:22:02 EDT 2012


Pushed by: jesus
The branch, master has been updated
       via  0d98102c9b5f193cad2d082eb882d85193da1734 (commit)
       via  372c4a88d11fa6e49da286bb27b6040c45b0b1bb (commit)
       via  789d4fb4503e5fe8076ac65ee389bd2185523d37 (commit)
       via  345f8ea3641b557edd023cc6833271d59bc40d45 (commit)
       via  f7b7c1e68276971c7b2a106e0f7ad7af4d64716d (commit)
      from  a6f716d7d5a83b908b2739db317651b19855f337 (commit)

Summary of changes:
 src/java/com/omniti/reconnoiter/EventHandler.java  |    8 +++++++-
 .../com/omniti/reconnoiter/MessageHandler.java     |    2 +-
 .../com/omniti/reconnoiter/event/NoitBundlev2.java |    3 ++-
 3 files changed, 10 insertions(+), 3 deletions(-)

Log:
commit 0d98102c9b5f193cad2d082eb882d85193da1734
Merge: a6f716d 372c4a8
Author: Phil Maddox <pmaddox at circonus.com>
Date:   Mon May 14 12:21:19 2012 -0400

    Allow observation of each individual component in a bundle.


commit 372c4a88d11fa6e49da286bb27b6040c45b0b1bb
Author: Philip Maddox <pmaddox at circonus.com>
Date:   Mon May 14 12:06:06 2012 -0400

    Invert default return for stopProcessing

diff --git a/src/java/com/omniti/reconnoiter/EventHandler.java b/src/java/com/omniti/reconnoiter/EventHandler.java
index 8908624..315d5f7 100644
--- a/src/java/com/omniti/reconnoiter/EventHandler.java
+++ b/src/java/com/omniti/reconnoiter/EventHandler.java
@@ -96,8 +96,8 @@ public class EventHandler {
   }
   public boolean stopProcessing(StratconMessage m, String source) {
     for ( MessageHandler mh : alternates )
-      if(mh.observe(m, source) == false)
-        return false;
-    return true;
+      if(mh.observe(m, source) == true)
+        return true;
+    return false;
   }
 }

commit 789d4fb4503e5fe8076ac65ee389bd2185523d37
Author: Philip Maddox <pmaddox at circonus.com>
Date:   Mon May 14 11:22:48 2012 -0400

    Added source parameter to observe

diff --git a/src/java/com/omniti/reconnoiter/EventHandler.java b/src/java/com/omniti/reconnoiter/EventHandler.java
index 5e2e8dc..8908624 100644
--- a/src/java/com/omniti/reconnoiter/EventHandler.java
+++ b/src/java/com/omniti/reconnoiter/EventHandler.java
@@ -69,7 +69,7 @@ public class EventHandler {
 
   public void processMessage(StratconMessage m) throws Exception {
     for ( MessageHandler mh : alternates )
-      if(mh.observe(m) == true)
+      if(mh.observe(m, null) == true)
         return;
     long start = System.nanoTime();
     m.handle(this);
@@ -96,7 +96,7 @@ public class EventHandler {
   }
   public boolean stopProcessing(StratconMessage m, String source) {
     for ( MessageHandler mh : alternates )
-      if(mh.observe(m) == false)
+      if(mh.observe(m, source) == false)
         return false;
     return true;
   }
diff --git a/src/java/com/omniti/reconnoiter/MessageHandler.java b/src/java/com/omniti/reconnoiter/MessageHandler.java
index 2131447..1744324 100644
--- a/src/java/com/omniti/reconnoiter/MessageHandler.java
+++ b/src/java/com/omniti/reconnoiter/MessageHandler.java
@@ -3,5 +3,5 @@ package com.omniti.reconnoiter;
 import com.omniti.reconnoiter.StratconMessage;
 
 public interface MessageHandler {
-  public boolean observe(StratconMessage m);
+  public boolean observe(StratconMessage m, String source);
 }

commit 345f8ea3641b557edd023cc6833271d59bc40d45
Author: Philip Maddox <pmaddox at circonus.com>
Date:   Mon May 14 11:09:19 2012 -0400

    Removed stopProcessing call from interface

diff --git a/src/java/com/omniti/reconnoiter/EventHandler.java b/src/java/com/omniti/reconnoiter/EventHandler.java
index 634e0d2..5e2e8dc 100644
--- a/src/java/com/omniti/reconnoiter/EventHandler.java
+++ b/src/java/com/omniti/reconnoiter/EventHandler.java
@@ -96,7 +96,7 @@ public class EventHandler {
   }
   public boolean stopProcessing(StratconMessage m, String source) {
     for ( MessageHandler mh : alternates )
-      if(mh.stopProcessing(m, source) == false)
+      if(mh.observe(m) == false)
         return false;
     return true;
   }
diff --git a/src/java/com/omniti/reconnoiter/MessageHandler.java b/src/java/com/omniti/reconnoiter/MessageHandler.java
index 10ef150..2131447 100644
--- a/src/java/com/omniti/reconnoiter/MessageHandler.java
+++ b/src/java/com/omniti/reconnoiter/MessageHandler.java
@@ -4,5 +4,4 @@ import com.omniti.reconnoiter.StratconMessage;
 
 public interface MessageHandler {
   public boolean observe(StratconMessage m);
-  public boolean stopProcessing(StratconMessage m, String source);
 }

commit f7b7c1e68276971c7b2a106e0f7ad7af4d64716d
Author: Philip Maddox <pmaddox at circonus.com>
Date:   Fri May 11 17:22:38 2012 -0400

    Added code to look at individual metrics in bundles before handling

diff --git a/src/java/com/omniti/reconnoiter/EventHandler.java b/src/java/com/omniti/reconnoiter/EventHandler.java
index d69373b..634e0d2 100644
--- a/src/java/com/omniti/reconnoiter/EventHandler.java
+++ b/src/java/com/omniti/reconnoiter/EventHandler.java
@@ -94,4 +94,10 @@ public class EventHandler {
     }
     processMessage(messages);
   }
+  public boolean stopProcessing(StratconMessage m, String source) {
+    for ( MessageHandler mh : alternates )
+      if(mh.stopProcessing(m, source) == false)
+        return false;
+    return true;
+  }
 }
diff --git a/src/java/com/omniti/reconnoiter/MessageHandler.java b/src/java/com/omniti/reconnoiter/MessageHandler.java
index 2131447..10ef150 100644
--- a/src/java/com/omniti/reconnoiter/MessageHandler.java
+++ b/src/java/com/omniti/reconnoiter/MessageHandler.java
@@ -4,4 +4,5 @@ import com.omniti.reconnoiter.StratconMessage;
 
 public interface MessageHandler {
   public boolean observe(StratconMessage m);
+  public boolean stopProcessing(StratconMessage m, String source);
 }
diff --git a/src/java/com/omniti/reconnoiter/event/NoitBundlev2.java b/src/java/com/omniti/reconnoiter/event/NoitBundlev2.java
index 2150ff2..ee2f4f4 100644
--- a/src/java/com/omniti/reconnoiter/event/NoitBundlev2.java
+++ b/src/java/com/omniti/reconnoiter/event/NoitBundlev2.java
@@ -103,7 +103,8 @@ public class NoitBundlev2 extends NoitEvent {
   public int numparts() { return 9; }
   public void handle(EventHandler eh) {
     for(NoitEvent e : items) {
-      e.handle(eh);
+      if (eh.stopProcessing(e, getPrefix()) == false)
+        e.handle(eh);
     }
   }
 }




hooks/post-receive
-- 
Reconnoiter


More information about the Reconnoiter-devel mailing list