import java.util.Deque;
import java.util.LinkedList;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
* Check if any previously added task requires rollback.
* Rollback is necessary if just single task requires rollback.
* @return
- * true if any of added tasks requires rollback. false if none of added tasks requires rollback.
+ * true if any of added tasks requires rollback. false if none of added tasks requires rollback.
*/
public boolean isRollbackNecessary() {
for (RollbackTask task: this.tasks) {
* It does not matter if any of the tasks requires rollback.
* All previously added tasks will be rolled back and removed from this processor.
* @return
- * number of tasks rolled back
+ * number of tasks rolled back
*/
@SuppressWarnings("checkstyle:IllegalCatch")
public int rollbackAll() {
try {
LOG.info("rolling back: {}", task.getId());
task.call();
- //this methode prototype only use the generic Exception and no specific and useable subclasse
+ //this method prototype only uses the generic Exception but no specific and useable subclass
} catch (Exception e) {
LOG.error("ERROR: Rollback task {} has failed", task.getId(), e);
}
* Rollback all tasks in case any task has failed.
* If rollback is necessary, all previously added tasks will be rolled back and removed from this processor.
* @return
- * number of tasks rolled back
+ * number of tasks rolled back
*/
public int rollbackAllIfNecessary() {
if (!isRollbackNecessary()) {