Esempio n. 1
0
 public CassandraClientMonitor(HConnectionManager connectionManager) {
   this.connectionManager = connectionManager;
   counters = new HashMap<Counter, AtomicLong>();
   for (Counter counter : Counter.values()) {
     counters.put(counter, new AtomicLong(0));
   }
 }
Esempio n. 2
0
  public StatsCollector() {
    counters = new EnumMap<Counter, AtomicInteger>(Counter.class);
    durations = new EnumMap<Duration, AtomicLong>(Duration.class);

    for (Counter counter : Counter.values()) {
      counters.put(counter, new AtomicInteger(0));
    }

    for (Duration duration : Duration.values()) {
      durations.put(duration, new AtomicLong(0));
    }
  }