diff src/org/tmatesoft/hg/core/HgChangesetHandler.java @ 312:f9f3e9b67ccc

Facilitate cancellation and progress reporting in changelog and manifest iterations
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 27 Sep 2011 05:29:12 +0200
parents 41a778e3fd31
children 9c9c442b5f2e
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgChangesetHandler.java	Mon Sep 26 04:06:04 2011 +0200
+++ b/src/org/tmatesoft/hg/core/HgChangesetHandler.java	Tue Sep 27 05:29:12 2011 +0200
@@ -16,6 +16,8 @@
  */
 package org.tmatesoft.hg.core;
 
+import org.tmatesoft.hg.util.CancelledException;
+
 /**
  * Callback to process {@link HgChangeset changesets}.
  * 
@@ -25,8 +27,9 @@
 public interface HgChangesetHandler/*XXX perhaps, shall parameterize with exception clients can throw, like: <E extends Exception>*/ {
 	/**
 	 * @param changeset not necessarily a distinct instance each time, {@link HgChangeset#clone() clone()} if need a copy.
+	 * @throws CancelledException if handler is not interested in more changesets and iteration shall stop
 	 * @throws RuntimeException or any subclass thereof to indicate error. General contract is that RuntimeExceptions 
 	 * will be re-thrown wrapped into {@link HgCallbackTargetException}.  
 	 */
-	void next(HgChangeset changeset)/* throws E*/;
+	void next(HgChangeset changeset) throws CancelledException;
 }