Package com.pardot.rhombus

Examples of com.pardot.rhombus.UpdateProcessor


    //wait for consistency
    Thread.sleep(3000);

    //now run the processor
    UpdateProcessor up = new UpdateProcessor(om);
    up.process(9999L);

    //verify that the object is no longer present in the invalid indexes

    //Should be missing from the bad index
    criteria = new Criteria();
View Full Code Here


    Thread.sleep(2000);



    UpdateProcessor up = new UpdateProcessor(om);
    //Test that we only see 4 happening within 90 milliseconds of each other
    assertEquals(4, up.getUpdatesThatHappenedWithinTimeframe(900000L).size()); //90 milliseconds

    //Test that we can see all 5 diffs when we search for those happening within 9 seconds of each other
    assertEquals(5, up.getUpdatesThatHappenedWithinTimeframe(900000L * 1000).size()); //9 seconds

    cm.teardown();
  }
View Full Code Here

    om.update("testtype", key2, updateObj);

    Thread.sleep(3000);

    // Test row examine limit
    UpdateProcessor up = new UpdateProcessor(om);
    assertEquals(1, up.getUpdatesThatHappenedWithinTimeframe(900000L, 1).size());
    assertEquals(2, up.getUpdatesThatHappenedWithinTimeframe(900000L, 2).size());

    cm.teardown();
  }
View Full Code Here

    om.update("testtype",key,testObject);

    Thread.sleep(3500);

    //now run the processor
    UpdateProcessor up = new UpdateProcessor(om);
    up.process(9999L);

    //But is should be present in the correct index
    Criteria criteria = new Criteria();
    SortedMap<String,Object> values = Maps.newTreeMap();
    values.put("foreignid", Long.valueOf(77));
View Full Code Here

    if(!ret){
      return false;
    }
    try{
      getConnectionManager().setDefaultKeyspace(keyspaceDefinition);
      UpdateProcessor up = new UpdateProcessor(this.objectMapper);

      boolean didwork = false;
      long rowLimit = 0;
      if(cl.hasOption("rowLimit")) {
        rowLimit = Long.parseLong(cl.getOptionValue("rowLimit"));
      }
      if(cl.hasOption("listUpdates")){
        String timestr = cl.getOptionValue("listUpdates");
        long time = Long.parseLong(timestr);
        up.displayListResults(up.getUpdatesThatHappenedWithinTimeframe(time, rowLimit));
        didwork = true;
      }

      if(cl.hasOption("p")){
        up.process(rowLimit);
        didwork = true;
      }

      if(didwork){
        return true;
View Full Code Here

TOP

Related Classes of com.pardot.rhombus.UpdateProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.