diff --git a/jetcd-core/src/main/java/io/etcd/jetcd/kv/GetResponse.java b/jetcd-core/src/main/java/io/etcd/jetcd/kv/GetResponse.java index b7f9426b..6f278804 100644 --- a/jetcd-core/src/main/java/io/etcd/jetcd/kv/GetResponse.java +++ b/jetcd-core/src/main/java/io/etcd/jetcd/kv/GetResponse.java @@ -59,9 +59,9 @@ public boolean isMore() { /** * Returns the number of keys within the range when requested. - * Note this value is never affected by filtering options for min or max created or modified revisions - * Count is the count for keys on the range part of a request, considering the limit provided, if any. - * Filters for min or max created or midified revisions restrict the + * Note this value is never affected by filtering options (limit, min or max created or modified revisions) + * Count is the count for keys on the range part of a request. + * Filters for limit and created or modified revision ranges restrict the * returned KVs, but not the count. * * @return count. diff --git a/jetcd-core/src/main/java/io/etcd/jetcd/options/GetOption.java b/jetcd-core/src/main/java/io/etcd/jetcd/options/GetOption.java index 44362863..ec0abe8e 100644 --- a/jetcd-core/src/main/java/io/etcd/jetcd/options/GetOption.java +++ b/jetcd-core/src/main/java/io/etcd/jetcd/options/GetOption.java @@ -77,6 +77,12 @@ private GetOption( /** * Get the maximum number of keys to return for a get request. * + *
+ * Note this filter does not affect the count field in GetResponse. + * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters. + *
+ * + * * @return the maximum number of keys to return. */ public long getLimit() { @@ -156,7 +162,7 @@ public boolean isCountOnly() { * ** Note this filter does not affect the count field in GetResponse. - * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of revision filters. + * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters. * For the same reason, it would be meaningless to mix setting a min create revision option * with the count only option. *
@@ -173,7 +179,7 @@ public long getMinCreateRevision() { * ** Note this filter does not affect the count field in GetResponse. - * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of revision filters. + * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters. * For the same reason, it would be meaningless to mix setting a max create revision option * with the count only option. *
@@ -190,7 +196,7 @@ public long getMaxCreateRevision() { * ** Note this filter does not affect the count field in GetResponse. - * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of revision filters. + * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters. * For the same reason, it would be meaningless to mix setting a min mod revision option * with the count only option. *
@@ -207,7 +213,7 @@ public long getMinModRevision() { * ** Note this filter does not affect the count field in GetResponse. - * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of revision filters. + * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters. * For the same reason, it would be meaningless to mix setting a max mod revision option * with the count only option. *
@@ -273,6 +279,13 @@ private Builder() { /** * Limit the number of keys to return for a get request. By default is 0 - no limitation. * + *+ * Note this filter does not affect the count field in GetResponse. + * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters. + * For the same reason, it would be meaningless to mix setting this option + * with the count only option. + *
+ * * @param limit the maximum number of keys to return for a get request. * @return builder */ @@ -421,7 +434,7 @@ public Builder withPrefix(ByteSequence prefix) { * ** Note this filter does not affect the count field in GetResponse. - * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of revision filters. + * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters. * For the same reason, it would be meaningless to mix setting this option * with the count only option. *
@@ -441,7 +454,7 @@ public Builder withMinCreateRevision(long createRevision) { * ** Note this filter does not affect the count field in GetResponse. - * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of revision filters. + * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters. * For the same reason, it would be meaningless to mix setting this option * with the count only option. *
@@ -461,7 +474,7 @@ public Builder withMaxCreateRevision(long createRevision) { * ** Note this filter does not affect the count field in GetResponse. - * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of revision filters. + * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters. * For the same reason, it would be meaningless to mix setting this option * with the count only option. *
@@ -481,7 +494,7 @@ public Builder withMinModRevision(long modRevision) { * ** Note this filter does not affect the count field in GetResponse. - * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of revision filters. + * {@link GetResponse#getCount()} always counts the number of keys matched on a range, independent of filters. * For the same reason, it would be meaningless to mix setting this option * with the count only option. *