Stop a Java Snippet?

All I'm using it for is to Beep when the workflow is done.  I have nearly 1 million rows currently. This is my code:

 

if(ROWINDEX==0) java.awt.Toolkit.getDefaultToolkit().beep();

 

Pretty simple!

 

But it iterates over all 1,000,000 rows anyway.  I would love it if i could just write:

 

snippet.stop();

 

and halt the rest of the iterations..

 

Then again I guess that would probably stop the output table at that point too, which is certainly not a good idea.

 

What's the best way to get a beep?

What about the Java Edit Variable node and/or the Breakpoint node if you want to stop a workflow at a certain point?