Permalink
Browse files

Merge pull request #171 from zznate/cleanme

Cleanme
  • Loading branch information...
2 parents bc77a1e + b2ed00b commit 5b6c32fe45cf5292fbf980284ab7fa3a885319ab @zznate committed Mar 30, 2013
@@ -1,5 +1,6 @@
package org.usergrid.vx.experimental;
+@Deprecated
public class NonAtomicReference {
public Object something;
public String toString(){
@@ -1,7 +1,5 @@
package org.usergrid.vx.server.operations;
-import java.util.Set;
-
import org.vertx.java.core.Handler;
import org.vertx.java.core.eventbus.Message;
import org.vertx.java.core.json.JsonObject;
@@ -18,14 +16,11 @@ public void handle(Message<JsonObject> event) {
Integer id = event.body.getInteger("id");
JsonObject params = event.body.getObject("op");
JsonObject state = event.body.getObject("state");
- //state.putBoolean("autotimestamp", params.getBoolean("autotimestamp"));
- System.out.println ("components is "+params.getArray("components"));
state.putArray("components", params.getArray("components"));
event.reply(new JsonObject()
.putString(id.toString(), "OK")
.putObject("state", state)
);
-
}
}
@@ -1,10 +1,8 @@
package org.usergrid.vx.server.operations;
-import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import org.usergrid.vx.experimental.IntraOp;
import org.usergrid.vx.experimental.multiprocessor.MultiProcessor;
import org.vertx.java.core.Handler;
import org.vertx.java.core.eventbus.Message;
@@ -18,42 +16,18 @@
public MultiProcessorHandler(MultiProcessor p){
this.p=p;
}
- /*
- * JsonObject params = operation.getObject("op");
- JsonObject theParams = operation.getObject("params");
- operation.putObject("mpparams", theParams);
- operation.putObject("mpres", results.getObject("opsRes"));
- System.out.println("sendingevent to"+ params.getString("name"));
- vertx.eventBus().send("multiprocessors." + params.getString("name"), operation, this);
- */
-
- /*
- * IntraOp op = req.getE().get(i);
- String name = (String) op.getOp().get("name");
- Map params = (Map) op.getOp().get("params");
- //Processor p = state.processors.get(processorName);
- MultiProcessor p = state.multiProcessors.get(name);
-
- List<Map> mpResults = p.multiProcess(res.getOpsRes(), params);
- res.getOpsRes().put(i, mpResults);
- }
- */
+
@Override
public void handle(Message<JsonObject> event) {
- System.out.println(event);
Integer id = event.body.getInteger("id");
Map params = event.body.getObject("mpparams").toMap();
- System.out.println(params);
Map mpres = event.body.getObject("mpres").toMap();
- System.out.println(mpres);
List<Map> results = p.multiProcess(mpres, params);
- System.out.println(results);
JsonArray ja = new JsonArray();
for (Map result: results){
ja.addObject( new JsonObject(result));
}
event.reply(new JsonObject().putArray(id.toString(), ja));
-
}
-}
+}

0 comments on commit 5b6c32f

Please sign in to comment.