Examples of incr()


Examples of com.cloud.utils.db.UpdateBuilder.incr()

        SearchCriteria<NetworkOpVO> sc = AllFieldsSearch.create();
        sc.setParameters("network", networkId);

        NetworkOpVO vo = createForUpdate();
        UpdateBuilder builder = getUpdateBuilder(vo);
        builder.incr(_activeNicsAttribute, count);
       
        update(builder, sc, null);
    }
   
    public void setCheckForGc(long networkId) {
View Full Code Here

Examples of com.cloudera.lib.service.Instrumentation.incr()

        public void run() {
          String instrName = callable.getClass().getSimpleName();
          Instrumentation instr = getServer().get(Instrumentation.class);
          if (getServer().getStatus() == Server.Status.HALTED) {
            LOG.debug("Skipping [{}], server status [{}]", callable, getServer().getStatus());
            instr.incr(INST_GROUP, instrName + ".skips", 1);
          }
          else {
            LOG.debug("Executing [{}]", callable);
            instr.incr(INST_GROUP, instrName + ".execs", 1);
            Instrumentation.Cron cron = instr.createCron().start();
View Full Code Here

Examples of com.cloudera.lib.service.Instrumentation.incr()

            LOG.debug("Skipping [{}], server status [{}]", callable, getServer().getStatus());
            instr.incr(INST_GROUP, instrName + ".skips", 1);
          }
          else {
            LOG.debug("Executing [{}]", callable);
            instr.incr(INST_GROUP, instrName + ".execs", 1);
            Instrumentation.Cron cron = instr.createCron().start();
            try {
              callable.call();
            }
            catch (Exception ex) {
View Full Code Here

Examples of com.cloudera.lib.service.Instrumentation.incr()

            Instrumentation.Cron cron = instr.createCron().start();
            try {
              callable.call();
            }
            catch (Exception ex) {
              instr.incr(INST_GROUP, instrName + ".fails", 1);
              LOG.error("Error executing [{}], {}", new Object[]{callable, ex.getMessage(), ex});
            }
            finally {
              instr.addCron(INST_GROUP, instrName, cron.stop());
            }
View Full Code Here

Examples of com.cloudera.lib.service.Instrumentation.incr()

    Server server = new Server("server", dir, dir, dir, dir, conf);
    server.init();

    Instrumentation instrumentation = server.get(Instrumentation.class);
    Assert.assertNotNull(instrumentation);
    instrumentation.incr("g", "c", 1);
    instrumentation.incr("g", "c", 2);
    instrumentation.incr("g", "c1", 2);

    Instrumentation.Cron cron = instrumentation.createCron();
    cron.start();
View Full Code Here

Examples of com.cloudera.lib.service.Instrumentation.incr()

    server.init();

    Instrumentation instrumentation = server.get(Instrumentation.class);
    Assert.assertNotNull(instrumentation);
    instrumentation.incr("g", "c", 1);
    instrumentation.incr("g", "c", 2);
    instrumentation.incr("g", "c1", 2);

    Instrumentation.Cron cron = instrumentation.createCron();
    cron.start();
    sleep(100);
View Full Code Here

Examples of com.cloudera.lib.service.Instrumentation.incr()

    Instrumentation instrumentation = server.get(Instrumentation.class);
    Assert.assertNotNull(instrumentation);
    instrumentation.incr("g", "c", 1);
    instrumentation.incr("g", "c", 2);
    instrumentation.incr("g", "c1", 2);

    Instrumentation.Cron cron = instrumentation.createCron();
    cron.start();
    sleep(100);
    cron.stop();
View Full Code Here

Examples of com.google.code.hs4j.ModifyStatement.incr()

    stmt.setInt(1, 1);

    // increment 100
    sum = 100;
    for (i = 0; i < sum; i++) {
      result=stmt.incr(keys, FindOperator.EQ);
      assertTrue(result == 1);
    }
    rs = session.find(keys);
    while(rs.next()){
      System.out.println("increment age is: "+rs.getInt("age"));
View Full Code Here

Examples of com.helger.jcodemodel.JVar.incr()

            if (type.isArray()) {
                VariableNameSource localNames = nameSource.forBlock();
                JForLoop _for = body._for();
                JVar i = _for.init(types._int, localNames.get("i"), JExpr.lit(0));
                _for.test(i.lt(value.ref("length")));
                _for.update(i.incr());
                Body forBody = new Body(result, _for.body(), localNames);
                if (type.elementType().isReference())
                    forBody.appendNullableValue(type.elementType(), value.component(i));
                else
                    forBody.appendNotNullValue(type.elementType(), value.component(i));
View Full Code Here

Examples of com.sun.codemodel.JVar.incr()

      JConditional _ifListIsTooSmall = body._if(list.invoke("size").lte(index));
      JBlock _ifListIsTooSmallThen = _ifListIsTooSmall._then();
      JForLoop _for = _ifListIsTooSmallThen._for();
      JVar i = _for.init(INT, "i", list.invoke("size"));
      _for.test(i.lte(index));
      _for.update(i.incr());
      _for.body().invoke(list, "add").arg(JExpr._null());

      JVar element = body.decl(elementClass, "value", list.invoke("get").arg(index));
      JConditional _ifElementIsNull = body._if(element.eq(JExpr._null()));
      JBlock _ifElementIsNullThen = _ifElementIsNull._then();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.