Examples of incrementValue()


Examples of info.ganglia.metric.type.GMetricInteger.incrementValue()

      Thread.sleep(5000);
      count = generator.nextInt(100);
      countDouble = generator.nextDouble() * 100;
      System.out.println(count);
      System.out.println(countDouble);
      testMetric.incrementValue(count);
      testMetric2.incrementValue(countDouble);
    }
  }
}
 
View Full Code Here

Examples of info.ganglia.metric.type.GMetricInteger.incrementValue()

  public void testUpdateInt() {
    int value = 10;
    try {
      GMonitor gmon = new GMonitor(MULTICAST_ADDRESS, 30l);
      GMetricInteger testMetric = (GMetricInteger) gmon.createGMetric(host, "Ganglia Test", GMetric.VALUE_TYPE_INT, "count", GMetric.SLOPE_UNSPECIFIED, true);
      testMetric.incrementValue(value);
      testMetric.incrementValue();
      testMetric.setValue(value);
    } catch (IOException e) {
      e.printStackTrace();
      fail();
View Full Code Here

Examples of info.ganglia.metric.type.GMetricInteger.incrementValue()

    int value = 10;
    try {
      GMonitor gmon = new GMonitor(MULTICAST_ADDRESS, 30l);
      GMetricInteger testMetric = (GMetricInteger) gmon.createGMetric(host, "Ganglia Test", GMetric.VALUE_TYPE_INT, "count", GMetric.SLOPE_UNSPECIFIED, true);
      testMetric.incrementValue(value);
      testMetric.incrementValue();
      testMetric.setValue(value);
    } catch (IOException e) {
      e.printStackTrace();
      fail();
    }
View Full Code Here

Examples of net.sf.joafip.entity.rel400.BobForAutoSaveInMethodTest.incrementValue()

        .newInstance(instanceFactory);
    assertEquals("bad initial state", 0, bob.getValue());
    saveDoneFlag = false;
    int expectedIncrement = 1;
    for (int count = 0; count < 5; count++) {
      bob.incrementValue();
      assertTrue(MUST_SAVE, saveDoneFlag);
      assertTrue("must be unloaded", ProxyManager2.isUnloaded(bob));
      assertEquals("bad state", expectedIncrement, bob.getValue());
      expectedIncrement++;
    }
View Full Code Here

Examples of org.apache.phoenix.schema.Sequence.incrementValue()

            List<Sequence> toIncrementList = Lists.newArrayListWithExpectedSize(sequences.size());
            int[] indexes = new int[sequences.size()];
            for (int i = 0; i < sequences.size(); i++) {
                Sequence sequence = sequences.get(i);
                try {
                    values[i] = sequence.incrementValue(timestamp, factor, action);
                } catch (EmptySequenceCacheException e) {
                    indexes[toIncrementList.size()] = i;
                    toIncrementList.add(sequence);
                    Increment inc = sequence.newIncrement(timestamp, action);
                    incrementBatch.add(inc);
View Full Code Here

Examples of org.apache.phoenix.schema.Sequence.incrementValue()

            }
            for (int i=0;i<resultObjects.length;i++){
                Sequence sequence = toIncrementList.get(i);
                Result result = (Result)resultObjects[i];
                try {
                    values[indexes[i]] = sequence.incrementValue(result, factor);
                } catch (SQLException e) {
                    exceptions[indexes[i]] = e;
                }
            }
        } finally {
View Full Code Here

Examples of org.apache.phoenix.schema.Sequence.incrementValue()

            List<Sequence> toIncrementList = Lists.newArrayListWithExpectedSize(sequences.size());
            int[] indexes = new int[sequences.size()];
            for (int i = 0; i < sequences.size(); i++) {
                Sequence sequence = sequences.get(i);
                try {
                    values[i] = sequence.incrementValue(timestamp, factor, action);
                } catch (EmptySequenceCacheException e) {
                    indexes[toIncrementList.size()] = i;
                    toIncrementList.add(sequence);
                    Increment inc = sequence.newIncrement(timestamp, action);
                    incrementBatch.add(inc);
View Full Code Here

Examples of org.apache.phoenix.schema.Sequence.incrementValue()

            }
            for (int i=0;i<resultObjects.length;i++){
                Sequence sequence = toIncrementList.get(i);
                Result result = (Result)resultObjects[i];
                try {
                    values[indexes[i]] = sequence.incrementValue(result, factor);
                } catch (SQLException e) {
                    exceptions[indexes[i]] = e;
                }
            }
        } finally {
View Full Code Here

Examples of org.apache.phoenix.schema.Sequence.incrementValue()

            List<Sequence> toIncrementList = Lists.newArrayListWithExpectedSize(sequences.size());
            int[] indexes = new int[sequences.size()];
            for (int i = 0; i < sequences.size(); i++) {
                Sequence sequence = sequences.get(i);
                try {
                    values[i] = sequence.incrementValue(timestamp, factor, action);
                } catch (EmptySequenceCacheException e) {
                    indexes[toIncrementList.size()] = i;
                    toIncrementList.add(sequence);
                    Increment inc = sequence.newIncrement(timestamp, action);
                    incrementBatch.add(inc);
View Full Code Here

Examples of org.apache.phoenix.schema.Sequence.incrementValue()

            }
            for (int i=0;i<resultObjects.length;i++){
                Sequence sequence = toIncrementList.get(i);
                Result result = (Result)resultObjects[i];
                try {
                    values[indexes[i]] = sequence.incrementValue(result, factor);
                } catch (SQLException e) {
                    exceptions[indexes[i]] = e;
                }
            }
        } finally {
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.