Conversation

thiagotnunes

Makes the TransactionCallable a @FunctionalInterface so it can be used with lambdas.

This PR also modifies all of its usages to the lambda syntax. Only syntatic changes were made, no logic changes were made here.

@thiagotnunesthiagotnunes requested a review from a team as a code owner April 15, 2021 06:03
@thiagotnunesthiagotnunes requested a review from a team April 15, 2021 06:03
@google-clagoogle-cla bot added the cla: yesThis human has signed the Contributor License Agreement.label Apr 15, 2021
@product-auto-labelproduct-auto-label bot added the api: spannerIssues related to the googleapis/java-spanner API.label Apr 15, 2021
@codecov

Codecov Report

Merging #1066 (52763a4) into master (1d4eed4) will increase coverage by 0.00%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1066   +/-   ##
=========================================
  Coverage     85.24%   85.25%           
- Complexity     2658     2660    +2     
=========================================
  Files           155      155           
  Lines         14453    14448    -5     
  Branches       1362     1362           
=========================================
- Hits          12320    12317    -3     
+ Misses         1565     1562    -3     
- Partials        568      569    +1     
Impacted FilesCoverage ΔComplexity Δ
...java/com/google/cloud/spanner/AsyncRunnerImpl.java93.75% <60.00%> (-0.19%)10.00 <1.00> (+1.00)⬇️
...cloud/spanner/connection/SingleUseTransaction.java91.19% <92.85%> (-0.14%)36.00 <0.00> (ø)
...ain/java/com/google/cloud/spanner/SessionImpl.java87.13% <100.00%> (-0.08%)35.00 <1.00> (+1.00)⬇️
...a/com/google/cloud/spanner/SessionPoolOptions.java69.53% <0.00%> (ø)18.00% <0.00%> (+1.00%)
...ain/java/com/google/cloud/spanner/SessionPool.java89.12% <0.00%> (+0.19%)72.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d4eed4...52763a4. Read the comment docs.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

We should also update the examples in the Javadoc in the DatabaseClient interface (and possibly also other places), but I think we can do that in a separate PR.

@thiagotnunesthiagotnunes merged commit b036a77 into googleapis:master Apr 15, 2021
@thiagotnunesthiagotnunes deleted the transaction-callable-functional-interface branch April 15, 2021 09:04
Sign up for free to join this conversation on . Already have an account? Sign in to comment
api: spannerIssues related to the googleapis/java-spanner API.cla: yesThis human has signed the Contributor License Agreement.
None yet

Successfully merging this pull request may close these issues.