some docu

This commit is contained in:
Reinhard Pointner 2007-12-24 22:22:13 +00:00
parent ecf7674c95
commit a9b6920507
1 changed files with 18 additions and 2 deletions

View File

@ -80,7 +80,10 @@ public class ChecksumComputationExecutor {
} }
public void resume() { /**
* Only use in block that is synchronized to {@link ChecksumComputationExecutor#getInstance()} after {@link ChecksumComputationExecutor#pause()} has been called.
*/
public synchronized void resume() {
if (!isPaused()) if (!isPaused())
return; return;
@ -91,7 +94,20 @@ public class ChecksumComputationExecutor {
} }
public void pause() { /**
* Synchronize to {@link ChecksumComputationExecutor#getInstance()} before using {@link ChecksumComputationExecutor#pause()}.
*
* <pre>
* synchronized (ChecksumComputationExecutor.getInstance()) {
* ChecksumComputationExecutor.getInstance().pause();
*
* // some code
*
* ChecksumComputationExecutor.getInstance().resume();
* }
* </pre>
*/
public synchronized void pause() {
if (isPaused()) if (isPaused())
return; return;