Examples of MutableLong


Examples of org.apache.commons.lang.mutable.MutableLong

  public void incrCounter(String group, String counter, long amount) {
    if (count2.containsKey(group) == false) {
      count2.put(group, new HashMap<String,MutableLong>());
    }
    if (count2.get(group).containsKey(counter) == false) {
      count2.get(group).put(counter, new MutableLong(0));
    }
    count2.get(group).get(counter).add(amount);
   
  }
View Full Code Here

Examples of org.apache.commons.lang.mutable.MutableLong

    private MutableLong commReadBufferSizeBytes;

    private MutableLong commWriteBufferSizeBytes;

    public CommBufferSizeStats() {
        commReadBufferSizeBytes = new MutableLong(0);
        commWriteBufferSizeBytes = new MutableLong(0);
    }
View Full Code Here

Examples of org.apache.commons.lang.mutable.MutableLong

  }
 
  @Override
  public void incrCounter(Enum<?> key, long amount) {
    if (!count1.containsKey(key)) {
      count1.put(key, new MutableLong(0));
    }
    count1.get(key).add(amount);
  }
View Full Code Here

Examples of org.apache.commons.lang.mutable.MutableLong

  public void incrCounter(String group, String counter, long amount) {
    if (!count2.containsKey(group)) {
      count2.put(group, new HashMap<String,MutableLong>());
    }
    if (!count2.get(group).containsKey(counter)) {
      count2.get(group).put(counter, new MutableLong(0));
    }
    count2.get(group).get(counter).add(amount);
   
  }
View Full Code Here

Examples of org.apache.commons.lang.mutable.MutableLong

    Pair<V,MutableLong> data = dataMap.get(key);
    if (data == null) {
      return null;
    } else {
      V value = data.getFirst();
      MutableLong count = data.getSecond();
      long oldCount = count.longValue();
      count.increment();
      incrementHit(key, oldCount);
      return value;
    }
   
  }
View Full Code Here

Examples of org.apache.commons.lang.mutable.MutableLong

      return;
    }
    if (capacity == dataMap.size()) { // Cache Full
      removeLeastFrequent();
    }
    MutableLong count = new MutableLong(1L);
    Pair<V,MutableLong> data = new Pair<V,MutableLong>(value, count);
    dataMap.put(key, data);
   
    Long countKey = 1L;
    Set<K> keys = evictionMap.get(countKey);
View Full Code Here

Examples of org.apache.commons.lang.mutable.MutableLong

      Pair<List<Integer>,Long> p = it.next();
      //items += p.getFirst().size();
      //count++;
      for (Integer i : p.getFirst()) {
        if (!frequencyList.containsKey(i)) {
          frequencyList.put(i, new MutableLong(0));
        }
        frequencyList.get(i).add(p.getSecond());
      }
    }
    return frequencyList;
View Full Code Here

Examples of org.apache.commons.lang.mutable.MutableLong

      int count = 0;
      for (Set<ByteSequence> cfset : groups.values()) {
        HashMap<ByteSequence,MutableLong> map = new HashMap<ByteSequence,MutableLong>();
        for (ByteSequence bs : cfset)
          map.put(bs, new MutableLong(1));
        this.groupFams[count++] = map;
        nonDefaultColumnFamilies.addAll(cfset);
      }
     
      partitioner = new LocalityGroupUtil.Partitioner(this.groupFams);
View Full Code Here

Examples of org.apache.commons.lang.mutable.MutableLong

    TabletClientService.Iface client = null;
   
    TInfo tinfo = Tracer.traceInfo();
   
    Map<Long,CMK> cmidToCm = new HashMap<Long,CMK>();
    MutableLong cmid = new MutableLong(0);
   
    SessionID sessionId = null;
   
    try {       
      Map<TKeyExtent,List<TConditionalMutation>> tmutations = new HashMap<TKeyExtent,List<TConditionalMutation>>();
View Full Code Here

Examples of org.apache.commons.lang.mutable.MutableLong

      //items += p.getFirst().size();
      //count++;
      IntArrayList items= p.getFirst();
      for (int idx = 0; idx < items.size(); idx++) {
        if (!frequencyList.containsKey(items.get(idx))) {
          frequencyList.put(items.get(idx), new MutableLong(0));
        }
        frequencyList.get(items.get(idx)).add(p.getSecond());
      }
    }
    return frequencyList;
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.