public boolean putRecord(Object record)
      throws InterruptedException {
    if (this.forkState.compareAndSet(ForkState.FAILED, ForkState.FAILED)) {
      ForkThrowableHolder holder = Task.getForkThrowableHolder(this.broker);
      Optional<Throwable> forkThrowable = holder.getThrowable(this.index);
      if (forkThrowable.isPresent()) {
        throw new IllegalStateException(
            String.format("Fork %d of task %s has failed and is no longer running", this.index, this.taskId), forkThrowable.get());
      } else {
        throw new IllegalStateException(
            String.format("Fork %d of task %s has failed and is no longer running", this.index, this.taskId));
      }
    }
    return this.putRecordImpl(record);
  }
public boolean putRecord ( Object record ) throws InterruptedException { if ( this . forkState . compareAndSet ( ForkState . FAILED , ForkState . FAILED ) ) { ForkThrowableHolder holder = Task . getForkThrowableHolder ( this . broker ) ; Optional < Throwable > forkThrowable = holder . getThrowable ( this . index ) ; if ( forkThrowable . isPresent ( ) ) { throw new IllegalStateException ( String . format ( "Fork %d of task %s has failed and is no longer running" , this . index , this . taskId ) , forkThrowable . get ( ) ) ; } else { throw new IllegalStateException ( String . format ( "Fork %d of task %s has failed and is no longer running" , this . index , this . taskId ) ) ; } } return this . putRecordImpl ( record ) ; }
Put a new record into the record queue for this {@link Fork} to process.

<p>
This method is used by the {@link Task} that creates this {@link Fork}.
</p>

@param record the new record
@return whether the record has been successfully put into the queue
@throws InterruptedException