You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by shivramk <gi...@git.apache.org> on 2016/04/05 18:54:03 UTC

[GitHub] curator pull request: [CURATOR-314] Listenable support for GroupMe...

GitHub user shivramk opened a pull request:

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

    [CURATOR-314] Listenable support for GroupMember recipe

    I've added support for listenable events to the GroupMember recipe. Its built on the event support provided by the underlying PathChildenCache object being used by GroupMember

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

    $ git pull https://github.com/shivramk/curator CURATOR-314

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

    https://github.com/apache/curator/pull/141.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 #141
    
----
commit 840afd3158e825ccf038ab4cc272fbc357b8c7a1
Author: Shivram Khandeparker <sh...@flipkart.com>
Date:   2016-04-05T16:32:34Z

    Added support for listenable events in GroupMember

commit debad0ab1cbbfd754f80d51ce6b24bca0b0e4034
Author: Shivram Khandeparker <sh...@flipkart.com>
Date:   2016-04-05T16:49:41Z

    Added test case for GroupMemberListener

----


---
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-314] Listenable support for GroupMe...

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

    https://github.com/apache/curator/pull/141#discussion_r62436654
  
    --- Diff: curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/GroupMember.java ---
    @@ -75,6 +119,7 @@ public void start()
             try
             {
                 cache.start();
    +            cache.getListenable().addListener(childrenCacheListener);
    --- End diff --
    
    Why not add a proxy listener getListenable()? I need to think about this. Does this single listener correctly proxy all behaviors from getListenable()?


---
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-314] Listenable support for GroupMe...

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

    https://github.com/apache/curator/pull/141#discussion_r62436669
  
    --- Diff: curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/GroupMemberEvent.java ---
    @@ -0,0 +1,75 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.curator.framework.recipes.nodes;
    +
    +/**
    + * POJO that abstracts a change to a group membership
    + */
    +public class GroupMemberEvent
    --- End diff --
    
    PathChildrenCacheEvent or TreeCacheEvent can be used, right? I'm leery expanded the number of event objects.


---
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-314] Listenable support for GroupMe...

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

    https://github.com/apache/curator/pull/141#discussion_r62436637
  
    --- Diff: curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/GroupData.java ---
    @@ -0,0 +1,94 @@
    +/**
    --- End diff --
    
    Can't ChildData be re-used here? The only difference is the stat object which doesn't hurt for GroupMember.


---
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.
---