예제 #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);
 }
예제 #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);
 }