protected boolean acceptChunk(final IChunkMessage<IBindingSet> msg){
  if (msg == null)   throw new IllegalArgumentException();
  if (!msg.isMaterialized())   throw new IllegalStateException();
  final AbstractRunningQuery q=getRunningQuery(msg.getQueryId());
  if (q == null) {
    throw new IllegalStateException();
  }
  if (!q.acceptChunk(msg)) {
    msg.release();
    return false;
  }
  if (!isRunning()) {
    msg.release();
    return false;
  }
  priorityQueue.add(q);
  return true;
}

protected boolean acceptChunk ( final IChunkMessage < IBindingSet > msg ) { if ( msg == null ) throw new IllegalArgumentException ( ) ; if ( ! msg . isMaterialized ( ) ) throw new IllegalStateException ( ) ; final AbstractRunningQuery q = getRunningQuery ( msg . getQueryId ( ) ) ; if ( q == null ) { throw new IllegalStateException ( ) ; } if ( ! q . acceptChunk ( msg ) ) { msg . release ( ) ; return false ; } if ( ! isRunning ( ) ) { msg . release ( ) ; return false ; } priorityQueue . add ( q ) ; return true ; }
add a chunk of intermediate results for consumption by some query . the chunk will be attached to the query and the query will be scheduled for execution .
