org.apache.sling.commons.batch/src/main/java/org/apache/sling/commons/batch/sling/CommitPerOperationStrategy.java [32:45]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public CommitPerOperationStrategy(final ResourceResolver resolver) {
        super(() -> {
            try {
                resolver.commit();
                return Result.succeeded();
            } catch (PersistenceException pe) {
                log.warn("Failed to commit operation", pe);
                return Result.failed("Failed to commit operation", pe);
            }
        }, () -> {
            resolver.revert();
            resolver.refresh();
        });
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



org.apache.sling.commons.batch/src/main/java/org/apache/sling/commons/batch/sling/CommitOnceStrategy.java [32:45]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public CommitOnceStrategy(final ResourceResolver resolver) {
        super(() -> {
            try {
                resolver.commit();
                return Result.succeeded();
            } catch (PersistenceException pe) {
                log.warn("Failed to commit operations", pe);
                return Result.failed("Failed to commit operations", pe);
            }
        }, () -> {
            resolver.revert();
            resolver.refresh();
        });
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



