Ejemplo n.º 1
0
 @Override
 public int get(String key)
     throws NotFoundException, UnavailableException, TimedOutException, TException {
   ConcurrentHashMap<String, AtomicInteger> countersMap = strategy.getShardingHashMap(key);
   AtomicInteger result = countersMap.get(key);
   return Util.safeResult(result);
 }
Ejemplo n.º 2
0
 @Override
 public int getLong(long key)
     throws NotFoundException, UnavailableException, TimedOutException, TException {
   NonBlockingHashMapLong<Counter> countersMapLong = strategy.getShardingCounter(key);
   Counter result = countersMapLong.get(key);
   return Util.safeResult(result);
 }