You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by Randgalt <gi...@git.apache.org> on 2015/09/06 21:27:45 UTC

[GitHub] curator pull request: Added Locker which uses Java 7's try-with-re...

GitHub user Randgalt opened a pull request:

    https://github.com/apache/curator/pull/103

    Added Locker which uses Java 7's try-with-resource feature to make locking more reliable

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/curator CURATOR-259

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/curator/pull/103.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #103
    
----
commit 58a8818b749475cf2089d116c06359ad0390a2cc
Author: randgalt <ra...@apache.org>
Date:   2015-09-06T19:26:56Z

    Added Locker which uses Java 7's try-with-resource feature to make locking more reliable

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request: [CURATOR-259] Added Locker which uses Java 7...

Posted by cammckenzie <gi...@git.apache.org>.
Github user cammckenzie commented on the pull request:

    https://github.com/apache/curator/pull/103#issuecomment-138134924
  
    Looks good to me.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request: Added Locker which uses Java 7's try-with-re...

Posted by cammckenzie <gi...@git.apache.org>.
Github user cammckenzie commented on the pull request:

    https://github.com/apache/curator/pull/103#issuecomment-138133814
  
    While I agree that it's inherently unsafe and probably not really going to be used in practice. I think that if we're going to expose that interface on the lock itself then we should probably expose it on this utility class as well.
    
    I don't have a strong opinion either way though really.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request: Added Locker which uses Java 7's try-with-re...

Posted by Randgalt <gi...@git.apache.org>.
Github user Randgalt commented on the pull request:

    https://github.com/apache/curator/pull/103#issuecomment-138133533
  
    I was thinking about that but I've come to the opinion that that that's inherently unsafe. But, if you think it's good for completeness I'll add it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request: Added Locker which uses Java 7's try-with-re...

Posted by cammckenzie <gi...@git.apache.org>.
Github user cammckenzie commented on the pull request:

    https://github.com/apache/curator/pull/103#issuecomment-138131860
  
    Looks OK to me. Do we need to provide an option to acquire a lock with no timeout that would just call into lock.acquire()?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator issue #103: [CURATOR-259] Added Locker which uses Java 7's try-with-...

Posted by cammckenzie <gi...@git.apache.org>.
Github user cammckenzie commented on the issue:

    https://github.com/apache/curator/pull/103
  
    Curator 2.x only supports Java 1.6 so can't support the auto close features
    in Java 1.7
    
    Curator 3.x supports Java 1.7. The Locker class is present in this version.
    
    cheers
    
    On Wed, Mar 8, 2017 at 4:20 AM, Paul Vorbach <no...@github.com>
    wrote:
    
    > This class is no longer available. Is this correct?
    >
    > It is still mentioned on http://curator.apache.org/utilities.html, which
    > is why I found this PR.
    >
    > \u2014
    > You are receiving this because you commented.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/curator/pull/103#issuecomment-284792965>, or mute
    > the thread
    > <https://github.com/notifications/unsubscribe-auth/AHZ0sd0PMT71pLepftwyaVl-Gghrgbjeks5rjZH1gaJpZM4F4pym>
    > .
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator issue #103: [CURATOR-259] Added Locker which uses Java 7's try-with-...

Posted by pvorb <gi...@git.apache.org>.
Github user pvorb commented on the issue:

    https://github.com/apache/curator/pull/103
  
    @cammckenzie Thanks for the clarification. I didn't notice that I wasn't using the latest version of Curator since I use it through spring-integration-zookeeper.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request: [CURATOR-259] Added Locker which uses Java 7...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/curator/pull/103


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator issue #103: [CURATOR-259] Added Locker which uses Java 7's try-with-...

Posted by pvorb <gi...@git.apache.org>.
Github user pvorb commented on the issue:

    https://github.com/apache/curator/pull/103
  
    This class is no longer available. Is this correct?
    
    It is still mentioned on http://curator.apache.org/utilities.html, which is why I found this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---