class ConnectionImpl extends AbstractConnection {

    @Override
    public StorageCapacityResult getStorageCapacity(Integer tenantId)
        throws StorageDriverPreconditionFailedException, StorageDriverNotFoundException, StorageDriverException {
        ParametersChecker.checkParameter(TENANT_IS_A_MANDATORY_PARAMETER, tenantId);

        VitamRequestBuilder request = head()
            .withPath(OBJECTS_PATH + "/" + DataCategory.OBJECT)
            .withHeader(GlobalDataRest.X_TENANT_ID, tenantId)
            .withJsonAccept();

        try (Response response = make(request)) {
            checkStorageException(response);
            return new StorageCapacityResult(tenantId, getAvailableSpace(response));
        } catch (final VitamClientInternalException e) {
            throw new StorageDriverException(getDriverName(), VitamCode.STORAGE_TECHNICAL_INTERNAL_ERROR.getMessage(),
                true,
                e);
        }
    }

      ConnectionImpl(String driverName, VitamClientFactoryInterface<? extends AbstractConnection> factory);

}