use of com.b2international.snowowl.core.domain.CappedTransactionContext in project snow-owl by b2ihealthcare.
the class VersioningRequest method execute.
@Override
public final Boolean execute(TransactionContext context) {
final Logger log = context.log();
log.info("Versioning components of '{}' resource...", config.getResource());
try {
// capped context to commit versioned components in the configured low watermark bulks
try (CappedTransactionContext versioningContext = new CappedTransactionContext(context, getCommitLimit(context))) {
doVersionComponents(versioningContext);
}
} catch (Exception e) {
if (e instanceof ApiException) {
throw (ApiException) e;
}
throw new SnowowlRuntimeException(e);
}
return Boolean.TRUE;
}
Aggregations