org.teiid.dqp.internal.process
Class RequestWorkItem
java.lang.Object
org.teiid.dqp.internal.process.AbstractWorkItem
org.teiid.dqp.internal.process.RequestWorkItem
- All Implemented Interfaces:
- Runnable, EventListener, javax.resource.spi.work.Work, javax.resource.spi.work.WorkListener, ThreadReuseExecutor.PrioritizedRunnable
public class RequestWorkItem
- extends AbstractWorkItem
- implements ThreadReuseExecutor.PrioritizedRunnable
dqpCore
protected final DQPCore dqpCore
useCallingThread
protected boolean useCallingThread
RequestWorkItem
public RequestWorkItem(DQPCore dqpCore,
RequestMessage requestMsg,
Request request,
ResultsReceiver<ResultsMessage> receiver,
RequestID requestID,
DQPWorkContext workContext)
isDoneProcessing
protected boolean isDoneProcessing()
- Specified by:
isDoneProcessing
in class AbstractWorkItem
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class AbstractWorkItem
resumeProcessing
protected void resumeProcessing()
- Specified by:
resumeProcessing
in class AbstractWorkItem
doMoreWork
public void doMoreWork()
- Special call from request threads to allow resumption of processing by
the calling thread.
process
protected void process()
- Specified by:
process
in class AbstractWorkItem
processMore
protected void processMore()
throws BlockedException,
TeiidException
- Throws:
BlockedException
TeiidException
close
protected void close()
- Client close is currently implemented as asynch.
Any errors that occur will not make it to the client, instead we just log them here.
processNew
protected void processNew()
throws TeiidProcessingException,
TeiidComponentException
- Throws:
TeiidProcessingException
TeiidComponentException
sendResultsIfNeeded
protected boolean sendResultsIfNeeded(TupleBatch batch)
throws TeiidComponentException
- Send results if they have been requested. This should only be called from the processing thread.
- Throws:
TeiidComponentException
createResultsMessage
public ResultsMessage createResultsMessage(List<? extends List<?>> batch,
List columnSymbols)
processLobChunkRequest
public void processLobChunkRequest(String id,
int streamRequestId,
ResultsReceiver<LobChunk> chunckReceiver)
removeLobStream
public void removeLobStream(int streamRequestId)
requestCancel
public boolean requestCancel()
throws TeiidComponentException
- Throws:
TeiidComponentException
requestAtomicRequestCancel
public boolean requestAtomicRequestCancel(AtomicRequestID ari)
throws TeiidComponentException
- Throws:
TeiidComponentException
requestClose
public void requestClose()
throws TeiidComponentException
- Throws:
TeiidComponentException
requestMore
public void requestMore(int batchFirst,
int batchLast,
ResultsReceiver<ResultsMessage> receiver)
closeAtomicRequest
public void closeAtomicRequest(AtomicRequestID atomicRequestId)
addConnectorRequest
public void addConnectorRequest(AtomicRequestID atomicRequestId,
DataTierTupleSource connInfo)
addSourceFailureDetails
public void addSourceFailureDetails(SourceWarning details)
This method add information to the warning on the work item for the given
RequestID
. This method is called from DataTierManager
getWarnings
public List<TeiidException> getWarnings()
toString
public String toString()
- Specified by:
toString
in class AbstractWorkItem
getDqpWorkContext
public DQPWorkContext getDqpWorkContext()
- Specified by:
getDqpWorkContext
in interface ThreadReuseExecutor.PrioritizedRunnable
getProcessingTimestamp
public long getProcessingTimestamp()
release
public void release()
- Specified by:
release
in interface javax.resource.spi.work.Work
- Overrides:
release
in class AbstractWorkItem
getPriority
public int getPriority()
- Specified by:
getPriority
in interface ThreadReuseExecutor.PrioritizedRunnable
getCreationTime
public long getCreationTime()
- Specified by:
getCreationTime
in interface ThreadReuseExecutor.PrioritizedRunnable
setCancelTask
public void setCancelTask(EnhancedTimer.Task cancelTask)
Copyright © 2012. All Rights Reserved.