private T getAndClearUnderLock() throws Throwable {
    if(error != null) {
      throw error;
    } else {    
      // Return and clear current
      T retValue = data;
      data = null;
      return retValue;
    }
  }
private T getAndClearUnderLock ( ) throws Throwable { if ( error != null ) { throw error ; } else { T retValue = data ; data = null ; return retValue ; } }
Get and clear the slot - MUST be called while holding the lock!!
@return The data or null if no data or error exists
@throws Throwable If producer encountered an error