class SwiftQuotaFeature implements Quota {

    @Override
    public Space get() throws BackgroundException {
        long used = 0L;
        try {
            for(Region region : session.getClient().getRegions()) {
                final long bytes = session.getClient().getAccountInfo(region).getBytesUsed();
                if(log.isInfoEnabled()) {
                    log.info(String.format("Add %d used in region %s", bytes, region));
                }
                used += bytes;
            }
        }
        catch(GenericException e) {
            throw new SwiftExceptionMappingService().map("Failure to read attributes of {0}", e,
                    new Path(String.valueOf(Path.DELIMITER), EnumSet.of(Path.Type.volume, Path.Type.directory)));
        }
        catch(IOException e) {
            throw new DefaultIOExceptionMappingService().map("Failure to read attributes of {0}", e,
                    new Path(String.valueOf(Path.DELIMITER), EnumSet.of(Path.Type.volume, Path.Type.directory)));
        }
        return new Space(used, Long.MAX_VALUE);
    }

    public  SwiftQuotaFeature(final SwiftSession session);

}