private void initTransactionState(TransactionContext tc) { transactionContext = tc; if (this.transactionContext != null && this.transactionContext.getTransactionType() != Scope.NONE) { if (this.requestMsg.getRequestOptions().isContinuous()) { throw new IllegalStateException("Continuous requests are not allowed to be transactional."); //$NON-NLS-1$ } this.transactionState = TransactionState.ACTIVE; } }
private void initTransactionState(TransactionContext tc) { transactionContext = tc; if (this.transactionContext != null && this.transactionContext.getTransactionType() != Scope.NONE) { if (this.requestMsg.getRequestOptions().isContinuous()) { throw new IllegalStateException("Continuous requests are not allowed to be transactional."); //$NON-NLS-1$ } this.transactionState = TransactionState.ACTIVE; } }
private void initTransactionState(TransactionContext tc) { transactionContext = tc; if (this.transactionContext != null && this.transactionContext.getTransactionType() != Scope.NONE) { if (this.requestMsg.getRequestOptions().isContinuous()) { throw new IllegalStateException("Continuous requests are not allowed to be transactional."); //$NON-NLS-1$ } this.transactionState = TransactionState.ACTIVE; } }
private void startActivePlan(RequestWorkItem workItem, boolean addToQueue) { boolean continuous = workItem.requestMsg.getRequestOptions().isContinuous(); workItem.active = !continuous; if (addToQueue) { this.addWork(workItem); } if (!continuous) { this.currentlyActivePlans++; } }
private void startActivePlan(RequestWorkItem workItem, boolean addToQueue) { boolean continuous = workItem.requestMsg.getRequestOptions().isContinuous(); workItem.active = !continuous; if (addToQueue) { this.addWork(workItem); } if (!continuous) { this.currentlyActivePlans++; } }
private void startActivePlan(RequestWorkItem workItem, boolean addToQueue) { boolean continuous = workItem.requestMsg.getRequestOptions().isContinuous(); workItem.active = !continuous; if (addToQueue) { this.addWork(workItem); } if (!continuous) { this.currentlyActivePlans++; } }
private boolean cursorRequestExpected() { return this.transactionState != TransactionState.ACTIVE && (requestMsg.getRequestOptions().isContinuous() || (useCallingThread && isForwardOnly())); }
private boolean cursorRequestExpected() { return this.transactionState != TransactionState.ACTIVE && (requestMsg.getRequestOptions().isContinuous() || (useCallingThread && isForwardOnly())); }
private boolean cursorRequestExpected() { return this.transactionState != TransactionState.ACTIVE && (requestMsg.getRequestOptions().isContinuous() || (useCallingThread && isForwardOnly())); }
@Override public void processRequest() throws TeiidComponentException, TeiidProcessingException { super.processRequest(); if (this.requestMsg.getRequestOptions().isContinuous()) { this.processor.setContinuous(this.prepPlan, this.requestMsg.getCommandString()); } } }
@Override public void processRequest() throws TeiidComponentException, TeiidProcessingException { super.processRequest(); if (this.requestMsg.getRequestOptions().isContinuous()) { this.processor.setContinuous(this.prepPlan, this.requestMsg.getCommandString()); } } }
@Override public void processRequest() throws TeiidComponentException, TeiidProcessingException { super.processRequest(); if (this.requestMsg.getRequestOptions().isContinuous()) { this.processor.setContinuous(this.prepPlan, this.requestMsg.getCommandString()); } } }
resultsBuffer.setRowCount(batch.getEndRow()); if (transactionState != TransactionState.ACTIVE && (requestMsg.getRequestOptions().isContinuous() || (useCallingThread && isForwardOnly()))) { synchronized (this) { if (resultsReceiver == null) {
resultsBuffer.setRowCount(batch.getEndRow()); if (transactionState != TransactionState.ACTIVE && (requestMsg.getRequestOptions().isContinuous() || (useCallingThread && isForwardOnly()))) { synchronized (this) { if (resultsReceiver == null) {
resultsBuffer.setRowCount(batch.getEndRow()); if (transactionState != TransactionState.ACTIVE && (requestMsg.getRequestOptions().isContinuous() || (useCallingThread && isForwardOnly()))) { synchronized (this) { if (resultsReceiver == null) {
requestMsg.setFetchSize(Math.min(requestMsg.getFetchSize(), this.config.getMaxRowsFetchSize())); Request request = null; if ( requestMsg.isPreparedStatement() || requestMsg.isCallableStatement() || requestMsg.getRequestOptions().isContinuous()) { request = new PreparedStatementRequest(prepPlanCache); } else {
requestMsg.setFetchSize(Math.min(requestMsg.getFetchSize(), this.config.getMaxRowsFetchSize())); Request request = null; if ( requestMsg.isPreparedStatement() || requestMsg.isCallableStatement() || requestMsg.getRequestOptions().isContinuous()) { request = new PreparedStatementRequest(prepPlanCache); } else {
requestMsg.setFetchSize(Math.min(requestMsg.getFetchSize(), this.config.getMaxRowsFetchSize())); Request request = null; if ( requestMsg.isPreparedStatement() || requestMsg.isCallableStatement() || requestMsg.getRequestOptions().isContinuous()) { request = new PreparedStatementRequest(prepPlanCache); } else {
if (!this.requestMsg.getRequestOptions().isContinuous()) { if ((this.begin > (batch != null?batch.getEndRow():this.resultsBuffer.getRowCount()) && !doneProducingBatches) || (this.transactionState == TransactionState.ACTIVE) || (returnsUpdateCount && !doneProducingBatches)) { result = false; long finalRowCount = (this.resultsBuffer.isFinal()&&!this.requestMsg.getRequestOptions().isContinuous())?this.resultsBuffer.getRowCount():(batch.getTerminationFlag()?batch.getEndRow():-1); if (batch.getBeginRow() > Integer.MAX_VALUE || batch.getEndRow() > Integer.MAX_VALUE) { throw new TeiidProcessingException(QueryPlugin.Event.TEIID31174, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31174));
if (!this.requestMsg.getRequestOptions().isContinuous()) { if ((this.begin > (batch != null?batch.getEndRow():this.resultsBuffer.getRowCount()) && !doneProducingBatches) || (this.transactionState == TransactionState.ACTIVE) || (returnsUpdateCount && !doneProducingBatches)) { result = false; long finalRowCount = (this.resultsBuffer.isFinal()&&!this.requestMsg.getRequestOptions().isContinuous())?this.resultsBuffer.getRowCount():(batch.getTerminationFlag()?batch.getEndRow():-1); if (batch.getBeginRow() > Integer.MAX_VALUE || batch.getEndRow() > Integer.MAX_VALUE) { throw new TeiidProcessingException(QueryPlugin.Event.TEIID31174, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31174));