sailConnection.begin();
return new ExceptionConvertingIteration<CacheEntry, RepositoryException>(sailConnection.listExpired()) {
@Override
protected RepositoryException convert(Exception e) {
return new RepositoryException(e);
}
/**
* Closes this Iteration as well as the wrapped Iteration if it happens to be
* a {@link info.aduna.iteration.CloseableIteration}.
*/
@Override
protected void handleClose() throws RepositoryException {
super.handleClose();
try {
sailConnection.commit();
sailConnection.close();
} catch (SailException ex) {
throw new RepositoryException(ex);
}
}
};
} catch (SailException e) {
throw new RepositoryException(e);
}
}