Class BackendConnection (0.6.1)
Stay organized with collections
Save and categorize content based on your preferences.
publicclass BackendConnectionThis class emulates a backend PostgreSQL connection. Statements are buffered in memory until a flush/sync is received. This makes it possible to batch multiple statements together before sending these to Cloud Spanner. This class also keeps track of the transaction status of the connection.
Inherited Members
Static Fields
TRANSACTION_ABORTED_ERROR
publicstaticfinalStringTRANSACTION_ABORTED_ERRORMethods
execute(AbstractStatementParser.ParsedStatement parsedStatement, Statement statement)
publicFuture<StatementResult>execute(AbstractStatementParser.ParsedStatementparsedStatement,Statementstatement)Buffers the given statement for execution on the backend connection when the next flush/sync message is received. The returned future will contain the result of the statement when execution has finished.
com.google.cloud.spanner.StatementexecuteCopy(AbstractStatementParser.ParsedStatement parsedStatement, Statement statement, CopyDataReceiver copyDataReceiver, MutationWriter mutationWriter, ExecutorService executor)
publicFuture<StatementResult>executeCopy(AbstractStatementParser.ParsedStatementparsedStatement,Statementstatement,CopyDataReceivercopyDataReceiver,MutationWritermutationWriter,ExecutorServiceexecutor)Buffers the given COPY operation for execution on the backend connection when the next flush/sync message is received. The returned future will contain the result of the COPY operation when execution has finished.
com.google.cloud.spanner.StatementexecuteCopyOut(AbstractStatementParser.ParsedStatement parsedStatement, Statement statement)
publicFuture<StatementResult>executeCopyOut(AbstractStatementParser.ParsedStatementparsedStatement,Statementstatement)com.google.cloud.spanner.StatementgetConnectionState()
publicBackendConnection.ConnectionStategetConnectionState()Returns the current connection state.