class ShardInfoDownloader {

    public ShardingInfo getShardingInfoFromPeer(String addr) {
        int attempts = 3; // connect to peer 'retry number'
        if (StringUtils.isBlank(addr)) {
            String error = String.format("address is EMPTY or NULL : '%s'", addr);
            log.error(error);
            throw new RuntimeException(error);
        }
        ShardingInfo res = null;
        //here we are trying to create peers and trying to connect
        Peer p = peers.findOrCreatePeer(null, addr, true);
        if (p != null) {
            if (tryConnectToPeer(p, attempts)) {
                PeerClient pc = new PeerClient(p);
                res = pc.getShardingInfo();
            } else {
                log.debug("FAILED to connect to peer: {} after '{}' attempts", addr, attempts);
            }
        } else {
            log.debug("Can not create peer: {}", addr);
        }
        return res;
    }

    @Inject public  ShardInfoDownloader(PeersService peers);

}