com.bigdata.util.concurrent
Class AbstractHaltableProcess

java.lang.Object
  extended by com.bigdata.util.concurrent.AbstractHaltableProcess
Direct Known Subclasses:
AbstractMasterTask

public abstract class AbstractHaltableProcess
extends Object

Abstract base class for tasks whose processing may be halted asynchronously.

Version:
$Id: AbstractHaltableProcess.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
AbstractHaltableProcess()
           
 
Method Summary
<T extends Throwable>
T
halt(T cause)
          Indicate that processing should halt.
 void halted()
          Return unless processing has been halted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final transient org.apache.log4j.Logger log
Constructor Detail

AbstractHaltableProcess

public AbstractHaltableProcess()
Method Detail

halted

public final void halted()
Return unless processing has been halted.

Throws:
RuntimeException - wrapping the firstCause iff processing has been halted.
See Also:
halt(Throwable)

halt

public final <T extends Throwable> T halt(T cause)
Indicate that processing should halt. This method is written defensively and will not throw anything. The caller is responsible for throwing the cause out of their own context.

Parameters:
cause - The cause.
Returns:
The argument.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.