class RedisGlobalOnlineRepository implements GlobalOnlineRepository {

    @Override
    public Map<String, Integer> getGroupsOnline() {
        return redisTransactions.runTransaction(jedis -> {
            Map<String, Integer> result = new HashMap<>();
            Map<String, String> stringMap = jedis.hgetAll(HASH_TABLE);
            for (Map.Entry<String, String> entry : stringMap.entrySet()) {
                result.put(entry.getKey(), Integer.valueOf(entry.getValue()));
            }
            return result;
        });
    }

}