Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Add a "why" to the section about blocking call #174

Closed
RichoDemus opened this issue Oct 13, 2016 · 3 comments
Closed

Add a "why" to the section about blocking call #174

RichoDemus opened this issue Oct 13, 2016 · 3 comments

Comments

@RichoDemus
Copy link

in the section "Example 4: Blocking call for value" there is a lot of code to get a value.

But since there is a section about how to do blocking calls it seems like the default is non-blocking and that this is the way to do blocking calls, but then there is just a getValue() method in the keyvalue client, doesn't that allow a much simpler way of doing a blocking call to get a value?

Either I'm missing something about what section 4 describes or there's simply a much easier way to do it know and the documentation doesn't reflect this :)

robbert229 added a commit to robbert229/consul-client that referenced this issue Oct 13, 2016
I added a single line of documentation to example 4 as per rickfast#174.
@robbert229
Copy link
Contributor

I created a pr with a single line of documentation to help describe what the blocking call is.

@RichoDemus
Copy link
Author

Ah! So it's kind of like a one-shot subscribe to changes for a value?

@robbert229
Copy link
Contributor

Exactly, though it doesn't guarantee that the change actually occurs.

  • It may time out
  • A write may be idempotent ( the value is set to foo, and some other process sets it to foo )

rickfast pushed a commit that referenced this issue Oct 14, 2016
* Fix indentation and renumber examples

In example 4 there was an extra level of indentation, and there was no example 5, but examples 6, and 7, 8. I fixed the indentation and the numbering gap.

* add slight documentation to example 4

I added a single line of documentation to example 4 as per #174.

* Revert "Fix indentation and renumber examples"
rickfast pushed a commit that referenced this issue Nov 4, 2016
* [Fix] KVCache does not work for exact key search

Commit 3714976 changes the way the prefix are removed from the key.
It works fine for key/subkey pattern but fails when we are looking for the
exact key (for intance, "a/b").

* Allows to override key extractor (#172)

* Add single line of documentation to example 4 (#176)

* Fix indentation and renumber examples

In example 4 there was an extra level of indentation, and there was no example 5, but examples 6, and 7, 8. I fixed the indentation and the numbering gap.

* add slight documentation to example 4

I added a single line of documentation to example 4 as per #174.

* Revert "Fix indentation and renumber examples"

* Fix indentation and renumber examples (#175)

In example 4 there was an extra level of indentation, and there was no example 5, but examples 6, and 7, 8. I fixed the indentation and the numbering gap.

* allow 404s on kv grabs

* fixing KV tests for 404

* 0.13.2

* Add support for Check-And-Set option to DELETE operation (#178)

* Add eclipse project files to .gitignore

* Add support for Check-And-Set option to DELETE operation.

* transaction support (#181)

* operator api support (#182)

* Override default backoff delay for Cache

Default backoff delay for caches is equal to 10s.
Enable this value to be overriden from properties if such a property exists.
For instance, "-Dcom.orbitz.consul.cache.backOffDelay=500".

I chose to use properties as the code of caches starts to grow fast, some
caches already have 4 constructors and i think it could be better to avoid
the creation of another one.
@rickfast rickfast closed this as completed Feb 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants