public ResultsFuture<?> closeRequest(long requestId) throws TeiidProcessingException, TeiidComponentException { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); closeRequest(workContext.getRequestID(requestId)); return ResultsFuture.NULL_FUTURE; }
@Override public boolean cancelRequest(long requestID) throws TeiidProcessingException, TeiidComponentException { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); return this.cancelRequest(workContext.getRequestID(requestID), "by the client"); //$NON-NLS-1$ }
public ResultsFuture<?> commit() throws XATransactionException { final String threadId = DQPWorkContext.getWorkContext().getSessionId(); Callable<Void> processor = new Callable<Void>() { @Override public Void call() throws Exception { getTransactionService().commit(threadId); return null; } }; return addWork(processor, 0); }
public ResultsFuture<?> commit() throws XATransactionException { final String threadId = DQPWorkContext.getWorkContext().getSessionId(); Callable<Void> processor = new Callable<Void>() { @Override public Void call() throws Exception { getTransactionService().commit(threadId); return null; } }; return addWork(processor, 0); }
public ResultsFuture<?> rollback() throws XATransactionException { final String threadId = DQPWorkContext.getWorkContext().getSessionId(); Callable<Void> processor = new Callable<Void>() { @Override public Void call() throws Exception { getTransactionService().rollback(threadId); return null; } }; return addWork(processor, 0); }
public ResultsFuture<?> begin() throws XATransactionException { String threadId = DQPWorkContext.getWorkContext().getSessionId(); this.getTransactionService().begin(threadId); return ResultsFuture.NULL_FUTURE; }
public ResultsFuture<?> end(XidImpl xid, int flags) throws XATransactionException { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); this.getTransactionService().end(workContext.getSessionId(), xid, flags, workContext.getSession().isEmbedded()); return ResultsFuture.NULL_FUTURE; } // global txn
@Override public Void call() throws Exception { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); getTransactionService().commit(workContext.getSessionId(), xid, onePhase, workContext.getSession().isEmbedded()); return null; } };
@Override public Void call() throws Exception { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); getTransactionService().rollback(workContext.getSessionId(),xid, workContext.getSession().isEmbedded()); return null; } };
@Override public Void call() throws Exception { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); getTransactionService().commit(workContext.getSessionId(), xid, onePhase, workContext.getSession().isEmbedded()); return null; } };
@Override public Integer call() throws Exception { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); return getTransactionService().prepare(workContext.getSessionId(),xid, workContext.getSession().isEmbedded()); } };
@Override public Void call() throws Exception { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); getTransactionService().rollback(workContext.getSessionId(),xid, workContext.getSession().isEmbedded()); return null; } };
public MetadataResult getMetadata(long requestID) throws TeiidComponentException, TeiidProcessingException { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); MetaDataProcessor processor = new MetaDataProcessor(this, this.prepPlanCache, workContext.getVdbName(), workContext.getVdbVersion()); return processor.processMessage(workContext.getRequestID(requestID), workContext, null, true); }
public ResultsFuture<ResultsMessage> processCursorRequest(long reqID, int batchFirst, int fetchSize) throws TeiidProcessingException { if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) { LogManager.logDetail(LogConstants.CTX_DQP, "DQP process cursor request", batchFirst, fetchSize); //$NON-NLS-1$ } DQPWorkContext workContext = DQPWorkContext.getWorkContext(); ResultsFuture<ResultsMessage> resultsFuture = new ResultsFuture<ResultsMessage>(); RequestWorkItem workItem = getRequestWorkItem(workContext.getRequestID(reqID)); workItem.requestMore(batchFirst, batchFirst + Math.min(fetchSize, this.config.getMaxRowsFetchSize()) - 1, resultsFuture.getResultsReceiver()); return resultsFuture; }
public ResultsFuture<ResultsMessage> processCursorRequest(long reqID, int batchFirst, int fetchSize) throws TeiidProcessingException { if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) { LogManager.logDetail(LogConstants.CTX_DQP, "DQP process cursor request", batchFirst, fetchSize); //$NON-NLS-1$ } DQPWorkContext workContext = DQPWorkContext.getWorkContext(); ResultsFuture<ResultsMessage> resultsFuture = new ResultsFuture<ResultsMessage>(); RequestWorkItem workItem = getRequestWorkItem(workContext.getRequestID(reqID)); workItem.requestMore(batchFirst, batchFirst + Math.min(fetchSize, this.config.getMaxRowsFetchSize()) - 1, resultsFuture.getResultsReceiver()); return resultsFuture; }
public ResultsFuture<ResultsMessage> processCursorRequest(long reqID, int batchFirst, int fetchSize) throws TeiidProcessingException { if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) { LogManager.logDetail(LogConstants.CTX_DQP, "DQP process cursor request", batchFirst, fetchSize); //$NON-NLS-1$ } DQPWorkContext workContext = DQPWorkContext.getWorkContext(); ResultsFuture<ResultsMessage> resultsFuture = new ResultsFuture<ResultsMessage>(); RequestWorkItem workItem = getRequestWorkItem(workContext.getRequestID(reqID)); workItem.requestMore(batchFirst, batchFirst + Math.min(fetchSize, this.config.getMaxRowsFetchSize()) - 1, resultsFuture.getResultsReceiver()); return resultsFuture; }
public MetadataResult getMetadata(long requestID, String preparedSql, boolean allowDoubleQuotedVariable) throws TeiidComponentException, TeiidProcessingException { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); checkActive(workContext); MetaDataProcessor processor = new MetaDataProcessor(this, this.prepPlanCache, workContext.getVdbName(), workContext.getVdbVersion()); return processor.processMessage(workContext.getRequestID(requestID), workContext, preparedSql, allowDoubleQuotedVariable); }
public MetadataResult getMetadata(long requestID, String preparedSql, boolean allowDoubleQuotedVariable) throws TeiidComponentException, TeiidProcessingException { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); checkActive(workContext); MetaDataProcessor processor = new MetaDataProcessor(this, this.prepPlanCache, workContext.getVdbName(), workContext.getVdbVersion()); return processor.processMessage(workContext.getRequestID(requestID), workContext, preparedSql, allowDoubleQuotedVariable); }
public ResultsFuture<LobChunk> requestNextLobChunk(int lobRequestId, long requestId, String streamId) throws TeiidProcessingException { if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) { LogManager.logDetail(LogConstants.CTX_DQP, "Request for next Lob chunk with Stream id="+streamId+" instance id="+lobRequestId); //$NON-NLS-1$//$NON-NLS-2$ } RequestWorkItem workItem = getRequestWorkItem(DQPWorkContext.getWorkContext().getRequestID(requestId)); ResultsFuture<LobChunk> resultsFuture = new ResultsFuture<LobChunk>(); workItem.processLobChunkRequest(streamId, lobRequestId, resultsFuture.getResultsReceiver()); return resultsFuture; }
public ResultsFuture<LobChunk> requestNextLobChunk(int lobRequestId, long requestId, String streamId) throws TeiidProcessingException { if (LogManager.isMessageToBeRecorded(LogConstants.CTX_DQP, MessageLevel.DETAIL)) { LogManager.logDetail(LogConstants.CTX_DQP, "Request for next Lob chunk with Stream id="+streamId+" instance id="+lobRequestId); //$NON-NLS-1$//$NON-NLS-2$ } RequestWorkItem workItem = getRequestWorkItem(DQPWorkContext.getWorkContext().getRequestID(requestId)); ResultsFuture<LobChunk> resultsFuture = new ResultsFuture<LobChunk>(); workItem.processLobChunkRequest(streamId, lobRequestId, resultsFuture.getResultsReceiver()); return resultsFuture; }