final String readString() throws DisconnectException { int len = ddmScalarLen_; ensureBLayerDataInBuffer(len); adjustLengths(len); String result = ccsidManager_.convertToUCS2(buffer_, pos_, len); pos_ += len; return result; }
protected final void flushExistingDSS() throws DisconnectException { try { if (simpleDssFinalize) { finalizeDssLength(); } else { finalizePreviousChainedDss(true); } sendBytes(netAgent_.getOutputStream()); } catch (java.io.IOException e) { netAgent_.throwCommunicationsFailure(e); } }
protected int readXaPrepare(NetConnection conn) throws DisconnectException { startSameIdChainParse(); int synctype = parseSYNCCTLreply(conn); endOfSameIdChainData(); NetXACallInfo callInfo = conn.xares_.callInfoArray_[conn.currXACallInfoOffset_]; if (synctype == XAResource.XA_RDONLY) { // xaretval of read-only, make sure flag agrees callInfo.setReadOnlyTransactionFlag(true); } else { // xaretval NOT read-only, make sure flag agrees callInfo.setReadOnlyTransactionFlag(false); } return synctype; }
protected void readXaCommit(NetConnection conn) throws DisconnectException { startSameIdChainParse(); parseSYNCCTLreply(conn); endOfSameIdChainData(); NetXACallInfo callInfo = conn.xares_.callInfoArray_[conn.currXACallInfoOffset_]; callInfo.xaInProgress_ = false; conn.completeLocalCommit(); }
public void saveConnectionVariables() { in_ = actualConn_.getNetConnection().getInputStream(); out_ = actualConn_.getNetConnection().getOutputStream(); crrtkn_ = actualConn_.getCorrelatorToken(); }
protected int readXaRollback(NetConnection conn) throws DisconnectException { startSameIdChainParse(); parseSYNCCTLreply(conn); endOfSameIdChainData(); NetXACallInfo callInfo = conn.xares_.callInfoArray_[conn.currXACallInfoOffset_]; callInfo.xaInProgress_ = false; callInfo.xaWasSuspended = false; conn.completeLocalRollback(); return javax.transaction.xa.XAResource.XA_OK; }
protected final int flushScalarStreamSegment() throws DisconnectException { try { sendBytes(netAgent_.getOutputStream()); } catch (java.io.IOException ioe) { netAgent_.throwCommunicationsFailure(ioe); } dssLengthLocation_ = offset_; return DssConstants.MAX_DSS_LEN; }
private int parseSQLDTAGRPdataLabelsAndUpdateColumn(NetCursor cursor, int columnIndex, int tripletLength) throws DisconnectException { int numColumns = (tripletLength - 3) / 3; for (int i = columnIndex; i < columnIndex + numColumns; i++) { cursor.qrydscTypdef_.updateColumn(cursor, i, readFastUnsignedByte(), readFastUnsignedShort()); } return numColumns; }
protected String parseFastVCS() throws DisconnectException { // doublecheck what readString() does if the length is 0 return readFastString(readFastUnsignedShort(), netAgent_.targetTypdef_.getCcsidSbcEncoding()); } //----------------------non-parsing computational helper methods--------------
protected void getMoreData_() throws SqlException { // reset the dataBuffer_ before getting more data if cursor is foward-only. // getMoreData() is only called in Cursor.next() when current position is // equal to lastValidBytePosition_. if (netResultSet_.resultSetType_ == java.sql.ResultSet.TYPE_FORWARD_ONLY) { resetDataBuffer(); } netResultSet_.flowFetch(); }
public void writeCommit() throws SqlException { // this logic must be in sync with willAutoCommitGenerateFlow() logic int xaState = netCon.getXAState(); if (xaState == netCon.XA_T0_NOT_ASSOCIATED){ netCon.xares_.callInfoArray_[ netCon.xares_.conn_.currXACallInfoOffset_ ].xid_ = NetXAResource.nullXid; writeLocalXACommit_(); } }
protected void sendRequest() throws DisconnectException { try { request_.flush(rawSocketOutputStream_); } catch (java.io.IOException e) { throwCommunicationsFailure(e); } }
void resetNetPreparedStatement(com.pivotal.gemfirexd.internal.client.am.PreparedStatement statement, NetAgent netAgent, NetConnection netConnection) { super.resetNetStatement(statement, netAgent, netConnection); initNetPreparedStatement(statement); }
protected int readXaPrepare(NetConnection conn) throws DisconnectException { startSameIdChainParse(); int synctype = parseSYNCCTLreply(conn); endOfSameIdChainData(); NetXACallInfo callInfo = conn.xares_.callInfoArray_[conn.currXACallInfoOffset_]; if (synctype == XAResource.XA_RDONLY) { // xaretval of read-only, make sure flag agrees callInfo.setReadOnlyTransactionFlag(true); } else { // xaretval NOT read-only, make sure flag agrees callInfo.setReadOnlyTransactionFlag(false); } return synctype; }
protected void readXaCommit(NetConnection conn) throws DisconnectException { startSameIdChainParse(); parseSYNCCTLreply(conn); endOfSameIdChainData(); NetXACallInfo callInfo = conn.xares_.callInfoArray_[conn.currXACallInfoOffset_]; callInfo.xaInProgress_ = false; conn.completeLocalCommit(); }
final String readString() throws DisconnectException { int len = ddmScalarLen_; ensureBLayerDataInBuffer(len); adjustLengths(len); String result = ccsidManager_.convertToUCS2(buffer_, pos_, len); pos_ += len; return result; }
protected final int flushScalarStreamSegment() throws DisconnectException { try { sendBytes(netAgent_.getOutputStream()); } catch (java.io.IOException ioe) { netAgent_.throwCommunicationsFailure(ioe); } dssLengthLocation_ = offset_; return DssConstants.MAX_DSS_LEN; }
protected void getMoreData_() throws SqlException { // reset the dataBuffer_ before getting more data if cursor is foward-only. // getMoreData() is only called in Cursor.next() when current position is // equal to lastValidBytePosition_. if (netResultSet_.resultSetType_ == java.sql.ResultSet.TYPE_FORWARD_ONLY) { resetDataBuffer(); } netResultSet_.flowFetch(); }
public void writeCommit() throws SqlException { // this logic must be in sync with willAutoCommitGenerateFlow() logic int xaState = netCon.getXAState(); if (xaState == netCon.XA_T0_NOT_ASSOCIATED){ netCon.xares_.callInfoArray_[ netCon.xares_.conn_.currXACallInfoOffset_ ].xid_ = NetXAResource.nullXid; writeLocalXACommit_(); } }
final String readString(int length) throws DisconnectException { ensureBLayerDataInBuffer(length); adjustLengths(length); String result = ccsidManager_.convertToUCS2(buffer_, pos_, length); pos_ += length; return result; }