Skip to content

Commit

Permalink
api: Clarify setting safe/idempotent may change other value
Browse files Browse the repository at this point in the history
  • Loading branch information
ejona86 committed Oct 17, 2019
1 parent 9a34cee commit 40f401d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions api/src/main/java/io/grpc/MethodDescriptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,9 @@ public Builder<ReqT, RespT> setSchemaDescriptor(@Nullable Object schemaDescripto

/**
* Sets whether the method is idempotent. If true, calling this method more than once doesn't
* have additional side effects. If {@code false}, method is also not safe.
* have additional side effects. If {@code false}, method is also not safe. Note that implies
* calling {@code builder.setIdempotent(false).setIdempotent(true)} will leave {@code
* isSafe() == false}.
*
* @since 1.1.0
*/
Expand All @@ -549,7 +551,8 @@ public Builder<ReqT, RespT> setIdempotent(boolean idempotent) {

/**
* Sets whether this method is safe. If true, calling this method any number of times doesn't
* have side effects. If {@code true}, method is also idempotent.
* have side effects. If {@code true}, method is also idempotent. Note that implies calling
* {@code builder.setSafe(true).setSafe(false)} will leave {@code isIdempotent() == true}.
*
* @since 1.1.0
*/
Expand Down

0 comments on commit 40f401d

Please sign in to comment.