@Test public void nextSeqNumIsSequential() { SpannerConnection connection = new SpannerConnection(this.mockClient, TEST_SESSION, null); long prevNum = connection.nextSeqNum(); for (int i = 0; i < 9; i++) { long num = connection.nextSeqNum(); if (num <= prevNum) { fail("Expected to be monotonically increasing; received " + prevNum + ", then " + num); } prevNum = num; } }
@Override public long nextSeqNum() { return this.seqNum.getAndIncrement(); }
SpannerConnection implements Connection, StatementExecutionContext { @Override public long nextSeqNum() { return this.seqNum.getAndIncrement(); } }
SpannerConnection implements Connection, StatementExecutionContext { @Override public long nextSeqNum() { return this.seqNum.getAndIncrement(); } SpannerConnection(Client client, Session session, SpannerConnectionConfiguration config); }
SpannerConnection implements Connection, StatementExecutionContext { @Override public long nextSeqNum() { return this.seqNum.getAndIncrement(); } SpannerConnection(Client client, Session session, SpannerConnectionConfiguration config); @Override Mono<Void> beginTransaction(); Mono<Void> beginTransaction(TransactionOptions transactionOptions); @Override Mono<Void> commitTransaction(); @Override Mono<Void> rollbackTransaction(); @Override Mono<Void> close(); @Override Batch createBatch(); @Override Publisher<Void> createSavepoint(String s); @Override SpannerStatement createStatement(String sql); @Override Publisher<Void> releaseSavepoint(String s); @Override Publisher<Void> rollbackTransactionToSavepoint(String s); @Override Publisher<Void> setTransactionIsolationLevel(IsolationLevel isolationLevel); @Override IsolationLevel getTransactionIsolationLevel(); @Override ByteString getTransactionId(); @Override String getSessionName(); @Override long nextSeqNum(); boolean isTransactionReadWrite(); boolean isTransactionPartitionedDml(); @Override Publisher<Boolean> validate(ValidationDepth validationDepth); @Override Publisher<Void> setAutoCommit(boolean newAutoCommit); @Override boolean isAutoCommit(); @Override SpannerConnectionMetadata getMetadata(); }
SpannerConnection implements Connection, StatementExecutionContext { @Override public long nextSeqNum() { return this.seqNum.getAndIncrement(); } SpannerConnection(Client client, Session session, SpannerConnectionConfiguration config); @Override Mono<Void> beginTransaction(); Mono<Void> beginTransaction(TransactionOptions transactionOptions); @Override Mono<Void> commitTransaction(); @Override Mono<Void> rollbackTransaction(); @Override Mono<Void> close(); @Override Batch createBatch(); @Override Publisher<Void> createSavepoint(String s); @Override SpannerStatement createStatement(String sql); @Override Publisher<Void> releaseSavepoint(String s); @Override Publisher<Void> rollbackTransactionToSavepoint(String s); @Override Publisher<Void> setTransactionIsolationLevel(IsolationLevel isolationLevel); @Override IsolationLevel getTransactionIsolationLevel(); @Override ByteString getTransactionId(); @Override String getSessionName(); @Override long nextSeqNum(); boolean isTransactionReadWrite(); boolean isTransactionPartitionedDml(); @Override Publisher<Boolean> validate(ValidationDepth validationDepth); @Override Publisher<Void> setAutoCommit(boolean newAutoCommit); @Override boolean isAutoCommit(); @Override SpannerConnectionMetadata getMetadata();  }